// Cache Exclude List / Kiri Vadivelu / 2026 function cache_exclude_list() { // Array of slug fragments to exclude from cache $excluded_slugs = [ ‘/red/’, ‘/green/’, ‘/blue/’, ]; // Ensure its a non-empty array if ( ! is_array( $excluded_slugs )…Continue reading
// Cache Exclude Slug / Kiri Vadivelu / 2026 function cache_exclude_slug() { // Match any URL that contains this substring $slug_fragment = ‘/category/’; // partial slug value if ( str_contains( $_SERVER[‘REQUEST_URI’], $slug_fragment ) ) { if ( ! defined( ‘DONOTCACHEPAGE’…Continue reading
// Allow font file uploads (administrators only) add_filter( ‘upload_mimes’, function ( $mimes ) { if ( current_user_can( ‘manage_options’ ) ) { $mimes[‘woff2’] = ‘font/woff2’; $mimes[‘woff’] = ‘font/woff’; } return $mimes; } ); // WordPress double-checks the file type; make sure…Continue reading
add_filter(‘upload_mimes’, function ($m) { $m[‘epub’] = ‘application/epub+zip’; return $m; });Continue reading
add_action( ‘woocommerce_order_status_processing’, function( $order_id ) { if ( ‘yes’ !== get_option( ‘wcvendors_vendor_invoice_enabled’, ‘no’ ) ) { return; } $order = wc_get_order( $order_id ); if ( ! $order ) { return; } // Skip per-vendor child orders — only process the…Continue reading
/** * Keep WooCommerce stock identical across the language versions of a product. * * Translations are matched by SKU: , -FR, -ES, -DE, -IT. * This works for simple products, variable products (parent level) and variations. * Only items…Continue reading
/** * Popcorn Jedi: Move AI Content & Meta Assistant * below the Classic Editor + add collapse toggle. */ function pj_move_wacdmg_below_editor() { $screen = get_current_screen(); if ( !$screen || !in_array($screen->base, array(‘post’, ‘post-new’), true) ) { return; } ?>Continue reading
/** * Enable SVG uploads for Administrators only */ function enable_svg_uploads_for_admins($mime_types) { if (current_user_can(‘manage_options’)) { $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘svgz’] = ‘image/svg+xml’; } return $mime_types; } add_filter(‘upload_mimes’, ‘enable_svg_uploads_for_admins’); /** * Bypass secondary file-type check for SVG uploads by admins */ function…Continue reading
/** * WPCode-Snippet: lokalstolz | Sperrseite Developing * * Gestaltet die Sperrseite des Plugins “Password Protected” (Saad Iqbal / WPExperts) * im lokalstolz-Look: dunkler Hintergrund, weisses Logo, Hinweistext. * * – Nutzt nur die offiziellen Haken der kostenlosen Plugin-Version (geprueft…Continue reading
/* * WPCode-Snippet “lokalstolz | Bildmasse ergaenzen” (Typ php, Location everywhere, Auto-Insert an, Prioritaet 10) * Oxygen 6 gibt an Bildern kein width und height aus. Lighthouse meldet dann “Image elements do not have explicit * width and height”, der…Continue reading