From 3df6964fc8ee549ebb116ff8b17bb0737442f5e5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 10 Jul 2020 12:46:09 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `WP_List_Util::filter()`. Correct comments per the documentation standards. See #49542, #49572. Built from https://develop.svn.wordpress.org/trunk@48421 git-svn-id: http://core.svn.wordpress.org/trunk@48190 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-list-util.php | 14 +++++--------- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/wp-includes/class-wp-list-util.php b/wp-includes/class-wp-list-util.php index 2cea88ac7d..0eef72c4a1 100644 --- a/wp-includes/class-wp-list-util.php +++ b/wp-includes/class-wp-list-util.php @@ -105,26 +105,22 @@ class WP_List_Util { $matched = 0; foreach ( $args as $m_key => $m_value ) { - if ( is_array( $obj ) ) { - - // Treat object as an array + // Treat object as an array. if ( array_key_exists( $m_key, $obj ) && ( $m_value == $obj[ $m_key ] ) ) { $matched++; } } elseif ( is_object( $obj ) ) { - - // Treat object as an object + // Treat object as an object. if ( isset( $obj->{$m_key} ) && ( $m_value == $obj->{$m_key} ) ) { $matched++; } } } - if ( - ( 'AND' === $operator && $matched == $count ) || - ( 'OR' === $operator && $matched > 0 ) || - ( 'NOT' === $operator && 0 == $matched ) + if ( ( 'AND' === $operator && $matched === $count ) + || ( 'OR' === $operator && $matched > 0 ) + || ( 'NOT' === $operator && 0 === $matched ) ) { $filtered[ $key ] = $obj; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8ca208a78f..2f45a2b824 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta1-48420'; +$wp_version = '5.5-beta1-48421'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.