Opened 3 years ago
Closed 2 years ago
#12904 closed enhancement (fixed)
get_comments(): Enable post_status, post_type
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Comments | Version: | |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | zeo@…, aaron@… |
Description
To better extend and improve get_comments() to be use in various ways. Enable get_comments() to retrieve comments based on post 'post status', or post 'post type'.
Currently, even with comment 'status' = approve, it will fetch all comments regardless of 'post status' or 'post type'.
Thoughts?
Attachments (1)
Change History (14)
comment:5
zeo
— 3 years ago
- Milestone changed from 3.1 to 3.0
This ticket need early attention, because of this changeset [14483]. Even though the comment in Private, or Draft? post is not accessible but it still appear in Recent Comments listing.
comment:6
nacin
— 3 years ago
- Keywords early needs-refresh dev-feedback needs-testing removed
Patch still does too much work. See also wp_parse_args.
comment:8
jorbin
— 3 years ago
- Cc aaron@… added
- Owner set to jorbin
- Status changed from new to assigned
I'm going to take a crack at this now.
comment:10
in reply to:
↑ 9
jorbin
— 3 years ago
It's to late in the process for 3.0 to modify the get_comments query. This will need some early attention in the 3.1 cycle to make sure there are no performance penalties
comment:11
nacin
— 3 years ago
- Milestone changed from Awaiting Triage to Future Release
comment:12
ryan
— 2 years ago
- Milestone changed from Future Release to 3.2
Patch is doing a bit too much work. We have various helper functions here that can help: get_post_stati, get_post_types, wp_parse_args|str, etc.