Created
July 23, 2013 12:46
-
-
Save sang4lv/6062089 to your computer and use it in GitHub Desktop.
Disable Wordpress Core, Plugins, and Themes Update
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 | |
| //Disable Theme Updates | |
| # 2.8 to 3.0: | |
| remove_action( 'load-themes.php', 'wp_update_themes' ); | |
| remove_action( 'load-update.php', 'wp_update_themes' ); | |
| remove_action( 'admin_init', '_maybe_update_themes' ); | |
| remove_action( 'wp_update_themes', 'wp_update_themes' ); | |
| add_filter( 'pre_transient_update_themes', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_update_themes' ); | |
| # 3.0: | |
| remove_action( 'load-update-core.php', 'wp_update_themes' ); | |
| add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_update_themes' ); | |
| //Disable Plugin Updates | |
| # 2.8 to 3.0: | |
| remove_action( 'load-plugins.php', 'wp_update_plugins' ); | |
| remove_action( 'load-update.php', 'wp_update_plugins' ); | |
| remove_action( 'admin_init', '_maybe_update_plugins' ); | |
| remove_action( 'wp_update_plugins', 'wp_update_plugins' ); | |
| add_filter( 'pre_transient_update_plugins', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_update_plugins' ); | |
| # 3.0: | |
| remove_action( 'load-update-core.php', 'wp_update_plugins' ); | |
| add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_update_plugins' ); | |
| //Diasable Core Updates | |
| # 2.8 to 3.0: | |
| remove_action( 'wp_version_check', 'wp_version_check' ); | |
| remove_action( 'admin_init', '_maybe_update_core' ); | |
| add_filter( 'pre_transient_update_core', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_version_check' ); | |
| # 3.0: | |
| add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_version_check' ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment