// 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
/** * Plugin Name: SEO Essentials (no ads, no bloat) * Description: Titels/meta/canonical/robots, OG/Twitter, JSON-LD (Organization/LocalBusiness, WebSite+SearchAction, WebPage/Article, Breadcrumbs, FAQ, HowTo), robots.txt, alt-fallback, noindex met sitemap-exclude. Inclusief instellingenpagina. * Version: 1.1.0 * Author: Jij */ if ( ! defined( ‘ABSPATH’…Continue reading
/** * Pixelsz Sitemap shortcode * Gebruik: [pixelsz-sitemap] * Opties (optioneel): * [pixelsz-sitemap types=”page,post” orderby=”title” order=”ASC” posts_per_page=”-1″ exclude_ids=”” exclude_cats=””] */ function px_simple_sitemap_shortcode($atts) { $atts = shortcode_atts(array( ‘types’ => ‘page,post’, // comma-gescheiden ‘orderby’ => ‘title’, // title | date | modified…Continue reading
add_action( ‘admin_head’, function () { // Bail if WooCommerce isn’t active. if ( ! class_exists( ‘WooCommerce’ ) ) { return; } if ( ! function_exists( ‘get_current_screen’ ) ) { return; } $screen = get_current_screen(); // Legacy order/subscription edit. $is_legacy_order_screen =…Continue reading