From d2c95cede34dfaa9e15227ea918da7b5543b4a03 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 11 Apr 2021 13:42:25 +0000 Subject: [PATCH] Coding Standards: Simplify the check for parent terms in `export_wp()`. This is more consistent with similar checks elsewhere in core. See #52627. git-svn-id: https://develop.svn.wordpress.org/trunk@50699 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/export.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php index d33e2ffafb..852f7d54ad 100644 --- a/src/wp-admin/includes/export.php +++ b/src/wp-admin/includes/export.php @@ -169,7 +169,7 @@ function export_wp( $args = array() ) { // Put categories in order with no child going before its parent. while ( $cat = array_shift( $categories ) ) { - if ( 0 == $cat->parent || isset( $cats[ $cat->parent ] ) ) { + if ( ! $cat->parent || isset( $cats[ $cat->parent ] ) ) { $cats[ $cat->term_id ] = $cat; } else { $categories[] = $cat; @@ -178,7 +178,7 @@ function export_wp( $args = array() ) { // Put terms in order with no child going before its parent. while ( $t = array_shift( $custom_terms ) ) { - if ( 0 == $t->parent || isset( $terms[ $t->parent ] ) ) { + if ( ! $t->parent || isset( $terms[ $t->parent ] ) ) { $terms[ $t->term_id ] = $t; } else { $custom_terms[] = $t;