public function run() { if ( $this->
is_disabled() ) { return;
} if ( !
is_main_network() || !
is_main_site() ) { return;
} if ( ! WP_Upgrader::
create_lock( 'auto_updater'
) ) { return;
} // Don't automatically run these things, as we'll handle it ourselves.
remove_action( 'upgrader_process_complete', array
( 'Language_Pack_Upgrader', 'async_upgrade'
), 20
);
remove_action( 'upgrader_process_complete', 'wp_version_check'
);
remove_action( 'upgrader_process_complete', 'wp_update_plugins'
);
remove_action( 'upgrader_process_complete', 'wp_update_themes'
);
// Next, plugins.
wp_update_plugins(); // Check for plugin updates.