Changeset 48665 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 07/28/2020 03:40:35 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r48664 r48665 445 445 $term = term_exists( $taxonomy_object->default_term['name'], $taxonomy ); 446 446 if ( $term ) { 447 update_option( 'default_t axonomy_' . $taxonomy_object->name, $term['term_id'] );447 update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] ); 448 448 } else { 449 449 $term = wp_insert_term( … … 458 458 // Update `term_id` in options. 459 459 if ( ! is_wp_error( $term ) ) { 460 update_option( 'default_t axonomy_' . $taxonomy_object->name, $term['term_id'] );460 update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] ); 461 461 } 462 462 } … … 509 509 // Remove custom taxonomy default term option. 510 510 if ( ! empty( $taxonomy_object->default_term ) ) { 511 delete_option( 'default_t axonomy_' . $taxonomy_object->name );511 delete_option( 'default_term_' . $taxonomy_object->name ); 512 512 } 513 513 … … 1835 1835 $taxonomy_object = get_taxonomy( $taxonomy ); 1836 1836 if ( ! empty( $taxonomy_object->default_term ) ) { 1837 $defaults['default'] = (int) get_option( 'default_t axonomy_' . $taxonomy );1837 $defaults['default'] = (int) get_option( 'default_term_' . $taxonomy ); 1838 1838 if ( $defaults['default'] === $term ) { 1839 1839 return 0;
Note: See TracChangeset
for help on using the changeset viewer.