Opened 12 years ago
Closed 12 years ago
#29189 closed enhancement (fixed)
post/comment IN and NOT IN params for WP_Comment_Query
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Comments | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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)
#4
follow-up:
↓ 6
@
12 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.
12 years ago
#6
in reply to: ↑ 4
@
12 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.0tag 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
@
12 years ago
The added docs in 29189.2.patch look great!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
4.1