WordPress.org

Make WordPress Core

Changeset 48358


Ignore:
Timestamp:
07/07/2020 03:53:14 AM (7 months ago)
Author:
whyisjake
Message:

Coding standards: Fix a few phpcs errors to get tests passing.

See [48356], #43517.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r48356 r48358  
    443443    // Add default term.
    444444    if ( ! empty( $taxonomy_object->default_term ) ) {
    445         if ( $term = term_exists( $taxonomy_object->default_term['name'], $taxonomy ) ) {
     445        $term = term_exists( $taxonomy_object->default_term['name'], $taxonomy );
     446        if ( $term ) {
    446447            update_option( 'default_taxonomy_' . $taxonomy_object->name, $term['term_id'] );
    447448        } else {
     
    25162517
    25172518    // Default term for this taxonomy.
    2518     if ( empty( $terms ) && ! empty( $taxonomy_obj->default_term ) && ! empty( $default_term_id = get_option( 'default_taxonomy_' . $taxonomy ) ) ) {
     2519    $default_term_id = get_option( 'default_taxonomy_' . $taxonomy );
     2520    if ( empty( $terms ) && ! empty( $taxonomy_obj->default_term ) && ! empty( $default_term_id ) ) {
    25192521        $terms[] = (int) $default_term_id;
    25202522    }
Note: See TracChangeset for help on using the changeset viewer.