Changeset 21996
- Timestamp:
- 09/25/2012 05:26:19 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/credits.php
r21021 r21996 31 31 return false; 32 32 33 set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day33 set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS ); 34 34 } 35 35 -
trunk/wp-admin/includes/class-wp-comments-list-table.php
r21985 r21996 336 336 337 337 $ptime = date( 'G', strtotime( $comment->comment_date ) ); 338 if ( ( abs( time() - $ptime ) ) < 86400)338 if ( ( abs( time() - $ptime ) ) < DAY_IN_SECONDS ) 339 339 $ptime = sprintf( __( '%s ago' ), human_time_diff( $ptime ) ); 340 340 else -
trunk/wp-admin/includes/class-wp-media-list-table.php
r21948 r21996 283 283 $m_time = $post->post_date; 284 284 $time = get_post_time( 'G', true, $post, false ); 285 if ( ( abs( $t_diff = time() - $time ) ) < 86400) {285 if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) { 286 286 if ( $t_diff < 0 ) 287 287 $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); -
trunk/wp-admin/includes/class-wp-plugins-list-table.php
r21914 r21996 71 71 } 72 72 73 set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400);73 set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), DAY_IN_SECONDS ); 74 74 75 75 if ( ! $screen->is_network ) { 76 76 $recently_activated = get_option( 'recently_activated', array() ); 77 77 78 $one_week = 7*24*60*60;79 78 foreach ( $recently_activated as $key => $time ) 80 if ( $time + $one_week< time() )79 if ( $time + WEEK_IN_SECONDS < time() ) 81 80 unset( $recently_activated[$key] ); 82 81 update_option( 'recently_activated', $recently_activated ); -
trunk/wp-admin/includes/class-wp-posts-list-table.php
r21974 r21996 581 581 $time_diff = time() - $time; 582 582 583 if ( $time_diff > 0 && $time_diff < 24*60*60)583 if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) 584 584 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 585 585 else -
trunk/wp-admin/includes/dashboard.php
r21944 r21996 917 917 if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { 918 918 $plugin_slugs = array_keys( get_plugins() ); 919 set_transient( 'plugin_slugs', $plugin_slugs, 86400);919 set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS ); 920 920 } 921 921 … … 1025 1025 ob_start(); 1026 1026 call_user_func_array( $callback, $args ); 1027 set_transient( $cache_key, ob_get_flush(), 43200); // Default lifetime in cache of 12 hours (same as the feeds)1027 set_transient( $cache_key, ob_get_flush(), 12 * HOUR_IN_SECONDS ); // Default lifetime in cache of 12 hours (same as the feeds) 1028 1028 } 1029 1029 … … 1216 1216 return false; 1217 1217 1218 set_site_transient( 'browser_' . $key, $response, 604800 ); // cache for 1 week1218 set_site_transient( 'browser_' . $key, $response, WEEK_IN_SECONDS ); 1219 1219 } 1220 1220 -
trunk/wp-admin/includes/import.php
r19712 r21996 90 90 91 91 // schedule a cleanup for one day from now in case of failed import or missing wp_import_cleanup() call 92 wp_schedule_single_event( time() + 86400, 'importer_scheduled_cleanup', array( $id ) );92 wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) ); 93 93 94 94 return array( 'file' => $file, 'id' => $id ); -
trunk/wp-admin/includes/nav-menu.php
r21944 r21996 1151 1151 function _wp_delete_orphaned_draft_menu_items() { 1152 1152 global $wpdb; 1153 $delete_timestamp = time() - ( 60*60*24*EMPTY_TRASH_DAYS);1153 $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS ); 1154 1154 1155 1155 // delete orphaned draft menu items -
trunk/wp-admin/includes/plugin-install.php
r21944 r21996 75 75 return $tags; 76 76 77 set_site_transient( 'poptags_' . $key, $tags, 10800); // 3 * 60 * 60 = 1080077 set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS ); 78 78 79 79 return $tags; -
trunk/wp-admin/includes/upgrade.php
r21823 r21996 512 512 513 513 $server_time = time()+date('Z'); 514 $weblogger_time = $server_time + $time_difference *3600;514 $weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS; 515 515 $gmt_time = time(); 516 516 517 $diff_gmt_server = ($gmt_time - $server_time) / 3600;518 $diff_weblogger_server = ($weblogger_time - $server_time) / 3600;517 $diff_gmt_server = ($gmt_time - $server_time) / HOUR_IN_SECONDS; 518 $diff_weblogger_server = ($weblogger_time - $server_time) / HOUR_IN_SECONDS; 519 519 $diff_gmt_weblogger = $diff_gmt_server - $diff_weblogger_server; 520 520 $gmt_offset = -$diff_gmt_weblogger; -
trunk/wp-admin/load-scripts.php
r21132 r21996 126 126 $compress = ( isset($_GET['c']) && $_GET['c'] ); 127 127 $force_gzip = ( $compress && 'gzip' == $_GET['c'] ); 128 $expires_offset = 31536000;128 $expires_offset = YEAR_IN_SECONDS; 129 129 $out = ''; 130 130 -
trunk/wp-admin/load-styles.php
r19684 r21996 105 105 $force_gzip = ( $compress && 'gzip' == $_GET['c'] ); 106 106 $rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] ); 107 $expires_offset = 31536000;107 $expires_offset = YEAR_IN_SECONDS; 108 108 $out = ''; 109 109 -
trunk/wp-includes/bookmark-template.php
r21241 r21996 79 79 if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) { 80 80 $title .= ' ('; 81 $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)));81 $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS))); 82 82 $title .= ')'; 83 83 } -
trunk/wp-includes/class-http.php
r21290 r21996 809 809 return false; 810 810 811 if ( false !== ( $option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours811 if ( false !== ( $option = get_option( 'disable_fsockopen' ) ) && time() - $option < 12 * HOUR_IN_SECONDS ) 812 812 return false; 813 813 -
trunk/wp-includes/comment.php
r21938 r21996 700 700 if ( current_user_can( 'manage_options' ) ) 701 701 return; // don't throttle admins 702 $hour_ago = gmdate( 'Y-m-d H:i:s', time() - 3600);702 $hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS ); 703 703 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 ) ) ) { 704 704 $time_lastcomment = mysql2date('U', $lasttime, false); … … 1982 1982 return $posts; 1983 1983 1984 if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60) ) {1984 if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) { 1985 1985 $posts[0]->comment_status = 'closed'; 1986 1986 $posts[0]->ping_status = 'closed'; … … 2017 2017 return $open; 2018 2018 2019 if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60) )2019 if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) 2020 2020 return false; 2021 2021 -
trunk/wp-includes/cron.php
r21954 r21996 23 23 // don't schedule a duplicate if there's already an identical event due in the next 10 minutes 24 24 $next = wp_next_scheduled($hook, $args); 25 if ( $next && $next <= $timestamp + 600)25 if ( $next && $next <= $timestamp + 10 * MINUTE_IN_SECONDS ) 26 26 return; 27 27 … … 207 207 $lock = get_transient('doing_cron'); 208 208 209 if ( $lock > $gmt_time + 10 *60)209 if ( $lock > $gmt_time + 10 * MINUTE_IN_SECONDS ) 210 210 $lock = 0; 211 211 … … 319 319 function wp_get_schedules() { 320 320 $schedules = array( 321 'hourly' => array( 'interval' => 3600, 'display' => __('Once Hourly') ),322 'twicedaily' => array( 'interval' => 43200, 'display' => __('Twice Daily') ),323 'daily' => array( 'interval' => 86400, 'display' => __('Once Daily') ),321 'hourly' => array( 'interval' => HOUR_IN_SECONDS, 'display' => __( 'Once Hourly' ) ), 322 'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __( 'Twice Daily' ) ), 323 'daily' => array( 'interval' => DAY_IN_SECONDS, 'display' => __( 'Once Daily' ) ), 324 324 ); 325 325 return array_merge( apply_filters( 'cron_schedules', array() ), $schedules ); -
trunk/wp-includes/default-constants.php
r21809 r21996 73 73 if ( !defined('SHORTINIT') ) 74 74 define('SHORTINIT', false); 75 76 // Constants for expressing human-interval intervals 77 // in their respective number of seconds. 78 define( 'MINUTE_IN_SECONDS', 60 ); 79 define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS ); 80 define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS ); 81 define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS ); 82 define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS ); 75 83 } 76 84 -
trunk/wp-includes/deprecated.php
r21943 r21996 985 985 if ( $show_updated ) 986 986 if (substr($row->link_updated_f, 0, 2) != '00') 987 $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';987 $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')'; 988 988 989 989 if ( '' != $title ) -
trunk/wp-includes/feed.php
r21664 r21996 539 539 540 540 $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 ) ); 542 542 do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); 543 543 $feed->init(); -
trunk/wp-includes/formatting.php
r21993 r21996 1899 1899 $datetime->setTimezone( new DateTimeZone('UTC') ); 1900 1900 $offset = $datetime->getOffset(); 1901 $datetime->modify( '+' . $offset / 3600. ' hours');1901 $datetime->modify( '+' . $offset / HOUR_IN_SECONDS . ' hours'); 1902 1902 $string_gmt = gmdate($format, $datetime->format('U')); 1903 1903 … … 1905 1905 } else { 1906 1906 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); 1907 $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * 3600);1907 $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * HOUR_IN_SECONDS); 1908 1908 } 1909 1909 return $string_gmt; … … 1925 1925 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); 1926 1926 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); 1927 $string_localtime = gmdate($format, $string_time + get_option('gmt_offset') *3600);1927 $string_localtime = gmdate($format, $string_time + get_option('gmt_offset') * HOUR_IN_SECONDS); 1928 1928 return $string_localtime; 1929 1929 } … … 1945 1945 $hours = intval(substr($timezone, 1, 2)); 1946 1946 $minutes = intval(substr($timezone, 3, 4)) / 60; 1947 $offset = $sign * 3600* ($hours + $minutes);1947 $offset = $sign * HOUR_IN_SECONDS * ($hours + $minutes); 1948 1948 } 1949 1949 return $offset; … … 1969 1969 $offset = iso8601_timezone_to_offset($date_bits[7]); 1970 1970 } else { // we don't have a timezone, so we assume user local timezone (not server's!) 1971 $offset = 3600* get_option('gmt_offset');1971 $offset = HOUR_IN_SECONDS * get_option('gmt_offset'); 1972 1972 } 1973 1973 … … 2094 2094 */ 2095 2095 function human_time_diff( $from, $to = '' ) { 2096 if ( empty( $to) )2096 if ( empty( $to ) ) 2097 2097 $to = time(); 2098 $diff = (int) abs( $to - $from);2099 if ( $diff <= 3600) {2100 $mins = round( $diff / 60);2101 if ( $mins <= 1) {2098 $diff = (int) abs( $to - $from ); 2099 if ( $diff <= HOUR_IN_SECONDS ) { 2100 $mins = round( $diff / MINUTE_IN_SECONDS ); 2101 if ( $mins <= 1 ) { 2102 2102 $mins = 1; 2103 2103 } 2104 2104 /* translators: min=minute */ 2105 $since = sprintf( _n('%s min', '%s mins', $mins), $mins);2106 } else if (($diff <= 86400) && ($diff > 3600)) {2107 $hours = round( $diff / 3600);2108 if ( $hours <= 1) {2105 $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins ); 2106 } elseif ( ( $diff <= DAY_IN_SECONDS ) && ( $diff > HOUR_IN_SECONDS ) ) { 2107 $hours = round( $diff / HOUR_IN_SECONDS ); 2108 if ( $hours <= 1 ) { 2109 2109 $hours = 1; 2110 2110 } 2111 $since = sprintf( _n('%s hour', '%s hours', $hours), $hours);2112 } elseif ( $diff >= 86400) {2113 $days = round( $diff / 86400);2114 if ( $days <= 1) {2111 $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours ); 2112 } elseif ( $diff >= DAY_IN_SECONDS ) { 2113 $days = round( $diff / DAY_IN_SECONDS ); 2114 if ( $days <= 1 ) { 2115 2115 $days = 1; 2116 2116 } 2117 $since = sprintf( _n('%s day', '%s days', $days), $days);2117 $since = sprintf( _n( '%s day', '%s days', $days ), $days ); 2118 2118 } 2119 2119 return $since; -
trunk/wp-includes/functions.php
r21922 r21996 60 60 switch ( $type ) { 61 61 case 'mysql': 62 return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600) ) );62 return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) ); 63 63 break; 64 64 case 'timestamp': 65 return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * 3600);65 return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); 66 66 break; 67 67 } … … 215 215 $weekday += 7; 216 216 217 $start = $day - 86400* ( $weekday - $start_of_week ); // The most recent week start day on or before $day218 $end = $start + 604799; // $start + 7 days - 1 second217 $start = $day - DAY_IN_SECONDS * ( $weekday - $start_of_week ); // The most recent week start day on or before $day 218 $end = $start + 7 * DAY_IN_SECONDS - 1; // $start + 7 days - 1 second 219 219 return compact( 'start', 'end' ); 220 220 } … … 935 935 */ 936 936 function cache_javascript_headers() { 937 $expiresOffset = 864000; // 10 days937 $expiresOffset = 10 * DAY_IN_SECONDS; 938 938 header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) ); 939 939 header( "Vary: Accept-Encoding" ); // Handle proxies … … 3118 3118 return false; 3119 3119 } 3120 return round( timezone_offset_get( $timezone_object, $datetime_object ) / 3600, 2 );3120 return round( timezone_offset_get( $timezone_object, $datetime_object ) / HOUR_IN_SECONDS, 2 ); 3121 3121 } 3122 3122 … … 3318 3318 global $wpdb; 3319 3319 3320 $delete_timestamp = time() - ( 60*60*24*EMPTY_TRASH_DAYS);3320 $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS ); 3321 3321 3322 3322 $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); -
trunk/wp-includes/js/tinymce/wp-tinymce.php
r17630 r21996 20 20 } 21 21 22 $expires_offset = 31536000;22 $expires_offset = YEAR_IN_SECONDS; 23 23 24 24 header('Content-Type: application/x-javascript; charset=UTF-8'); -
trunk/wp-includes/ms-functions.php
r21924 r21996 1409 1409 $dirsize[ $directory ][ 'size' ] = recurse_dirsize( $directory ); 1410 1410 1411 set_transient( 'dirsize_cache', $dirsize, 3600);1411 set_transient( 'dirsize_cache', $dirsize, HOUR_IN_SECONDS ); 1412 1412 return $dirsize[ $directory ][ 'size' ]; 1413 1413 } -
trunk/wp-includes/option.php
r21823 r21996 561 561 } 562 562 563 setcookie( 'wp-settings-' . $user->ID, $settings, time() + 31536000, SITECOOKIEPATH );564 setcookie( 'wp-settings-time-' . $user->ID, time(), time() + 31536000, SITECOOKIEPATH );563 setcookie( 'wp-settings-' . $user->ID, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH ); 564 setcookie( 'wp-settings-time-' . $user->ID, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH ); 565 565 $_COOKIE['wp-settings-' . $user->ID] = $settings; 566 566 } … … 725 725 726 726 update_user_option( $user->ID, 'user-settings', '', false ); 727 setcookie('wp-settings-' . $user->ID, ' ', time() - 31536000, SITECOOKIEPATH);727 setcookie('wp-settings-' . $user->ID, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH); 728 728 } 729 729 -
trunk/wp-includes/pluggable.php
r21917 r21996 530 530 // Allow a grace period for POST and AJAX requests 531 531 if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) 532 $expired += 3600;532 $expired += HOUR_IN_SECONDS; 533 533 534 534 // Quick check to see if an honest cookie has expired … … 695 695 do_action('clear_auth_cookie'); 696 696 697 setcookie( AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);698 setcookie( SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);699 setcookie( AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);700 setcookie( SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);701 setcookie( LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);702 setcookie( LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);697 setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN ); 698 setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN ); 699 setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN ); 700 setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN ); 701 setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); 702 setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); 703 703 704 704 // Old cookies 705 setcookie( AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);706 setcookie( AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);707 setcookie( SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);708 setcookie( SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);705 setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); 706 setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); 707 setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); 708 setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); 709 709 710 710 // Even older cookies 711 setcookie( USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);712 setcookie( PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);713 setcookie( USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);714 setcookie( PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);711 setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); 712 setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); 713 setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); 714 setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); 715 715 } 716 716 endif; … … 1230 1230 */ 1231 1231 function wp_nonce_tick() { 1232 $nonce_life = apply_filters( 'nonce_life', 86400);1232 $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS ); 1233 1233 1234 1234 return ceil(time() / ( $nonce_life / 2 )); -
trunk/wp-includes/taxonomy.php
r21951 r21996 1400 1400 1401 1401 if ( empty($terms) ) { 1402 wp_cache_add( $cache_key, array(), 'terms', 86400 ); // one day1402 wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS ); 1403 1403 $terms = apply_filters('get_terms', array(), $taxonomies, $args); 1404 1404 return $terms; … … 1451 1451 } 1452 1452 1453 wp_cache_add( $cache_key, $terms, 'terms', 86400 ); // one day1453 wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS ); 1454 1454 1455 1455 $terms = apply_filters('get_terms', $terms, $taxonomies, $args); -
trunk/wp-includes/update.php
r21874 r21996 156 156 switch ( current_filter() ) { 157 157 case 'load-update-core.php' : 158 $timeout = 60; // 1 min158 $timeout = MINUTE_IN_SECONDS; 159 159 break; 160 160 case 'load-plugins.php' : 161 161 case 'load-update.php' : 162 $timeout = 3600; // 1 hour162 $timeout = HOUR_IN_SECONDS; 163 163 break; 164 164 default : 165 $timeout = 43200; // 12 hours165 $timeout = 12 * HOUR_IN_SECONDS; 166 166 } 167 167 … … 265 265 switch ( current_filter() ) { 266 266 case 'load-update-core.php' : 267 $timeout = 60; // 1 min267 $timeout = MINUTE_IN_SECONDS; 268 268 break; 269 269 case 'load-themes.php' : 270 270 case 'load-update.php' : 271 $timeout = 3600; // 1 hour271 $timeout = HOUR_IN_SECONDS; 272 272 break; 273 273 default : 274 $timeout = 43200; // 12 hours274 $timeout = 12 * HOUR_IN_SECONDS; 275 275 } 276 276 … … 372 372 373 373 if ( isset( $current->last_checked ) && 374 43200> ( time() - $current->last_checked ) &&374 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) && 375 375 isset( $current->version_checked ) && 376 376 $current->version_checked == $wp_version ) … … 391 391 function _maybe_update_plugins() { 392 392 $current = get_site_transient( 'update_plugins' ); 393 if ( isset( $current->last_checked ) && 43200> ( time() - $current->last_checked ) )393 if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) 394 394 return; 395 395 wp_update_plugins(); … … 407 407 function _maybe_update_themes( ) { 408 408 $current = get_site_transient( 'update_themes' ); 409 if ( isset( $current->last_checked ) && 43200> ( time( ) - $current->last_checked ) )409 if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( ) - $current->last_checked ) ) 410 410 return; 411 411 -
trunk/wp-login.php
r21923 r21996 391 391 392 392 // 10 days 393 setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 864000, COOKIEPATH );393 setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH ); 394 394 395 395 wp_safe_redirect( wp_get_referer() ); -
trunk/wp-mail.php
r20682 r21996 31 31 set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL); 32 32 33 $time_difference = get_option('gmt_offset') * 3600;33 $time_difference = get_option('gmt_offset') * HOUR_IN_SECONDS; 34 34 35 35 $phone_delim = '::';
Note: See TracChangeset
for help on using the changeset viewer.