WP_REST_Meta_Fields::check_meta_is_array( mixed $value, WP_REST_Request $request, string $param )

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


Parameters

$value

(Required) The meta value submitted in the request.

$request

(Required) Full details about the request.

$param

(Required) The parameter name.


Return

(WP_Error|string) The meta array, if valid, otherwise an error.


Source

File: wp-includes/rest-api/fields/class-wp-rest-meta-fields.php

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

		return $value;
	}

Changelog

Changelog
Version Description
WP-4.7.0 Introduced.