Changeset 18087
- Timestamp:
- 06/01/2011 02:24:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r17928 r18087 1966 1966 return $posts; 1967 1967 1968 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); 1969 if ( ! in_array( $posts[0]->post_type, $post_types ) ) 1970 return $posts; 1971 1968 1972 $days_old = (int) get_option('close_comments_days_old'); 1969 1973 if ( !$days_old ) … … 2001 2005 $post = get_post($post_id); 2002 2006 2007 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); 2008 if ( ! in_array( $post->post_type, $post_types ) ) 2009 return $open; 2010 2003 2011 if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) 2004 2012 return false;
Note: See TracChangeset
for help on using the changeset viewer.