Make WordPress Core


Ignore:
Timestamp:
05/06/2017 02:29:01 PM (9 years ago)
Author:
swissspidy
Message:

Cron API: Add a new wp_doing_cron() helper function.

This replaces DOING_CRON checks via the constant.

Props tfrommen.
Fixes #39591.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    r39211 r40575  
    407407
    408408                // When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it
    409                 if ( defined( 'DOING_CRON' ) && DOING_CRON )
     409                if ( wp_doing_cron() )
    410410                        return $return;
    411411
Note: See TracChangeset for help on using the changeset viewer.