diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ad623d107b..e3f9896211 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4499,6 +4499,7 @@ function wp_parse_slug_list( $list ) { */ function wp_array_slice_assoc( $array, $keys ) { $slice = array(); + foreach ( $keys as $key ) { if ( isset( $array[ $key ] ) ) { $slice[ $key ] = $array[ $key ]; @@ -4508,24 +4509,6 @@ function wp_array_slice_assoc( $array, $keys ) { return $slice; } -/** - * Determines if the variable is a numeric-indexed array. - * - * @since 4.4.0 - * - * @param mixed $data Variable to check. - * @return bool Whether the variable is a list. - */ -function wp_is_numeric_array( $data ) { - if ( ! is_array( $data ) ) { - return false; - } - - $keys = array_keys( $data ); - $string_keys = array_filter( $keys, 'is_string' ); - return count( $string_keys ) === 0; -} - /** * Accesses an array in depth based on a path of keys. * @@ -4558,6 +4541,25 @@ function wp_array_get( $array, $path, $default = array() ) { return $array; } +/** + * Determines if the variable is a numeric-indexed array. + * + * @since 4.4.0 + * + * @param mixed $data Variable to check. + * @return bool Whether the variable is a list. + */ +function wp_is_numeric_array( $data ) { + if ( ! is_array( $data ) ) { + return false; + } + + $keys = array_keys( $data ); + $string_keys = array_filter( $keys, 'is_string' ); + + return count( $string_keys ) === 0; +} + /** * Filters a list of objects, based on a set of key => value arguments. * diff --git a/wp-includes/version.php b/wp-includes/version.php index d3d39b1b7f..bffd69a9fc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49143'; +$wp_version = '5.6-alpha-49144'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.