wp_is_numeric_array

The timeline below displays how wordpress function wp_is_numeric_array has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.4

/**
 * Determines if the variable is a numeric-indexed array.
 *
 * @since 4.4.0
 *
 * @param mixed $data Variable to check.
 * @return bool Whether the variable is a list.
 */
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;
}