[wp-trac] [WordPress Trac] #45107: Taxonomies should only be allowed to support one object type
WordPress Trac
noreply at wordpress.org
Thu Oct 18 02:24:34 UTC 2018
#45107: Taxonomies should only be allowed to support one object type
-------------------------------------------------+-------------------------
Reporter: desrosj | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion needs-patch needs-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by flixos90):
Thanks for opening this! I had just thought about something along these
lines a few days ago.
Something that I strongly think we should do is separate concerns with
object types and post types. While the function uses the name “object
type”, most of core is only made to support and assume that parameter to
be a post type.
I’m thinking we should either:
* Clarify that you should only provide a post type here and, if we
actually want object type support for something else than “post”, handle
that in a new function.
* Or find a way to declare both the object type and the object subtype
(this is what the post type actually is in relation to the object type
“post”) in the function, but it needs to be through separate parameters.
Allowing to either specify an object type OR a subtype in the same
parameter just screams for future issues (such as “Do you mean the object
type ‘post’ or the post type ‘post’?).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45107#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list