Opened 10 years ago
Closed 10 years ago
#29189 closed enhancement (fixed)
post/comment IN and NOT IN params for WP_Comment_Query
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | has-patch |
Focuses: | Cc: |
Description
WP_Comment_Query would be much more useful if it natively supported the following parameters: 'post_id__in'
, 'post_id__not_in'
, 'comment_id__in'
, 'comment_id__not_in'
. (One possible use case: a plugin that hides certain comments based on user permissions.)
The attached patch is a simple implementation of these four parameters, with unit tests.
Attachments (2)
Change History (11)
#3
@
10 years ago
- Milestone changed from Future Release to 4.1
- Owner set to boonebgorges
- Status changed from new to assigned
#4
follow-up:
↓ 6
@
10 years ago
- Keywords needs-docs added
In looking at WP_Comment_Query::query()
I notice that it's generally devoid of inline documentation. I'd at the very least prefer to see some single-line comments explaining what's being parsed for these four added arguments, as well as an @since 4.1.0
tag for the added arguments.
Looks like the default args aren't documented in here either, but we'll take care of that over in #28298.
This ticket was mentioned in IRC in #wordpress-dev by boonebgorges. View the logs.
10 years ago
#6
in reply to:
↑ 4
@
10 years ago
- Keywords needs-docs removed
Replying to DrewAPicture:
In looking at
WP_Comment_Query::query()
I notice that it's generally devoid of inline documentation. I'd at the very least prefer to see some single-line comments explaining what's being parsed for these four added arguments, as well as an@since 4.1.0
tag for the added arguments.
Looks like the default args aren't documented in here either, but we'll take care of that over in #28298.
29189.2.patch adds inline comments, @since
for the new params, and missing @ticket
numbers for the tests.
#7
@
10 years ago
The added docs in 29189.2.patch look great!
4.1