diff --git a/wp-content/mu-plugins/disable-updates.php b/wp-content/mu-plugins/disable-updates.php index 32bbc234106555070e38e3a433c6d74223434a93..d63a8b9937f97fa90ea247f537a80403625eea09 100644 --- a/wp-content/mu-plugins/disable-updates.php +++ b/wp-content/mu-plugins/disable-updates.php @@ -59,6 +59,8 @@ class OS_Disable_WordPress_Updates { * @author scripts@schloebe.de */ function __construct() { + if (!defined('AI_CRON_SCRIPT')) { + add_action( 'admin_init', array(&$this, 'admin_init') ); /* @@ -92,8 +94,8 @@ class OS_Disable_WordPress_Updates { * 3.0 */ add_filter( 'pre_site_transient_update_core', array($this, 'last_checked_atm') ); - - + + /* * Filter schedule checks * @@ -128,6 +130,7 @@ class OS_Disable_WordPress_Updates { if( !defined( 'WP_AUTO_UPDATE_CORE') ) define( 'WP_AUTO_UPDATE_CORE', false ); add_filter( 'pre_http_request', array($this, 'block_request'), 10, 3 ); + } } @@ -139,13 +142,13 @@ class OS_Disable_WordPress_Updates { */ function admin_init() { if ( !function_exists("remove_action") ) return; - + /* * Remove 'update plugins' option from bulk operations select list */ global $current_user; $current_user->allcaps['update_plugins'] = 0; - + /* * Hide maintenance and update nag */ @@ -153,7 +156,7 @@ class OS_Disable_WordPress_Updates { remove_action( 'network_admin_notices', 'update_nag', 3 ); remove_action( 'admin_notices', 'maintenance_nag' ); remove_action( 'network_admin_notices', 'maintenance_nag' ); - + /* * Disable Theme Updates @@ -263,8 +266,8 @@ class OS_Disable_WordPress_Updates { } return $event; } - - + + /** * Override version check info * @@ -272,12 +275,12 @@ class OS_Disable_WordPress_Updates { */ public function last_checked_atm( $t ) { include( ABSPATH . WPINC . '/version.php' ); - + $current = new stdClass; $current->updates = array(); $current->version_checked = $wp_version; $current->last_checked = time(); - + return $current; } }