[wp-trac] [WordPress Trac] #43517: Adding support of default category term for custom taxonomies
WordPress Trac
noreply at wordpress.org
Tue Jul 7 15:16:45 UTC 2020
#43517: Adding support of default category term for custom taxonomies
--------------------------------------+------------------------
Reporter: enrico.sorcinelli | Owner: whyisjake
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.5
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: dev-feedback needs-patch | Focuses:
--------------------------------------+------------------------
Comment (by TimothyBlynJacobs):
> The term_exists call is made only for custom taxonomies for which has
been defined a default_term (and the default value in null).
> However term_exists() doesn't cache results anyway and adding it could
be an interesting new functionality.
Right, which is why I think we should first check if the default taxonomy
option is already set so we can avoid that uncached query.
> So I refreshed the patch by updating also default_term parameter
documentation (I leaved string|array type).
The patch has been committed already, so it needs to be refreshed against
trunk.
A separate thing. With the current version, is it possible to completely
remove all terms from a post? Looking at the code it seems like the
default term will always get added back.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43517#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list