WP_REST_Meta_Fields::check_meta_is_array()publicWP 4.7.0

Check the 'meta' value of a request is an associative array.

Method of the class: WP_REST_Meta_Fields{}

No Hooks.


Array|false. The meta array, if valid, false otherwise.


$WP_REST_Meta_Fields = new WP_REST_Meta_Fields();
$WP_REST_Meta_Fields->check_meta_is_array( $value, $request, $param );
$value(mixed) (required)
The meta value submitted in the request.
$request(WP_REST_Request) (required)
Full details about the request.
$param(string) (required)
The parameter name.


Since 4.7.0 Introduced.

WP_REST_Meta_Fields::check_meta_is_array() code WP 6.5.3

public function check_meta_is_array( $value, $request, $param ) {
	if ( ! is_array( $value ) ) {
		return false;

	return $value;