When a plugin enables Background Plugin updates, don't deactivate the plugin during update as we require a browser to reactivate it afterwards. See #22704

Built from https://develop.svn.wordpress.org/trunk@25817


git-svn-id: http://core.svn.wordpress.org/trunk@25729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-10-16 19:48:10 +00:00
parent 766b6d3842
commit ed07bab4b4
1 changed files with 4 additions and 0 deletions

View File

@ -662,6 +662,10 @@ class Plugin_Upgrader extends WP_Upgrader {
if ( is_wp_error($return) ) //Bypass.
return $return;
// When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it
if ( defined( 'DOING_CRON' ) && DOING_CRON )
return $return;
$plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
if ( empty($plugin) )
return new WP_Error('bad_request', $this->strings['bad_request']);