#28434 closed enhancement (fixed)
Add 'fields' parameter to WP_Comment_Query
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Comments | Keywords: | has-patch |
Focuses: | Cc: |
Description
The WP_Comment_Query
class should support a fields
argument, just like WP_Query
does.
Attachments (3)
Change History (15)
#1
@
11 years ago
- Keywords needs-unit-tests added
+1
I'm surprised this has never been suggested before (at least, my searching yielded nothing).
#5
@
11 years ago
28434.diff is more in line with how get_posts()
works. Not sure that id=>parent
should be comment_ID=>comment_post_ID
. Seems like comment_parent
might be more appropriate. Updated the unit tests as well, which didn't pass and didn't contain all new values for fields
.
#7
@
11 years ago
Because id=>parent is ambiguous, I'd recommend id=>comment_parent and id=>post_parent, or something. For now, I'd suggest we drop it entirely.
#8
@
11 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 29045:
#9
@
11 years ago
Reworked the tests to ensure we actually had integers. (If get_comments() returned objects and so did our factory create() method, this would have silently failed. Since our factory methods use core APIs under the hood, you never know.) Also used assertCount.
Adds support for 'fields' parameter