Changeset 6716 for trunk/wp-includes/comment-template.php
- Timestamp:
- 02/04/2008 08:27:45 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r6711 r6716 563 563 * @uses $post 564 564 * 565 * @param int $post_id An optional post ID to check instead of the current post. 565 566 * @return bool True if the comments are open 566 567 */ 567 function comments_open( ) {568 global $post; 569 if ( 'open' == $post->comment_status )570 return true;571 else572 return false;568 function comments_open( $post_id=NULL ) { 569 570 $_post = get_post($post_id); 571 572 $open = ( 'open' == $_post->comment_status ); 573 return apply_filters( 'comments_open', $open, $post_id ); 573 574 } 574 575 … … 579 580 * @uses $post 580 581 * 582 * @param int $post_id An optional post ID to check instead of the current post. 581 583 * @return bool True if pings are accepted 582 584 */ 583 function pings_open( ) {584 global $post; 585 if ( 'open' == $post->ping_status )586 return true; 587 else588 return false;585 function pings_open( $post_id=NULL ) { 586 587 $_post = get_post($post_id); 588 589 $open = ( 'open' == $post->ping_status ); 590 return apply_filters( 'pings_open', $open, $post_id ); 589 591 } 590 592
Note: See TracChangeset
for help on using the changeset viewer.