add_action( ‘admin_menu’, function() { remove_submenu_page(‘themes.php’, ‘site-editor.php’); }); add_action(‘admin_bar_menu’, function($wp_admin_bar) { $wp_admin_bar->remove_node(‘site-editor’); }, 250); add_action(‘admin_init’, function() { global $pagenow; if (‘site-editor.php’ === $pagenow) { wp_safe_redirect(admin_url()); exit; } });Continue reading
add_action( ‘admin_bar_menu’, function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘new-post’ ); }, 100 ); add_action( ‘admin_menu’, function () { remove_menu_page( ‘edit.php’ ); } );Continue reading
add_filter( ‘admin_email_check_interval’, ‘__return_false’ );Continue reading
add_action( ‘init’, function() { remove_action( ‘wp_scheduled_delete’, ‘wp_scheduled_delete’ ); } );Continue reading
add_action( ‘admin_init’, function() { if ( ! current_user_can( ‘administrator’ ) ) { wp_redirect( home_url() ); exit; } } );Continue reading
add_action( ‘admin_head’, function () { if ( current_user_can( ‘update_core’ ) ) { return; } remove_action( ‘admin_notices’, ‘update_nag’, 3 ); }, 1 );Continue reading
add_action( ‘enqueue_block_editor_assets’, function () { $script = “jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( ‘core/edit-post’ ).isFeatureActive( ‘fullscreenMode’ ); if ( isFullscreenMode ) { wp.data.dispatch( ‘core/edit-post’ ).toggleFeature( ‘fullscreenMode’ ); } });”; wp_add_inline_script( ‘wp-blocks’, $script ); } );Continue reading
if ( ! defined( ‘AUTOSAVE_INTERVAL’ ) ) { // Change 5 to the number of minutes you want to use. define( ‘AUTOSAVE_INTERVAL’, 5 * MINUTE_IN_SECONDS ); }Continue reading
add_filter( ‘wp_revisions_to_keep’, function( $limit ) { // Limit to the last 20 revisions. Change 20 to whatever limit you want. return 20; } );Continue reading