Prevent Loading Translations
add_filter( ‘pre_load_textdomain’, ‘__return_false’, -5 ); add_filter( ‘pre_load_script_translations’, ‘__return_false’, -5 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘pre_load_textdomain’, ‘__return_false’, -5 ); add_filter( ‘pre_load_script_translations’, ‘__return_false’, -5 );Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading
add_filter( ‘block_editor_settings_all’, function( $settings, $context ) { $settings[‘enableOpenverseMediaCategory’] = false; return $settings; }, 10, 2 );Continue reading
add_action( ‘current_screen’, function () { $screen = get_current_screen(); // Add other custom post types here as needed. if ( in_array( $screen->id, array( ‘post’, ‘page’ ) ) ) { remove_theme_support( ‘block-templates’ ); } } );Continue reading
add_action( ‘template_redirect’, function() { if (is_404()) { wp_safe_redirect(home_url()); exit(); } } );Continue reading
add_filter( ‘site_transient_update_plugins’, ‘__return_empty_array’ ); add_filter( ‘transient_update_plugins’, ‘__return_empty_array’ ); add_filter( ‘site_transient_update_themes’, ‘__return_empty_array’ ); add_filter( ‘transient_update_themes’, ‘__return_empty_array’ ); // Disable core wp updates. add_filter( ‘pre_site_transient_update_core’, function ( $object = null ) { global $wp_version; // Return an empty object to prevent extra…Continue reading
add_action( ‘login_enqueue_scripts’, function() { echo ‘ ‘; } );Continue reading
add_filter( ‘show_recent_comments_widget_style’, ‘__return_false’ ); add_filter( ‘use_default_gallery_style’, ‘__return_false’ );Continue reading
add_filter( ‘get_avatar’, function( $avatar, $id_or_email, $size, $default, $alt ) { return ”; // Return an empty string to disable the gravatar }, 10, 5 );Continue reading
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘post-formats’ ); }, 11 );Continue reading