rest_is_array( mixed $maybe_array )

Determines if a given value is array-like.


Parameters Parameters

$maybe_array

(mixed) (Required) The value being evaluated.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: wp-includes/rest-api.php

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


Top ↑

Changelog Changelog

Changelog
Version Description
5.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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