rest_is_array( mixed $maybe_array ): bool

In this article

Determines if a given value is array-like.

Parameters

$maybe_arraymixedrequired
The value being evaluated.

Return

bool

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

Changelog

VersionDescription
5.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.