Make WordPress Core


Ignore:
Timestamp:
07/28/2020 03:40:35 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/taxonomy.php

    r48480 r48665  
    10021002                // Test default category.
    10031003                $term = wp_get_post_terms( $post_id, $tax );
    1004                 $this->assertSame( get_option( 'default_taxonomy_' . $tax ), $term[0]->term_id );
     1004                $this->assertSame( get_option( 'default_term_' . $tax ), $term[0]->term_id );
    10051005
    10061006                // Test default term deletion.
     
    10211021                );
    10221022                $term    = wp_get_post_terms( $post_id, $tax );
    1023                 $this->assertSame( get_option( 'default_taxonomy_' . $tax ), $term[0]->term_id );
     1023                $this->assertSame( get_option( 'default_term_' . $tax ), $term[0]->term_id );
    10241024
    10251025                // wp_set_object_terms shouldn't assign default category.
     
    10291029
    10301030                unregister_taxonomy( $tax );
    1031                 $this->assertSame( get_option( 'default_taxonomy_' . $tax ), false );
     1031                $this->assertSame( get_option( 'default_term_' . $tax ), false );
    10321032        }
    10331033}
Note: See TracChangeset for help on using the changeset viewer.