[wp-trac] [WordPress Trac] #35250: Enable developer to omit "internal" taxonomies from return value of get_taxonomies()
WordPress Trac
noreply at wordpress.org
Tue Dec 29 04:44:15 UTC 2015
#35250: Enable developer to omit "internal" taxonomies from return value of
get_taxonomies()
--------------------------+-----------------------------
Reporter: MikeSchinkel | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
I frequently use one or two taxonomies in a project that users should
never see, but plugins that use the `get_taxonomies()` function are able
to display my internal taxonomies to users. ` get_taxonomies()` does not
filter for `show_in_nav_menu` or `show_in_nav_menu` _(and probably should
not.)_ so I can't correct this proactively. Thus I would like to be able
to filter out my internal taxonomies so they will be invisible to plugins
and themes.
I am uploading a patch that adds a `'get_taxonomies'` filter for this.
Another option would be to introduce a `'internal'` property at taxonomy
registration and then filter for that being `false` in `get_taxonomies()`
and probably elsewhere, or introduce the idea of underscore prefixed
taxonomies being hidden.
Any of those would work for me. Thanks in advance for considering.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35250>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list