wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_is_numeric_array › WordPress Function

Da4.4.0
Deprecaton/a
wp_is_numeric_array ( $data )
Parametri:
  • (mixed) $data Variable to check.
    Richiesto:
Ritorna:
  • (bool) Whether the variable is a list.
Definito a:
Codex:

Determines if the variable is a numeric-indexed array.



Sorgenti

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