diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 15ccacb767..698a0699cc 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -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 ] ); diff --git a/tests/phpunit/tests/taxonomy.php b/tests/phpunit/tests/taxonomy.php index 6b7e88007b..69dc1a8180 100644 --- a/tests/phpunit/tests/taxonomy.php +++ b/tests/phpunit/tests/taxonomy.php @@ -1044,9 +1044,6 @@ class Tests_Taxonomy extends WP_UnitTestCase { wp_set_object_terms( $post_id, array(), $tax ); $term = wp_get_post_terms( $post_id, $tax ); $this->assertSame( array(), $term ); - - unregister_taxonomy( $tax ); - $this->assertSame( get_option( 'default_term_' . $tax ), false ); } /**