mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 23:11:53 +01:00
Taxonomy: Retain default term option when unregistering taxos.
No longer delete the default term option in `unregister_taxonomy()` to improve database performance. Since taxonomies are registered at runtime and can't be unregistered unless they're already registered, prior to this change the option was created and deleted on each request. Deleting the option should occur on a one-time opperation such as plugin deactivation. Follow up to [48480]. Props dlh. Fixes #54472. Built from https://develop.svn.wordpress.org/trunk@53669 git-svn-id: http://core.svn.wordpress.org/trunk@53228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
228bbf3f7f
commit
1ace1a4d2b
@ -580,11 +580,6 @@ function unregister_taxonomy( $taxonomy ) {
|
||||
$taxonomy_object->remove_rewrite_rules();
|
||||
$taxonomy_object->remove_hooks();
|
||||
|
||||
// Remove custom taxonomy default term option.
|
||||
if ( ! empty( $taxonomy_object->default_term ) ) {
|
||||
delete_option( 'default_term_' . $taxonomy_object->name );
|
||||
}
|
||||
|
||||
// Remove the taxonomy.
|
||||
unset( $wp_taxonomies[ $taxonomy ] );
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-53665';
|
||||
$wp_version = '6.1-alpha-53669';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user