WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#51264 new defect (bug)

There is no option to remove default_term using register_taxonomy() or unregister_taxonomy()

Reported by: danielpietrasik Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Taxonomy Keywords:
Focuses: Cc:

Description

  1. I registered a new taxonomy using register_taxonomy() function.
  1. I set default_term.
  1. After that i removed default_term (I changed my mind).

The function register_taxonomy() did not remove default_term. The default_term is still selected.

It's not possible to clear old value of default_term by register_taxonomy().

The function unregister_taxonomy() also doesn't work.

Change History (3)

#1 @danielpietrasik
4 months ago

If we know that default_term already exists. We can use delete_option to remove default_term, but in my opinion its not a good solution. The delete_option should be build-in in register_taxonomy() function or/and unregister_taxonomy() function.

Last edited 4 months ago by danielpietrasik (previous) (diff)

#2 @SergeyBiryukov
4 months ago

  • Component changed from General to Taxonomy

#3 @johnbillion
4 months ago

  • Version set to 5.5
Note: See TracTickets for help on using tickets.