mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
Coding Standards: Simplify the check for parent terms in export_wp()
.
This is more consistent with similar checks elsewhere in core. See #52627. Built from https://develop.svn.wordpress.org/trunk@50699 git-svn-id: http://core.svn.wordpress.org/trunk@50308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3034f1b1c
commit
c569c157f0
@ -169,7 +169,7 @@ function export_wp( $args = array() ) {
|
|||||||
|
|
||||||
// Put categories in order with no child going before its parent.
|
// Put categories in order with no child going before its parent.
|
||||||
while ( $cat = array_shift( $categories ) ) {
|
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;
|
$cats[ $cat->term_id ] = $cat;
|
||||||
} else {
|
} else {
|
||||||
$categories[] = $cat;
|
$categories[] = $cat;
|
||||||
@ -178,7 +178,7 @@ function export_wp( $args = array() ) {
|
|||||||
|
|
||||||
// Put terms in order with no child going before its parent.
|
// Put terms in order with no child going before its parent.
|
||||||
while ( $t = array_shift( $custom_terms ) ) {
|
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;
|
$terms[ $t->term_id ] = $t;
|
||||||
} else {
|
} else {
|
||||||
$custom_terms[] = $t;
|
$custom_terms[] = $t;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-alpha-50698';
|
$wp_version = '5.8-alpha-50699';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user