Make WordPress Core

Changeset 28253


Ignore:
Timestamp:
05/05/2014 08:25:46 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Use a time constant in get_theme_feature_list() and File_Upload_Upgrader.

props GaVrA.
fixes #28124.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

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

    r28137 r28253  
    16801680
    16811681            // schedule a cleanup for 2 hours from now in case of failed install
    1682             wp_schedule_single_event( time() + 7200, 'upgrader_scheduled_cleanup', array( $this->id ) );
     1682            wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) );
    16831683
    16841684        } elseif ( is_numeric( $_GET[$urlholder] ) ) {
  • trunk/src/wp-admin/includes/theme.php

    r28145 r28253  
    239239
    240240    if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) )
    241         set_site_transient( 'wporg_theme_feature_list', array(), 10800);
     241        set_site_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
    242242
    243243    if ( !$feature_list ) {
     
    250250        return $features;
    251251
    252     set_site_transient( 'wporg_theme_feature_list', $feature_list, 10800 );
     252    set_site_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
    253253
    254254    $category_translations = array(
Note: See TracChangeset for help on using the changeset viewer.