Set Background Image fetchpriority=high

add_action( ‘template_redirect’, ‘rd_preload_marked_theme_background_images’, 1 ); function rd_preload_marked_theme_background_images() { if ( is_admin() || wp_doing_ajax() || wp_is_json_request() ) { return; } if ( defined( ‘REST_REQUEST’ ) && REST_REQUEST ) { return; } if ( is_feed() || is_trackback() || is_robots() || is_embed() )…Continue reading

Simulate WP Error Page

add_action(‘template_redirect’, function () { if (isset($_GET[‘rd_test_wp_die’])) { if (!defined(‘DONOTCACHEPAGE’)) { define(‘DONOTCACHEPAGE’, true); } if (!defined(‘DONOTCACHEDB’)) { define(‘DONOTCACHEDB’, true); } if (!defined(‘DONOTMINIFY’)) { define(‘DONOTMINIFY’, true); } nocache_headers(); wp_die(‘This would be the default WordPress Admin Error Message.’); } });Continue reading

Footer

/* * MS GROUP WEBSITE — VERSION B * JavaScript — Scroll Reveal Animations * ============================================================ * Uses IntersectionObserver to fade elements up on scroll. * In WordPress, this can be replaced with: * – Elementor entrance animations (built-in) *…Continue reading

Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Wijzigingen in mu-plugins

/** * Pixelsz – MU Plugins Monitor versie 2.1.3 * * Wijzigingen t.o.v. 2.0: * – Geen mail als issues identiek zijn aan de vorige scan * – Log bewaart maximaal 7 dagen gewone entries; meldingen met issues blijven altijd…Continue reading