Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#51264 new defect (bug)

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

Reported by: danielpietrasik's profile 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 years 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 years ago by danielpietrasik (previous) (diff)

#2 @SergeyBiryukov
4 years ago

  • Component changed from General to Taxonomy

#3 @johnbillion
4 years ago

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