Skip to content

Commit 4696d7a

Browse files
SergeyBiryukovSergeyBiryukov
authored andcommitted
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60332 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d4a418f commit 4696d7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/taxonomy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,11 +2143,11 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
21432143
)
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
}
21532153
}

0 commit comments

Comments
 (0)