mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Don't show comments template if post is empty
git-svn-id: https://develop.svn.wordpress.org/trunk@11839 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -813,7 +813,7 @@ function wp_comment_form_unfiltered_html_nonce() {
|
||||
function comments_template( $file = '/comments.php', $separate_comments = false ) {
|
||||
global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
|
||||
|
||||
if ( ! (is_single() || is_page() || $withcomments) )
|
||||
if ( !(is_single() || is_page() || $withcomments) || empty($post) )
|
||||
return;
|
||||
|
||||
if ( empty($file) )
|
||||
|
||||
Reference in New Issue
Block a user