Opened 2 years ago
Last modified 2 years ago
#17026 new enhancement
parent_dropdown() is not filterable
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | kevin@… |
Description
The parent_dropdown() function is no longer used by the WP core, but is not deprecated and remains in use by some plugins. Since other plugins may modify page editing access via existing WP_Query hooks, the query executed by parent_dropdown() also need to be filterable.
The corresponding patch adds query filter 'parent_dropdown_query'
Attachments (1)
Change History (4)
- Keywords close added
-1. We should instead make parent_dropdown() use get_posts() instead.
This would require that the 'fields' query var (#14777) accept an array and not just 'all' or 'ids'.
- Summary changed from add hook for parent_dropdown() to parent_dropdown() is not filterable
- Cc kevin@… added
- Keywords close removed
Replying to scribu:
-1. We should instead make parent_dropdown() use get_posts() instead.
This would require that the 'fields' query var (#14777) accept an array and not just 'all' or 'ids'.
Is there enough consensus on that idea to make such a patch likely to succeed?
Some other get_posts() conversion candidates (#17022, #17023, #17025) require DISTINCT or GROUP BY clauses. Are those also fair game to pass as get_posts() args?

query filter for parent_dropdown()