[wp-trac] [WordPress Trac] #36208: Comment queries should ignore comments associated with non-active custom post types
WordPress Trac
noreply at wordpress.org
Wed Mar 16 16:09:40 UTC 2016
#36208: Comment queries should ignore comments associated with non-active custom
post types
------------------------------------------+-----------------------------
Reporter: Clorith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Comments | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Changes (by rachelbaker):
* keywords: has-patch needs-unit-tests => needs-patch needs-unit-tests
Comment:
This issue isn't as straightforward as I first thought. My approach in
[attachment:36208.diff] won't work as written.
Comments don't have to be related to posts. Defaulting to only valid
post_types or valid post_statuses would actually exclude comments with a
`comment_post_ID` of `0` which we don't want to do.
We need to somehow limit hiding comments from related posts if the
`comment_post_ID > 0` AND the `post_type` of the related post is
registered.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36208#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list