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
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
// Sensitive User Switch / Kiri Vadivelu / 2026 add_filter( ‘user_has_cap’, function( $allcaps, $caps, $args, $user ) { if ( ‘switch_to_user’ === $args[0] ) { // Deny switching to everyone except site owner if ( $user->user_login !== ‘ownerusername’ ) {…Continue reading
/** * 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
// Remove Sensitive Setting / Kiri Vadivelu / 2026 add_action( ‘admin_init’, ‘remove_sensitive_setting’, 999 ); function remove_sensitive_setting() { global $user_ID; if ( $user_ID != 1 ) { // Primary Menus remove_menu_page( ‘options-general.php’ ); // Settings // Secondary Menus remove_submenu_page( ‘themes.php’, ‘site-editor.php’…Continue reading
// Remove Screen Options / Kiri Vadivelu / 2026 function remove_screen_options() { // Check if user has ‘manage_options’ (Admin) OR ‘edit_others_posts’ (Editor) if ( current_user_can( ‘manage_options’ ) || current_user_can( ‘edit_others_posts’ ) ) { return true; // Show Screen Options }…Continue reading
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
/** * Give Yoast SEO default settings for Sugar Calendar recurring events, so the * Yoast SEO > Settings > Content Types > Recurring Events page loads instead of * showing “t.split is not a function”. * Edition: Sugar Calendar…Continue reading
/** * DVA – Elementor Theme Builder * WooCommerce categorie + alle subcategorieën + producten * * Plaatsing: * WooCommerce -> Categorie + subcategorieën + producten -> [hoofdcategorie] * * Werkt voor: * – gekozen WooCommerce-hoofdcategorie; * – alle onderliggende…Continue reading