Check the ‘meta’ value of a request is an associative array.
(mixed) (Required) The meta value submitted in the request.
(WP_REST_Request) (Required) Full details about the request.
(string) (Required) The parameter name.
(array|false) The meta array, if valid, false otherwise.
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;
} | Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_meta_fields/check_meta_is_array