mirror of
https://github.com/kennethreitz-archive/wp-disable-updates.git
synced 2026-06-05 07:36:12 +00:00
new no-update logic
This commit is contained in:
+10
@@ -12,9 +12,19 @@ License: MIT License - http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
// No Upgrades to WordPress Core
|
||||
|
||||
# 2.3 to 2.7:
|
||||
add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
|
||||
add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
|
||||
|
||||
# 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;" ) );
|
||||
|
||||
# 3.0:
|
||||
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
|
||||
|
||||
// Disable Plugin Update Check
|
||||
remove_action( 'load-plugins.php', 'wp_update_plugins' );
|
||||
remove_action( 'load-update.php', 'wp_update_plugins' );
|
||||
|
||||
Reference in New Issue
Block a user