wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_is_numeric_array › WordPress Function

Since4.4.0
Deprecatedn/a
wp_is_numeric_array ( $data )
Parameters:
  • (mixed) $data Variable to check.
    Required: Yes
Returns:
  • (bool) Whether the variable is a list.
Defined at:
Codex:

Determines if the variable is a numeric-indexed array.



Source

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;
}