rest_is_array() WordPress Function

The rest_is_array() function is used to check whether an array has any elements left after removing all the elements that have already been processed.

rest_is_array( mixed $maybe_array ) #

Determines if a given value is array-like.


Parameters

$maybe_array

(mixed)(Required)The value being evaluated.


Top ↑

Return

(bool)


Top ↑

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
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More