Feeds: Comments on attachments display in the site-wide comments RSS feed.

Individual attachment pages already have their own RSS comment feed, and would be expected to be included in the site-wide comments RSS feed.

Props jbrinley. 
Fixes #15610


Built from https://develop.svn.wordpress.org/trunk@36138


git-svn-id: http://core.svn.wordpress.org/trunk@36104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2015-12-31 17:16:27 +00:00
parent f13881d4e3
commit 4aa970e0e8
2 changed files with 2 additions and 2 deletions

View File

@ -3193,7 +3193,7 @@ class WP_Query {
$cgroupby = "$wpdb->comments.comment_id";
} else { // Other non singular e.g. front
$cjoin = "JOIN $wpdb->posts ON ( $wpdb->comments.comment_post_ID = $wpdb->posts.ID )";
$cwhere = "WHERE post_status = 'publish' AND comment_approved = '1'";
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' && post_type = 'attachment' ) ) AND comment_approved = '1'";
$cgroupby = '';
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36137';
$wp_version = '4.5-alpha-36138';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.