Opened 2 years ago

Last modified 2 years ago

#17026 new enhancement

parent_dropdown() is not filterable

Reported by: kevinB 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)

parent-dropdown_filters_3.2.patch (812 bytes) - added by kevinB 2 years ago.
query filter for parent_dropdown()

Download all attachments as: .zip

Change History (4)

kevinB2 years ago

query filter for parent_dropdown()

comment:1 follow-up: ↓ 3   scribu2 years ago

  • 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

comment:3 in reply to: ↑ 1   kevinB2 years ago

  • 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?

Note: See TracTickets for help on using tickets.