<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[21996] trunk: Introduce constants to allow for easier expression of time periods in seconds.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/21996">21996</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2012-09-25 05:26:19 +0000 (Tue, 25 Sep 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>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 <a href="http://core.trac.wordpress.org/ticket/20987">#20987</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincreditsphp">trunk/wp-admin/credits.php</a></li>
<li><a href="#trunkwpadminincludesclasswpcommentslisttablephp">trunk/wp-admin/includes/class-wp-comments-list-table.php</a></li>
<li><a href="#trunkwpadminincludesclasswpmedialisttablephp">trunk/wp-admin/includes/class-wp-media-list-table.php</a></li>
<li><a href="#trunkwpadminincludesclasswppluginslisttablephp">trunk/wp-admin/includes/class-wp-plugins-list-table.php</a></li>
<li><a href="#trunkwpadminincludesclasswppostslisttablephp">trunk/wp-admin/includes/class-wp-posts-list-table.php</a></li>
<li><a href="#trunkwpadminincludesdashboardphp">trunk/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunkwpadminincludesimportphp">trunk/wp-admin/includes/import.php</a></li>
<li><a href="#trunkwpadminincludesnavmenuphp">trunk/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunkwpadminincludesplugininstallphp">trunk/wp-admin/includes/plugin-install.php</a></li>
<li><a href="#trunkwpadminincludesupgradephp">trunk/wp-admin/includes/upgrade.php</a></li>
<li><a href="#trunkwpadminloadscriptsphp">trunk/wp-admin/load-scripts.php</a></li>
<li><a href="#trunkwpadminloadstylesphp">trunk/wp-admin/load-styles.php</a></li>
<li><a href="#trunkwpincludesbookmarktemplatephp">trunk/wp-includes/bookmark-template.php</a></li>
<li><a href="#trunkwpincludesclasshttpphp">trunk/wp-includes/class-http.php</a></li>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
<li><a href="#trunkwpincludescronphp">trunk/wp-includes/cron.php</a></li>
<li><a href="#trunkwpincludesdefaultconstantsphp">trunk/wp-includes/default-constants.php</a></li>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
<li><a href="#trunkwpincludesfeedphp">trunk/wp-includes/feed.php</a></li>
<li><a href="#trunkwpincludesformattingphp">trunk/wp-includes/formatting.php</a></li>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
<li><a href="#trunkwpincludesjstinymcewptinymcephp">trunk/wp-includes/js/tinymce/wp-tinymce.php</a></li>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwpincludesoptionphp">trunk/wp-includes/option.php</a></li>
<li><a href="#trunkwpincludespluggablephp">trunk/wp-includes/pluggable.php</a></li>
<li><a href="#trunkwpincludestaxonomyphp">trunk/wp-includes/taxonomy.php</a></li>
<li><a href="#trunkwpincludesupdatephp">trunk/wp-includes/update.php</a></li>
<li><a href="#trunkwploginphp">trunk/wp-login.php</a></li>
<li><a href="#trunkwpmailphp">trunk/wp-mail.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincreditsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/credits.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/credits.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/credits.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">                 if ( ! is_array( $results ) )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day
</del><ins>+                set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return $results;
</span></span></pre></div>
<a id="trunkwpadminincludesclasswpcommentslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-comments-list-table.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-comments-list-table.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/class-wp-comments-list-table.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -335,7 +335,7 @@
</span><span class="cx">                 $the_comment_status = wp_get_comment_status( $comment->comment_ID );
</span><span class="cx">
</span><span class="cx">                 $ptime = date( 'G', strtotime( $comment->comment_date ) );
</span><del>-                if ( ( abs( time() - $ptime ) ) < 86400 )
</del><ins>+                if ( ( abs( time() - $ptime ) ) < DAY_IN_SECONDS )
</ins><span class="cx">                         $ptime = sprintf( __( '%s ago' ), human_time_diff( $ptime ) );
</span><span class="cx">                 else
</span><span class="cx">                         $ptime = mysql2date( __( 'Y/m/d \a\t g:i A' ), $comment->comment_date );
</span></span></pre></div>
<a id="trunkwpadminincludesclasswpmedialisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-media-list-table.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-media-list-table.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/class-wp-media-list-table.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -282,7 +282,7 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         $m_time = $post->post_date;
</span><span class="cx">                         $time = get_post_time( 'G', true, $post, false );
</span><del>-                        if ( ( abs( $t_diff = time() - $time ) ) < 86400 ) {
</del><ins>+                        if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) {
</ins><span class="cx">                                 if ( $t_diff < 0 )
</span><span class="cx">                                         $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
</span><span class="cx">                                 else
</span></span></pre></div>
<a id="trunkwpadminincludesclasswppluginslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-plugins-list-table.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-plugins-list-table.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/class-wp-plugins-list-table.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -70,14 +70,13 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 );
</del><ins>+                set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), DAY_IN_SECONDS );
</ins><span class="cx">
</span><span class="cx">                 if ( ! $screen->is_network ) {
</span><span class="cx">                         $recently_activated = get_option( 'recently_activated', array() );
</span><span class="cx">
</span><del>-                        $one_week = 7*24*60*60;
</del><span class="cx">                         foreach ( $recently_activated as $key => $time )
</span><del>-                                if ( $time + $one_week < time() )
</del><ins>+                                if ( $time + WEEK_IN_SECONDS < time() )
</ins><span class="cx">                                         unset( $recently_activated[$key] );
</span><span class="cx">                         update_option( 'recently_activated', $recently_activated );
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkwpadminincludesclasswppostslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-posts-list-table.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-posts-list-table.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/class-wp-posts-list-table.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -580,7 +580,7 @@
</span><span class="cx">
</span><span class="cx">                                         $time_diff = time() - $time;
</span><span class="cx">
</span><del>-                                        if ( $time_diff > 0 && $time_diff < 24*60*60 )
</del><ins>+                                        if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS )
</ins><span class="cx">                                                 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
</span><span class="cx">                                         else
</span><span class="cx">                                                 $h_time = mysql2date( __( 'Y/m/d' ), $m_time );
</span></span></pre></div>
<a id="trunkwpadminincludesdashboardphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/dashboard.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/dashboard.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/dashboard.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -916,7 +916,7 @@
</span><span class="cx">
</span><span class="cx">         if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
</span><span class="cx">                 $plugin_slugs = array_keys( get_plugins() );
</span><del>-                set_transient( 'plugin_slugs', $plugin_slugs, 86400 );
</del><ins>+                set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins') ) as $feed => $label ) {
</span><span class="lines">@@ -1024,7 +1024,7 @@
</span><span class="cx">                 array_unshift( $args, $widget_id );
</span><span class="cx">                 ob_start();
</span><span class="cx">                 call_user_func_array( $callback, $args );
</span><del>-                set_transient( $cache_key, ob_get_flush(), 43200); // Default lifetime in cache of 12 hours (same as the feeds)
</del><ins>+                set_transient( $cache_key, ob_get_flush(), 12 * HOUR_IN_SECONDS ); // Default lifetime in cache of 12 hours (same as the feeds)
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return true;
</span><span class="lines">@@ -1215,7 +1215,7 @@
</span><span class="cx">                 if ( ! is_array( $response ) )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                set_site_transient( 'browser_' . $key, $response, 604800 ); // cache for 1 week
</del><ins>+                set_site_transient( 'browser_' . $key, $response, WEEK_IN_SECONDS );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return $response;
</span></span></pre></div>
<a id="trunkwpadminincludesimportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/import.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/import.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/import.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">         $id = wp_insert_attachment( $object, $file );
</span><span class="cx">
</span><span class="cx">         // schedule a cleanup for one day from now in case of failed import or missing wp_import_cleanup() call
</span><del>-        wp_schedule_single_event( time() + 86400, 'importer_scheduled_cleanup', array( $id ) );
</del><ins>+        wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) );
</ins><span class="cx">
</span><span class="cx">         return array( 'file' => $file, 'id' => $id );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/nav-menu.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/nav-menu.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/nav-menu.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -1150,7 +1150,7 @@
</span><span class="cx"> */
</span><span class="cx"> function _wp_delete_orphaned_draft_menu_items() {
</span><span class="cx">         global $wpdb;
</span><del>-        $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
</del><ins>+        $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
</ins><span class="cx">
</span><span class="cx">         // delete orphaned draft menu items
</span><span class="cx">         $menu_items_to_delete = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) );
</span></span></pre></div>
<a id="trunkwpadminincludesplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/plugin-install.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/plugin-install.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/plugin-install.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">         if ( is_wp_error($tags) )
</span><span class="cx">                 return $tags;
</span><span class="cx">
</span><del>-        set_site_transient('poptags_' . $key, $tags, 10800); // 3 * 60 * 60 = 10800
</del><ins>+        set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS );
</ins><span class="cx">
</span><span class="cx">         return $tags;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludesupgradephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/upgrade.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/upgrade.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/includes/upgrade.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -511,11 +511,11 @@
</span><span class="cx">         $time_difference = $all_options->time_difference;
</span><span class="cx">
</span><span class="cx">                 $server_time = time()+date('Z');
</span><del>-        $weblogger_time = $server_time + $time_difference*3600;
</del><ins>+        $weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS;
</ins><span class="cx">         $gmt_time = time();
</span><span class="cx">
</span><del>-        $diff_gmt_server = ($gmt_time - $server_time) / 3600;
-        $diff_weblogger_server = ($weblogger_time - $server_time) / 3600;
</del><ins>+        $diff_gmt_server = ($gmt_time - $server_time) / HOUR_IN_SECONDS;
+        $diff_weblogger_server = ($weblogger_time - $server_time) / HOUR_IN_SECONDS;
</ins><span class="cx">         $diff_gmt_weblogger = $diff_gmt_server - $diff_weblogger_server;
</span><span class="cx">         $gmt_offset = -$diff_gmt_weblogger;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminloadscriptsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/load-scripts.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/load-scripts.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/load-scripts.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">
</span><span class="cx"> $compress = ( isset($_GET['c']) && $_GET['c'] );
</span><span class="cx"> $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
</span><del>-$expires_offset = 31536000;
</del><ins>+$expires_offset = YEAR_IN_SECONDS;
</ins><span class="cx"> $out = '';
</span><span class="cx">
</span><span class="cx"> $wp_scripts = new WP_Scripts();
</span></span></pre></div>
<a id="trunkwpadminloadstylesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/load-styles.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/load-styles.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-admin/load-styles.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> $compress = ( isset($_GET['c']) && $_GET['c'] );
</span><span class="cx"> $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
</span><span class="cx"> $rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] );
</span><del>-$expires_offset = 31536000;
</del><ins>+$expires_offset = YEAR_IN_SECONDS;
</ins><span class="cx"> $out = '';
</span><span class="cx">
</span><span class="cx"> $wp_styles = new WP_Styles();
</span></span></pre></div>
<a id="trunkwpincludesbookmarktemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/bookmark-template.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/bookmark-template.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/bookmark-template.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">                 if ( $show_updated )
</span><span class="cx">                         if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) {
</span><span class="cx">                                 $title .= ' (';
</span><del>-                                $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)));
</del><ins>+                                $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)));
</ins><span class="cx">                                 $title .= ')';
</span><span class="cx">                         }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesclasshttpphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-http.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-http.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/class-http.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -808,7 +808,7 @@
</span><span class="cx">                 if ( ! function_exists( 'fsockopen' ) )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                if ( false !== ($option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours
</del><ins>+                if ( false !== ( $option = get_option( 'disable_fsockopen' ) ) && time() - $option < 12 * HOUR_IN_SECONDS )
</ins><span class="cx">                         return false;
</span><span class="cx">
</span><span class="cx">                 $is_ssl = isset( $args['ssl'] ) && $args['ssl'];
</span></span></pre></div>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/comment.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -699,7 +699,7 @@
</span><span class="cx">         global $wpdb;
</span><span class="cx">         if ( current_user_can( 'manage_options' ) )
</span><span class="cx">                 return; // don't throttle admins
</span><del>-        $hour_ago = gmdate( 'Y-m-d H:i:s', time() - 3600 );
</del><ins>+        $hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS );
</ins><span class="cx">         if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( `comment_author_IP` = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1", $hour_ago, $ip, $email ) ) ) {
</span><span class="cx">                 $time_lastcomment = mysql2date('U', $lasttime, false);
</span><span class="cx">                 $time_newcomment = mysql2date('U', $date, false);
</span><span class="lines">@@ -1981,7 +1981,7 @@
</span><span class="cx">         if ( ! $days_old )
</span><span class="cx">                 return $posts;
</span><span class="cx">
</span><del>-        if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) {
</del><ins>+        if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
</ins><span class="cx">                 $posts[0]->comment_status = 'closed';
</span><span class="cx">                 $posts[0]->ping_status = 'closed';
</span><span class="cx">         }
</span><span class="lines">@@ -2016,7 +2016,7 @@
</span><span class="cx">         if ( ! in_array( $post->post_type, $post_types ) )
</span><span class="cx">                 return $open;
</span><span class="cx">
</span><del>-        if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) )
</del><ins>+        if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         return $open;
</span></span></pre></div>
<a id="trunkwpincludescronphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/cron.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/cron.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/cron.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
</span><span class="cx">         // don't schedule a duplicate if there's already an identical event due in the next 10 minutes
</span><span class="cx">         $next = wp_next_scheduled($hook, $args);
</span><del>-        if ( $next && $next <= $timestamp + 600 )
</del><ins>+        if ( $next && $next <= $timestamp + 10 * MINUTE_IN_SECONDS )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         $crons = _get_cron_array();
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">         */
</span><span class="cx">         $lock = get_transient('doing_cron');
</span><span class="cx">
</span><del>-        if ( $lock > $gmt_time + 10*60 )
</del><ins>+        if ( $lock > $gmt_time + 10 * MINUTE_IN_SECONDS )
</ins><span class="cx">                 $lock = 0;
</span><span class="cx">
</span><span class="cx">         // don't run if another process is currently running it or more than once every 60 sec.
</span><span class="lines">@@ -318,9 +318,9 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_get_schedules() {
</span><span class="cx">         $schedules = array(
</span><del>-                'hourly' => array( 'interval' => 3600, 'display' => __('Once Hourly') ),
-                'twicedaily' => array( 'interval' => 43200, 'display' => __('Twice Daily') ),
-                'daily' => array( 'interval' => 86400, 'display' => __('Once Daily') ),
</del><ins>+                'hourly' => array( 'interval' => HOUR_IN_SECONDS, 'display' => __( 'Once Hourly' ) ),
+                'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __( 'Twice Daily' ) ),
+                'daily' => array( 'interval' => DAY_IN_SECONDS, 'display' => __( 'Once Daily' ) ),
</ins><span class="cx">         );
</span><span class="cx">         return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesdefaultconstantsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-constants.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-constants.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/default-constants.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -72,6 +72,14 @@
</span><span class="cx">
</span><span class="cx">         if ( !defined('SHORTINIT') )
</span><span class="cx">                 define('SHORTINIT', false);
</span><ins>+
+        // Constants for expressing human-interval intervals
+        // in their respective number of seconds.
+         define( 'MINUTE_IN_SECONDS', 60 );
+         define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS );
+         define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS );
+        define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS );
+         define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/deprecated.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -984,7 +984,7 @@
</span><span class="cx">
</span><span class="cx">                 if ( $show_updated )
</span><span class="cx">                         if (substr($row->link_updated_f, 0, 2) != '00')
</span><del>-                                $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';
</del><ins>+                                $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
</ins><span class="cx">
</span><span class="cx">                 if ( '' != $title )
</span><span class="cx">                         $title = ' title="' . $title . '"';
</span></span></pre></div>
<a id="trunkwpincludesfeedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/feed.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/feed.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -538,7 +538,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $feed->set_feed_url($url);
</span><del>-        $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));
</del><ins>+        $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
</ins><span class="cx">         do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
</span><span class="cx">         $feed->init();
</span><span class="cx">         $feed->handle_content_type();
</span></span></pre></div>
<a id="trunkwpincludesformattingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/formatting.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/formatting.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/formatting.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -1898,13 +1898,13 @@
</span><span class="cx">                 $datetime = new DateTime( $string );
</span><span class="cx">                 $datetime->setTimezone( new DateTimeZone('UTC') );
</span><span class="cx">                 $offset = $datetime->getOffset();
</span><del>-                $datetime->modify( '+' . $offset / 3600 . ' hours');
</del><ins>+                $datetime->modify( '+' . $offset / HOUR_IN_SECONDS . ' hours');
</ins><span class="cx">                 $string_gmt = gmdate($format, $datetime->format('U'));
</span><span class="cx">
</span><span class="cx">                 date_default_timezone_set('UTC');
</span><span class="cx">         } else {
</span><span class="cx">                 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
</span><del>-                $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * 3600);
</del><ins>+                $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * HOUR_IN_SECONDS);
</ins><span class="cx">         }
</span><span class="cx">         return $string_gmt;
</span><span class="cx"> }
</span><span class="lines">@@ -1924,7 +1924,7 @@
</span><span class="cx"> function get_date_from_gmt($string, $format = 'Y-m-d H:i:s') {
</span><span class="cx">         preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
</span><span class="cx">         $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
</span><del>-        $string_localtime = gmdate($format, $string_time + get_option('gmt_offset')*3600);
</del><ins>+        $string_localtime = gmdate($format, $string_time + get_option('gmt_offset') * HOUR_IN_SECONDS);
</ins><span class="cx">         return $string_localtime;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1944,7 +1944,7 @@
</span><span class="cx">                 $sign = (substr($timezone, 0, 1) == '+') ? 1 : -1;
</span><span class="cx">                 $hours = intval(substr($timezone, 1, 2));
</span><span class="cx">                 $minutes = intval(substr($timezone, 3, 4)) / 60;
</span><del>-                $offset = $sign * 3600 * ($hours + $minutes);
</del><ins>+                $offset = $sign * HOUR_IN_SECONDS * ($hours + $minutes);
</ins><span class="cx">         }
</span><span class="cx">         return $offset;
</span><span class="cx"> }
</span><span class="lines">@@ -1968,7 +1968,7 @@
</span><span class="cx">                 if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
</span><span class="cx">                         $offset = iso8601_timezone_to_offset($date_bits[7]);
</span><span class="cx">                 } else { // we don't have a timezone, so we assume user local timezone (not server's!)
</span><del>-                        $offset = 3600 * get_option('gmt_offset');
</del><ins>+                        $offset = HOUR_IN_SECONDS * get_option('gmt_offset');
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 $timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
</span><span class="lines">@@ -2093,28 +2093,28 @@
</span><span class="cx"> * @return string Human readable time difference.
</span><span class="cx"> */
</span><span class="cx"> function human_time_diff( $from, $to = '' ) {
</span><del>-        if ( empty($to) )
</del><ins>+        if ( empty( $to ) )
</ins><span class="cx">                 $to = time();
</span><del>-        $diff = (int) abs($to - $from);
-        if ($diff <= 3600) {
-                $mins = round($diff / 60);
-                if ($mins <= 1) {
</del><ins>+        $diff = (int) abs( $to - $from );
+        if ( $diff <= HOUR_IN_SECONDS ) {
+                $mins = round( $diff / MINUTE_IN_SECONDS );
+                if ( $mins <= 1 ) {
</ins><span class="cx">                         $mins = 1;
</span><span class="cx">                 }
</span><span class="cx">                 /* translators: min=minute */
</span><del>-                $since = sprintf(_n('%s min', '%s mins', $mins), $mins);
-        } else if (($diff <= 86400) && ($diff > 3600)) {
-                $hours = round($diff / 3600);
-                if ($hours <= 1) {
</del><ins>+                $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
+        } elseif ( ( $diff <= DAY_IN_SECONDS ) && ( $diff > HOUR_IN_SECONDS ) ) {
+                $hours = round( $diff / HOUR_IN_SECONDS );
+                if ( $hours <= 1 ) {
</ins><span class="cx">                         $hours = 1;
</span><span class="cx">                 }
</span><del>-                $since = sprintf(_n('%s hour', '%s hours', $hours), $hours);
-        } elseif ($diff >= 86400) {
-                $days = round($diff / 86400);
-                if ($days <= 1) {
</del><ins>+                $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
+        } elseif ( $diff >= DAY_IN_SECONDS ) {
+                $days = round( $diff / DAY_IN_SECONDS );
+                if ( $days <= 1 ) {
</ins><span class="cx">                         $days = 1;
</span><span class="cx">                 }
</span><del>-                $since = sprintf(_n('%s day', '%s days', $days), $days);
</del><ins>+                $since = sprintf( _n( '%s day', '%s days', $days ), $days );
</ins><span class="cx">         }
</span><span class="cx">         return $since;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/functions.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -59,10 +59,10 @@
</span><span class="cx"> function current_time( $type, $gmt = 0 ) {
</span><span class="cx">         switch ( $type ) {
</span><span class="cx">                 case 'mysql':
</span><del>-                        return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );
</del><ins>+                        return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );
</ins><span class="cx">                         break;
</span><span class="cx">                 case 'timestamp':
</span><del>-                        return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * 3600 );
</del><ins>+                        return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
</ins><span class="cx">                         break;
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -214,8 +214,8 @@
</span><span class="cx">         if ( $weekday < $start_of_week )
</span><span class="cx">                 $weekday += 7;
</span><span class="cx">
</span><del>-        $start = $day - 86400 * ( $weekday - $start_of_week ); // The most recent week start day on or before $day
-        $end = $start + 604799; // $start + 7 days - 1 second
</del><ins>+        $start = $day - DAY_IN_SECONDS * ( $weekday - $start_of_week ); // The most recent week start day on or before $day
+        $end = $start + 7 * DAY_IN_SECONDS - 1; // $start + 7 days - 1 second
</ins><span class="cx">         return compact( 'start', 'end' );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -934,7 +934,7 @@
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><span class="cx"> function cache_javascript_headers() {
</span><del>-        $expiresOffset = 864000; // 10 days
</del><ins>+        $expiresOffset = 10 * DAY_IN_SECONDS;
</ins><span class="cx">         header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) );
</span><span class="cx">         header( "Vary: Accept-Encoding" ); // Handle proxies
</span><span class="cx">         header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" );
</span><span class="lines">@@ -3117,7 +3117,7 @@
</span><span class="cx">         if ( false === $timezone_object || false === $datetime_object ) {
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><del>-        return round( timezone_offset_get( $timezone_object, $datetime_object ) / 3600, 2 );
</del><ins>+        return round( timezone_offset_get( $timezone_object, $datetime_object ) / HOUR_IN_SECONDS, 2 );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -3317,7 +3317,7 @@
</span><span class="cx"> function wp_scheduled_delete() {
</span><span class="cx">         global $wpdb;
</span><span class="cx">
</span><del>-        $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
</del><ins>+        $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
</ins><span class="cx">
</span><span class="cx">         $posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesjstinymcewptinymcephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/wp-tinymce.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/wp-tinymce.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/js/tinymce/wp-tinymce.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">         return @file_get_contents($path);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$expires_offset = 31536000;
</del><ins>+$expires_offset = YEAR_IN_SECONDS;
</ins><span class="cx">
</span><span class="cx"> header('Content-Type: application/x-javascript; charset=UTF-8');
</span><span class="cx"> header('Vary: Accept-Encoding'); // Handle proxies
</span></span></pre></div>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/ms-functions.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -1408,7 +1408,7 @@
</span><span class="cx">
</span><span class="cx">         $dirsize[ $directory ][ 'size' ] = recurse_dirsize( $directory );
</span><span class="cx">
</span><del>-        set_transient( 'dirsize_cache', $dirsize, 3600 );
</del><ins>+        set_transient( 'dirsize_cache', $dirsize, HOUR_IN_SECONDS );
</ins><span class="cx">         return $dirsize[ $directory ][ 'size' ];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesoptionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/option.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/option.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/option.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -560,8 +560,8 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        setcookie( 'wp-settings-' . $user->ID, $settings, time() + 31536000, SITECOOKIEPATH );
-        setcookie( 'wp-settings-time-' . $user->ID, time(), time() + 31536000, SITECOOKIEPATH );
</del><ins>+        setcookie( 'wp-settings-' . $user->ID, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH );
+        setcookie( 'wp-settings-time-' . $user->ID, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH );
</ins><span class="cx">         $_COOKIE['wp-settings-' . $user->ID] = $settings;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -724,7 +724,7 @@
</span><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         update_user_option( $user->ID, 'user-settings', '', false );
</span><del>-        setcookie('wp-settings-' . $user->ID, ' ', time() - 31536000, SITECOOKIEPATH);
</del><ins>+        setcookie('wp-settings-' . $user->ID, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpincludespluggablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/pluggable.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/pluggable.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/pluggable.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -529,7 +529,7 @@
</span><span class="cx">
</span><span class="cx">         // Allow a grace period for POST and AJAX requests
</span><span class="cx">         if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] )
</span><del>-                $expired += 3600;
</del><ins>+                $expired += HOUR_IN_SECONDS;
</ins><span class="cx">
</span><span class="cx">         // Quick check to see if an honest cookie has expired
</span><span class="cx">         if ( $expired < time() ) {
</span><span class="lines">@@ -694,24 +694,24 @@
</span><span class="cx"> function wp_clear_auth_cookie() {
</span><span class="cx">         do_action('clear_auth_cookie');
</span><span class="cx">
</span><del>-        setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
-        setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
-        setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
-        setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
-        setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-        setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
</del><ins>+        setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN );
+        setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN );
+        setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN );
+        setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN );
+        setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
+        setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
</ins><span class="cx">
</span><span class="cx">         // Old cookies
</span><del>-        setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-        setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
-        setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-        setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
</del><ins>+        setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
+        setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
+        setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
+        setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
</ins><span class="cx">
</span><span class="cx">         // Even older cookies
</span><del>-        setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-        setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-        setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
-        setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
</del><ins>+        setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
+        setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
+        setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
+        setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
</ins><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><span class="lines">@@ -1229,7 +1229,7 @@
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><span class="cx"> function wp_nonce_tick() {
</span><del>-        $nonce_life = apply_filters('nonce_life', 86400);
</del><ins>+        $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );
</ins><span class="cx">
</span><span class="cx">         return ceil(time() / ( $nonce_life / 2 ));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludestaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/taxonomy.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/taxonomy.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/taxonomy.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -1399,7 +1399,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( empty($terms) ) {
</span><del>-                wp_cache_add( $cache_key, array(), 'terms', 86400 ); // one day
</del><ins>+                wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS );
</ins><span class="cx">                 $terms = apply_filters('get_terms', array(), $taxonomies, $args);
</span><span class="cx">                 return $terms;
</span><span class="cx">         }
</span><span class="lines">@@ -1450,7 +1450,7 @@
</span><span class="cx">                 $terms = array_slice($terms, $offset, $number);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        wp_cache_add( $cache_key, $terms, 'terms', 86400 ); // one day
</del><ins>+        wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
</ins><span class="cx">
</span><span class="cx">         $terms = apply_filters('get_terms', $terms, $taxonomies, $args);
</span><span class="cx">         return $terms;
</span></span></pre></div>
<a id="trunkwpincludesupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/update.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/update.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-includes/update.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -155,14 +155,14 @@
</span><span class="cx">         // Check for update on a different schedule, depending on the page.
</span><span class="cx">         switch ( current_filter() ) {
</span><span class="cx">                 case 'load-update-core.php' :
</span><del>-                        $timeout = 60; // 1 min
</del><ins>+                        $timeout = MINUTE_IN_SECONDS;
</ins><span class="cx">                         break;
</span><span class="cx">                 case 'load-plugins.php' :
</span><span class="cx">                 case 'load-update.php' :
</span><del>-                        $timeout = 3600; // 1 hour
</del><ins>+                        $timeout = HOUR_IN_SECONDS;
</ins><span class="cx">                         break;
</span><span class="cx">                 default :
</span><del>-                        $timeout = 43200; // 12 hours
</del><ins>+                        $timeout = 12 * HOUR_IN_SECONDS;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
</span><span class="lines">@@ -264,14 +264,14 @@
</span><span class="cx">         // Check for update on a different schedule, depending on the page.
</span><span class="cx">         switch ( current_filter() ) {
</span><span class="cx">                 case 'load-update-core.php' :
</span><del>-                        $timeout = 60; // 1 min
</del><ins>+                        $timeout = MINUTE_IN_SECONDS;
</ins><span class="cx">                         break;
</span><span class="cx">                 case 'load-themes.php' :
</span><span class="cx">                 case 'load-update.php' :
</span><del>-                        $timeout = 3600; // 1 hour
</del><ins>+                        $timeout = HOUR_IN_SECONDS;
</ins><span class="cx">                         break;
</span><span class="cx">                 default :
</span><del>-                        $timeout = 43200; // 12 hours
</del><ins>+                        $timeout = 12 * HOUR_IN_SECONDS;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked );
</span><span class="lines">@@ -371,7 +371,7 @@
</span><span class="cx">         $current = get_site_transient( 'update_core' );
</span><span class="cx">
</span><span class="cx">         if ( isset( $current->last_checked ) &&
</span><del>-                43200 > ( time() - $current->last_checked ) &&
</del><ins>+                12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) &&
</ins><span class="cx">                 isset( $current->version_checked ) &&
</span><span class="cx">                 $current->version_checked == $wp_version )
</span><span class="cx">                 return;
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx"> */
</span><span class="cx"> function _maybe_update_plugins() {
</span><span class="cx">         $current = get_site_transient( 'update_plugins' );
</span><del>-        if ( isset( $current->last_checked ) && 43200 > ( time() - $current->last_checked ) )
</del><ins>+        if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) )
</ins><span class="cx">                 return;
</span><span class="cx">         wp_update_plugins();
</span><span class="cx"> }
</span><span class="lines">@@ -406,7 +406,7 @@
</span><span class="cx"> */
</span><span class="cx"> function _maybe_update_themes( ) {
</span><span class="cx">         $current = get_site_transient( 'update_themes' );
</span><del>-        if ( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) )
</del><ins>+        if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( ) - $current->last_checked ) )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         wp_update_themes();
</span></span></pre></div>
<a id="trunkwploginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-login.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-login.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-login.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // 10 days
</span><del>-        setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 864000, COOKIEPATH );
</del><ins>+        setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
</ins><span class="cx">
</span><span class="cx">         wp_safe_redirect( wp_get_referer() );
</span><span class="cx">         exit();
</span></span></pre></div>
<a id="trunkwpmailphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-mail.php (21995 => 21996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-mail.php        2012-09-25 05:01:59 UTC (rev 21995)
+++ trunk/wp-mail.php        2012-09-25 05:26:19 UTC (rev 21996)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">
</span><span class="cx"> set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
</span><span class="cx">
</span><del>-$time_difference = get_option('gmt_offset') * 3600;
</del><ins>+$time_difference = get_option('gmt_offset') * HOUR_IN_SECONDS;
</ins><span class="cx">
</span><span class="cx"> $phone_delim = '::';
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>