OPcache Status

add_action( ‘admin_init’, function () { if ( ! isset( $_GET[‘opcache_status’] ) || ! current_user_can( ‘manage_options’ ) ) { return; } if ( ! function_exists( ‘opcache_get_status’ ) ) { wp_die( ‘OPcache extension not available.’ ); } $s = opcache_get_status( false );…Continue reading

Google Tag Manager – ASJ (GTM-MMC5H4C)

if ( ! function_exists( ‘asj_is_editor_or_preview_request’ ) ) { /** * True for Elementor editor/preview, Gravity Forms preview, * WordPress/Customizer previews and admin requests. */ function asj_is_editor_or_preview_request() { if ( is_admin() || is_preview() || is_customize_preview() ) { return true; } //…Continue reading

Woo Commerce dubbele schema-velden reduceren tot 1

/** * REMARK: * Verwijdert uitsluitend returnShippingFeesAmount uit het * Product-schema van WooCommerce en Yoast WooCommerce SEO. * * Dit veld is optioneel. Alle overige product-, verzend- * en retourgegevens blijven ongewijzigd. */ if ( ! function_exists( ‘dv_remove_return_shipping_fees_amount’ ) )…Continue reading

3dprint price division by zero fix

if (!defined(‘ABSPATH’)) { exit; } add_action(‘init’, function () { if (!function_exists(‘p3d_cart_item_price_currency’)) { return; } // Remove the original (unsafe) filter from the 3dprint plugin. remove_filter(‘woocommerce_cart_item_price’, ‘p3d_cart_item_price_currency’, 999); // Register our defensive replacement at the same priority/args. add_filter(‘woocommerce_cart_item_price’, ‘castimize_safe_cart_item_price_currency’, 999, 3);…Continue reading

Publish Future Post

// Publish Future Post / Kiri Vadivelu / 2026 function publish_future_type( $post_data ) { if ( $post_data[‘post_status’] == ‘future’ && $post_data[‘post_type’] == ‘post’ ) { $post_data[‘post_status’] = ‘publish’; } return $post_data; } add_filter(‘wp_insert_post_data’, ‘publish_future_type’); // Remove the automatic future hook…Continue reading

TEMP – Lumen font cleanup

/* * TEMP – Lumen font cleanup (admin-only, query-triggered) * ?lumen_font_cleanup=dry report only, changes nothing * ?lumen_font_cleanup=run&f=VALUE strip element-level font-family === VALUE (backs up first) * ?lumen_font_cleanup=restore put every backed-up meta value back * v2: also covers Bricks components and…Continue reading

Replace Missing Thumbnail

// Replace Missing Thumbnail / Kiri Vadivelu / 2026 function replace_missing_thumbnail( $html, $post_id, $post_thumbnail_id, $size, $attr ) { if ( empty( $html ) ) { // Replace with your site logo URL $logo_url = ‘https://example.com/path/to/logo.png’; $html = ‘‘; } return…Continue reading