Ticket #33982: 33982-numeric.diff
| File 33982-numeric.diff, 739 bytes (added by , 10 years ago) |
|---|
-
src/wp-includes/functions.php
3177 3177 } 3178 3178 3179 3179 /** 3180 * Determines if the variable is a numeric-indexed array. 3181 * 3182 * @since 4.4.0 3183 * 3184 * @param mixed $data Variable to check. 3185 * @return bool Whether the variable is a list. 3186 */ 3187 function wp_is_numeric_array( $data ) { 3188 if ( ! is_array( $data ) ) { 3189 return false; 3190 } 3191 3192 $keys = array_keys( $data ); 3193 $string_keys = array_filter( $keys, 'is_string' ); 3194 return count( $string_keys ) === 0; 3195 } 3196 3197 /** 3180 3198 * Filters a list of objects, based on a set of key => value arguments. 3181 3199 * 3182 3200 * @since 3.0.0