Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#46665 closed enhancement (duplicate)

Add filter for taxonomies in get_taxonomies and get_object_taxonomies

Reported by: mpol's profile mpol Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Taxonomy Keywords:
Focuses: Cc:


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:
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.

Change History (1)

#1 @boonebgorges
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @mpol - Thanks for the ticket! There's an existing ticket requesting a get_taxonomies filter. Let's merge this conversation with that one. #35250

Note: See TracTickets for help on using tickets.