wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_is_numeric_array › WordPress Function

Od4.4.0
Przestarzałyn/a
wp_is_numeric_array ( $data )
Parametry:
  • (mixed) $data Variable to check.
    Wymagane: Tak
Powrót:
  • (bool) Whether the variable is a list.
Zdefiniowane na:
Codex:

Determines if the variable is a numeric-indexed array.



Źródło

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