[wp-trac] [WordPress Trac] #23422: Add query filter argument to register_taxonomy
WordPress Trac
noreply at wordpress.org
Mon May 23 16:06:07 UTC 2016
#23422: Add query filter argument to register_taxonomy
------------------------------------------+-----------------------------
Reporter: tifosi | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: administration
------------------------------------------+-----------------------------
Comment (by DrewAPicture):
Replying to [comment:14 tifosi]:
> @DrewAPicture Do you fully understand the concept of the ticket request?
Yeah, I think I have a pretty good understanding of how core works and
what you're asking :-)
> `show_admin_filter` is meant to be a select/dropdown filter for an
associated taxonomy's terms. As such if `show_admin_column` isn't set as
an argument for that taxonomy's register_taxonomy call then it's
counterintuitive to display the filter if the taxonomy column isn't also
displayed. That doesn't preclude though using it if you essentially want
the select filter to replace the in-column drill down method so unlinking
it may be an option.
The point is that they should realistically be mutually exclusive.
Developers do all sorts of different things with these screens and
deliberately tying one option to another makes it ''less'' flexible in the
long run.
> `show_admin_filter` isn't at all vague - it's semantically and
functionally related to `show_admin_column`, naming it `show_post_filter`
would imo cause confusion semantically linking it just to posts. It's
"filtering" the taxonomy it's an argument to, for the post-type it's
associated with.
>
> As the argument is tied to the taxonomy creation then if a taxonomy is
associated with a post-type - either through the register_taxonomy() call
or later with register_taxonomy_for_object_type then it would display for
whichever post-type admin list ui the taxonomy is associated with, whether
single or multiple.
Taxonomies can be associated with more than just post objects of any post
type, they can also be associated with comments, users, links, etc. So
I'll concede `show_post_filter` is too narrow. In that vein,
`show_admin_filter` is too vague. And yes, we can bikeshed all day but
lacking a patch the entire discussion is moot. :-)
@tifosi Would you like to submit a patch?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23422#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list