Make WordPress Core


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

    r21664 r21996  
    539539
    540540    $feed->set_feed_url($url);
    541     $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));
     541    $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
    542542    do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
    543543    $feed->init();
Note: See TracChangeset for help on using the changeset viewer.