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:
parent
766b6d3842
commit
ed07bab4b4
|
@ -662,6 +662,10 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||||
if ( is_wp_error($return) ) //Bypass.
|
if ( is_wp_error($return) ) //Bypass.
|
||||||
return $return;
|
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'] : '';
|
$plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
|
||||||
if ( empty($plugin) )
|
if ( empty($plugin) )
|
||||||
return new WP_Error('bad_request', $this->strings['bad_request']);
|
return new WP_Error('bad_request', $this->strings['bad_request']);
|
||||||
|
|
Loading…
Reference in New Issue