diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 58e8de83bc..f53b75ce00 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -916,7 +916,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c $number = get_comments_number( $id ); - if ( 0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status ) { + if ( 0 == $number && !comments_open() && !pings_open() ) { echo '' . $none . ''; return; } @@ -987,7 +987,7 @@ function get_comment_reply_link($args = array(), $comment = null, $post = null) $comment = get_comment($comment); $post = get_post($post); - if ( 'open' != $post->comment_status ) + if ( !comments_open($post->ID) ) return false; $link = ''; diff --git a/xmlrpc.php b/xmlrpc.php index f02184f5f8..bc4e92139e 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -519,8 +519,8 @@ class wp_xmlrpc_server extends IXR_Server { } // Determine comment and ping settings. - $allow_comments = ("open" == $page->comment_status) ? 1 : 0; - $allow_pings = ("open" == $page->ping_status) ? 1 : 0; + $allow_comments = comments_open($page->ID) ? 1 : 0; + $allow_pings = pings_open($page->ID) ? 1 : 0; // Format page date. $page_date = mysql2date("Ymd\TH:i:s", $page->post_date);