hkosnip
// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading
// Functie om beveiligingsheaders toe te voegen aan de WordPress-site function add_security_headers() { // X-Frame-Options: Voorkomt clickjacking door te voorkomen dat de site in een iframe wordt geladen header(‘X-Frame-Options: DENY’); // X-Content-Type-Options: Voorkomt MIME-type sniffing header(‘X-Content-Type-Options: nosniff’); // Referrer-Policy: Beperkt…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
/** * WPCode: Highwire meta – Revista Chilena de Anestesiología (robusto + debug) * – Imprime meta tags en de posts. * – No requiere ACF salvo para el repeater de autores (contrib). * – Incluye comentario HTML de debug…Continue reading
// 1. Add a column for file size in the Media Library table function custom_media_column_file_size( $columns ) { $columns[‘file_size’] = __( ‘File Size’, ‘custom-media-columns’ ); return $columns; } add_filter( ‘manage_media_columns’, ‘custom_media_column_file_size’ ); // 2. Display the file size for each…Continue reading
// 1. Add a column for file size in the Media Library table function custom_media_column_file_size( $columns ) { $columns[‘file_size’] = __( ‘File Size’, ‘custom-media-columns’ ); return $columns; } add_filter( ‘manage_media_columns’, ‘custom_media_column_file_size’ ); // 2. Display the file size for each…Continue reading
// Filter the query args based on the input type and data type. function demo_plugin_filter_field_query_args( $query_args, $field ) { // Return early if the field doesn’t use our custom data type. if ( $field->get_attribute( ‘dataType’ ) !== ‘cruises’ ) {…Continue reading
// Expose login state for GTM add_action(‘wp_head’, function() { if ( is_user_logged_in() ) { echo ““; } else { echo ““; } });Continue reading
add_filter(‘wp_prepare_themes_for_js’, ‘customize_theme_display’, 20); function customize_theme_display($themes) { // Haal de huidige gebruiker op $current_user = wp_get_current_user(); $user_login = $current_user->user_login; // Lijst van gebruikers die ALLE thema’s mogen zien $allowed_users = array(‘Nico’, ‘Thijs’, ‘Mark’, ‘PXLSZ_NK’, ‘PXLSZ_TJW’, ‘PXLSZ_MK’); // Als de gebruiker NIET…Continue reading