wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_is_numeric_array › WordPress Function

Depuis4.4.0
Dépréciéen/a
wp_is_numeric_array ( $data )
Paramètres:
  • (mixed) $data Variable to check.
    Requis: Oui
Retourne:
  • (bool) Whether the variable is a list.
Défini(e) dans:
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;
}