Disable Site Health

// Remove Tools Submenu Item for Site Health. add_action( ‘admin_menu’, function () { remove_submenu_page( ‘tools.php’, ‘site-health.php’ ); } ); // Prevent direct access to the Site Health page. add_action( ‘current_screen’, function () { $screen = get_current_screen(); if ( ‘site-health’ ===…Continue reading

Disable Automatic Updates Emails (copy)

// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading

Disable Automatic Updates Emails (copy)

// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );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

Disable Posts Post Type

// Remove side menu add_action( ‘admin_menu’, function () { remove_menu_page( ‘edit.php’ ); } ); // Remove +New post in top Admin Menu Bar add_action( ‘admin_bar_menu’, function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘new-post’ ); }, 999 ); // Remove Quick Draft…Continue reading