[wp-trac] [WordPress Trac] #51264: There is no option to remove default_term using register_taxonomy() or unregister_taxonomy()

WordPress Trac noreply at wordpress.org
Tue Sep 8 09:29:20 UTC 2020


#51264: There is no option to remove default_term using register_taxonomy() or
unregister_taxonomy()
-----------------------------+------------------------------
 Reporter:  danielpietrasik  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by danielpietrasik):

 If we know that {{{default_term}}} already exists. We can use
 [https://developer.wordpress.org/reference/functions/delete_option/
 delete_option] to remove {{{default_term}}}, but in my opinion its not a
 good solution. The
 [https://developer.wordpress.org/reference/functions/delete_option/
 delete_option] should be build-in in
 [https://developer.wordpress.org/reference/functions/register_taxonomy/
 register_taxonomy()] function.

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


More information about the wp-trac mailing list