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



rest_is_array › WordPress Function

Since5.5.0
Deprecatedn/a
rest_is_array ( $maybe_array )
Parameters:
  • (mixed) $maybe_array The value being evaluated.
    Required: Yes
Returns:
  • (bool)
Defined at:
Codex:

Determines if a given value is array-like.



Source

function rest_is_array( $maybe_array ) {
	if ( is_scalar( $maybe_array ) ) {
		$maybe_array = wp_parse_list( $maybe_array );
	}

	return wp_is_numeric_array( $maybe_array );
}