diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.rpm wordpress/wp-admin/includes/class-wp-upgrader.php --- wordpress/wp-admin/includes/class-wp-upgrader.php.rpm 2014-12-16 20:54:23.000000000 +0100 +++ wordpress/wp-admin/includes/class-wp-upgrader.php 2014-12-22 06:46:28.487097611 +0100 @@ -2141,6 +2141,9 @@ class Core_Upgrader extends WP_Upgrader } } + // RPM: nether allow core update + return false; + // 1: If we're already on that version, not much point in updating? if ( $offered_ver == $wp_version ) return false; @@ -2372,7 +2375,7 @@ class WP_Automatic_Updater { */ public function is_disabled() { // Background updates are disabled if you don't want file changes. - if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) + if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) return true; if ( defined( 'WP_INSTALLING' ) ) diff -up wordpress/wp-admin/includes/update.php.rpm wordpress/wp-admin/includes/update.php --- wordpress/wp-admin/includes/update.php.rpm 2014-11-30 12:28:24.000000000 +0100 +++ wordpress/wp-admin/includes/update.php 2014-12-22 06:46:28.487097611 +0100 @@ -211,8 +211,6 @@ function update_nag() { } echo "
$msg
"; diff -up wordpress/wp-includes/capabilities.php.rpm wordpress/wp-includes/capabilities.php --- wordpress/wp-includes/capabilities.php.rpm 2014-12-01 02:34:24.000000000 +0100 +++ wordpress/wp-includes/capabilities.php 2014-12-22 06:46:28.487097611 +0100 @@ -1255,7 +1255,7 @@ function map_meta_cap( $cap, $user_id ) // Disallow the file editors. if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ) $caps[] = 'do_not_allow'; - elseif ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) + elseif ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) $caps[] = 'do_not_allow'; elseif ( is_multisite() && ! is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; @@ -1273,7 +1273,7 @@ function map_meta_cap( $cap, $user_id ) case 'update_core': // Disallow anything that creates, deletes, or updates core, plugin, or theme files. // Files in uploads are excepted. - if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) { + if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) { $caps[] = 'do_not_allow'; } elseif ( is_multisite() && ! is_super_admin( $user_id ) ) { $caps[] = 'do_not_allow'; diff -up wordpress/wp-includes/update.php.rpm wordpress/wp-includes/update.php --- wordpress/wp-includes/update.php.rpm 2014-12-22 06:48:34.883575009 +0100 +++ wordpress/wp-includes/update.php 2014-12-22 06:48:44.144609988 +0100 @@ -624,9 +624,6 @@ function _maybe_update_themes() { * @since 3.1.0 */ function wp_schedule_update_checks() { - if ( !wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING') ) - wp_schedule_event(time(), 'twicedaily', 'wp_version_check'); - if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') ) wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); @@ -669,8 +666,6 @@ if ( ( ! is_main_site() && ! is_network_ } add_action( 'admin_init', '_maybe_update_core' ); -add_action( 'wp_version_check', 'wp_version_check' ); -add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); add_action( 'load-plugins.php', 'wp_update_plugins' ); add_action( 'load-update.php', 'wp_update_plugins' );