Make WordPress Core


Ignore:
Timestamp:
09/25/2012 05:26:19 AM (13 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-includes/taxonomy.php

    r21951 r21996  
    14001400
    14011401    if ( empty($terms) ) {
    1402         wp_cache_add( $cache_key, array(), 'terms', 86400 ); // one day
     1402        wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS );
    14031403        $terms = apply_filters('get_terms', array(), $taxonomies, $args);
    14041404        return $terms;
     
    14511451    }
    14521452
    1453     wp_cache_add( $cache_key, $terms, 'terms', 86400 ); // one day
     1453    wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
    14541454
    14551455    $terms = apply_filters('get_terms', $terms, $taxonomies, $args);
Note: See TracChangeset for help on using the changeset viewer.