Disable Application Passwords
add_filter(‘wp_is_application_passwords_available’, ‘__return_false’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘wp_is_application_passwords_available’, ‘__return_false’);Continue reading
// Return a 404 page for author pages if accessed directly. add_action( ‘template_redirect’, function () { if ( is_author() ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } ); // Remove the author links. add_filter( ‘author_link’, ‘__return_empty_string’, 1000…Continue reading
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘core-block-patterns’ ); });Continue reading
add_filter( ‘allowed_block_types_all’, function ( $allowed_block_types, $block_editor_context ) { // List here the blocks you want to disallow. https://developer.wordpress.org/block-editor/reference-guides/core-blocks/ $disallowed_blocks = array( ‘core/navigation’, ‘core/query’, ); if ( ! is_array( $allowed_block_types ) || empty( $allowed_block_types ) ) { $registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); $allowed_block_types…Continue reading
add_action( ‘wp_default_scripts’, function ( $scripts ) { if ( ! is_admin() && isset( $scripts->registered[‘jquery’] ) ) { $script = $scripts->registered[‘jquery’]; if ( ! empty( $script->deps ) ) { $script->deps = array_diff( $script->deps, array( ‘jquery-migrate’ ) ); } } }, 150…Continue reading
add_action( ‘admin_init’, function() { remove_action(‘admin_color_scheme_picker’, ‘admin_color_scheme_picker’); });Continue reading
remove_action(‘enqueue_block_editor_assets’, ‘wp_enqueue_editor_block_directory_assets’);Continue reading
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_action( ‘init’, function() { remove_action( ‘wp_scheduled_delete’, ‘wp_scheduled_delete’ ); } );Continue reading