[wp-trac] [WordPress Trac] #43517: Adding support of default category term for custom taxonomies

WordPress Trac noreply at wordpress.org
Tue Jul 7 08:21:16 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 enrico.sorcinelli):

 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.

 Moreover I'd like to add some missing features like:

 - remove `default_taxonomy_{$taxonomy}` option on `unregister_taxonomy`
 - check and prevent to delete the default term for custom taxonomies like
 'wp_delete_term()` does for category taxonomy.

 So I refreshed the patch by updating also `default_term` parameter
 documentation (I leaved `string|array` type).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43517#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list