Make WordPress Core


Ignore:
Timestamp:
09/25/2012 05:26:19 AM (11 years ago)
Author:
nacin
Message:

Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/import.php

    r19712 r21996  
    9090
    9191    // schedule a cleanup for one day from now in case of failed import or missing wp_import_cleanup() call
    92     wp_schedule_single_event( time() + 86400, 'importer_scheduled_cleanup', array( $id ) );
     92    wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) );
    9393
    9494    return array( 'file' => $file, 'id' => $id );
Note: See TracChangeset for help on using the changeset viewer.