[wp-trac] [WordPress Trac] #46665: Add filter for taxonomies in get_taxonomies and get_object_taxonomies
WordPress Trac
noreply at wordpress.org
Wed Mar 27 12:04:43 UTC 2019
#46665: Add filter for taxonomies in get_taxonomies and get_object_taxonomies
-------------------------+-----------------------------
Reporter: mpol | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 5.1
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
It would be a good enhancement to be able to filter the taxonomies (not
the terms) in the respective functions that are used to retrieve the
taxonomies.
It can be used to order the postboxes for taxonomies on the post-edit
screen for example. For reference, there was a feature request for a
sorting plugin posted at:
https://wordpress.org/support/topic/cpt-ui-incompatibility/
It could also be used to filter out certain taxonomies.
The functions that could have this filter are get_taxonomies and
get_object_taxonomies. I am not sure if the filter should only be run when
objects are requested, or also if names are requested.
A good name for the filter might be 'get_taxonomies'.
Parameters would be $taxonomies and $output.
Is this something that is wanted in WordPress Core? If so, I can prepare a
patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46665>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list