mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 09:10:06 +00:00
Cron API: Add a new wp_doing_cron() helper function.
This replaces `DOING_CRON` checks via the constant. Props tfrommen. Fixes #39591. git-svn-id: https://develop.svn.wordpress.org/trunk@40575 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -406,7 +406,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
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 )
|
||||
if ( wp_doing_cron() )
|
||||
return $return;
|
||||
|
||||
$plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
|
||||
|
||||
Reference in New Issue
Block a user