Make WordPress Core

Changeset 60332


Ignore:
Timestamp:
06/22/2025 06:40:01 PM (15 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove unnecessary isset() check in wp_delete_term().

The top of the foreach loop already continues early if $default is not set.

Follow-up to [5533], [10813], [50389].

Props justlevine.
See #63268.

File:
1 edited

Legend:

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

    r60282 r60332  
    21442144                );
    21452145
    2146                 if ( 1 === count( $terms ) && isset( $default ) ) {
     2146                if ( 1 === count( $terms ) ) {
    21472147                        $terms = array( $default );
    21482148                } else {
    21492149                        $terms = array_diff( $terms, array( $term ) );
    2150                         if ( isset( $default ) && isset( $force_default ) && $force_default ) {
     2150                        if ( isset( $force_default ) && $force_default ) {
    21512151                                $terms = array_merge( $terms, array( $default ) );
    21522152                        }
Note: See TracChangeset for help on using the changeset viewer.