mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Taxonomy: Rename the default_taxonomy_$taxonomy option key to default_term_$taxonomy.
This better reflects the purpose of the option. Follow-up to [48356], [48480]. See #43517. git-svn-id: https://develop.svn.wordpress.org/trunk@48665 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1001,7 +1001,7 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
|
||||
// Test default category.
|
||||
$term = wp_get_post_terms( $post_id, $tax );
|
||||
$this->assertSame( get_option( 'default_taxonomy_' . $tax ), $term[0]->term_id );
|
||||
$this->assertSame( get_option( 'default_term_' . $tax ), $term[0]->term_id );
|
||||
|
||||
// Test default term deletion.
|
||||
$this->assertSame( wp_delete_term( $term[0]->term_id, $tax ), 0 );
|
||||
@@ -1020,7 +1020,7 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
)
|
||||
);
|
||||
$term = wp_get_post_terms( $post_id, $tax );
|
||||
$this->assertSame( get_option( 'default_taxonomy_' . $tax ), $term[0]->term_id );
|
||||
$this->assertSame( get_option( 'default_term_' . $tax ), $term[0]->term_id );
|
||||
|
||||
// wp_set_object_terms shouldn't assign default category.
|
||||
wp_set_object_terms( $post_id, array(), $tax );
|
||||
@@ -1028,6 +1028,6 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
$this->assertSame( array(), $term );
|
||||
|
||||
unregister_taxonomy( $tax );
|
||||
$this->assertSame( get_option( 'default_taxonomy_' . $tax ), false );
|
||||
$this->assertSame( get_option( 'default_term_' . $tax ), false );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user