WordPress.org

Make WordPress Core

Changeset 10982


Ignore:
Timestamp:
04/17/2009 07:02:55 AM (9 years ago)
Author:
ryan
Message:

Use comments_open() and pings_open(). Props coffee2code. fixes #9557

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r10961 r10982  
    917917    $number = get_comments_number( $id );
    918918
    919     if ( 0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status ) {
     919    if ( 0 == $number && !comments_open() && !pings_open() ) {
    920920        echo '<span' . ((!empty($css_class)) ? ' class="' . $css_class . '"' : '') . '>' . $none . '</span>';
    921921        return;
     
    988988    $post = get_post($post);
    989989
    990     if ( 'open' != $post->comment_status )
     990    if ( !comments_open($post->ID) )
    991991        return false;
    992992
  • trunk/xmlrpc.php

    r10932 r10982  
    520520
    521521            // Determine comment and ping settings.
    522             $allow_comments = ("open" == $page->comment_status) ? 1 : 0;
    523             $allow_pings = ("open" == $page->ping_status) ? 1 : 0;
     522            $allow_comments = comments_open($page->ID) ? 1 : 0;
     523            $allow_pings = pings_open($page->ID) ? 1 : 0;
    524524
    525525            // Format page date.
Note: See TracChangeset for help on using the changeset viewer.