-
-
Save jordantrizz/934dd06dd00fd6229ed2c545c090985b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't disable on dev | |
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { | |
// Disable core update checking | |
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) ); | |
remove_action( 'admin_init', '_maybe_update_core' ); | |
remove_action( 'wp_version_check', 'wp_version_check' ); | |
// Remove the updates menu item | |
function yell_remove_update_menu() { | |
remove_submenu_page( 'index.php', 'update-core.php' ); | |
} | |
add_filter( 'admin_menu', 'yell_remove_update_menu' ); | |
// Disable plugin update checking | |
remove_action( 'load-plugins.php', 'wp_update_plugins' ); | |
remove_action( 'load-update.php', 'wp_update_plugins' ); | |
remove_action( 'load-update-core.php', 'wp_update_plugins' ); | |
remove_action( 'admin_init', '_maybe_update_plugins' ); | |
remove_action( 'wp_update_plugins', 'wp_update_plugins' ); | |
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) ); | |
// Disable theme update checking | |
remove_action( 'load-themes.php', 'wp_update_themes' ); | |
remove_action( 'load-update.php', 'wp_update_themes' ); | |
remove_action( 'load-update-core.php', 'wp_update_themes' ); | |
remove_action( 'admin_init', '_maybe_update_themes' ); | |
remove_action( 'wp_update_themes', 'wp_update_themes' ); | |
add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment