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/file.php

    r39656 r40575  
    664664     * Require we have enough space to unzip the file and copy its contents, with a 10% buffer.
    665665     */
    666     if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
     666    if ( wp_doing_cron() ) {
    667667        $available_space = @disk_free_space( WP_CONTENT_DIR );
    668668        if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space )
     
    770770     * Require we have enough space to unzip the file and copy its contents, with a 10% buffer.
    771771     */
    772     if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
     772    if ( wp_doing_cron() ) {
    773773        $available_space = @disk_free_space( WP_CONTENT_DIR );
    774774        if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space )
Note: See TracChangeset for help on using the changeset viewer.