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.

git-svn-id: https://develop.svn.wordpress.org/trunk@21996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-09-25 05:26:19 +00:00
parent 853793ab16
commit 774a12be83
29 changed files with 97 additions and 90 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ function install_popular_tags( $args = array() ) {
if ( is_wp_error($tags) )
return $tags;
set_site_transient('poptags_' . $key, $tags, 10800); // 3 * 60 * 60 = 10800
set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS );
return $tags;
}