Changeset 21996 for trunk/wp-includes/comment.php
- Timestamp:
- 09/25/2012 05:26:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.