Summery Summery
Parses the “_embed” parameter into the list of resources to embed.
Syntax Syntax
Parameters Parameters
- $embed
-
(Required) Raw "_embed" parameter value.
Return Return
(true|string[]) Either true to embed all embeds, or a list of relations to embed.
Source Source
File: wp-includes/rest-api.php
if ( 'array' === $args['type'] ) { if ( ! rest_is_array( $value ) ) { /* translators: 1: Parameter, 2: Type name. */ return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'array' ) ); } $value = rest_sanitize_array( $value ); if ( isset( $args['items'] ) ) { foreach ( $value as $index => $v ) { $is_valid = rest_validate_value_from_schema( $v, $args['items'], $param . '[' . $index . ']' ); if ( is_wp_error( $is_valid ) ) {
Advertisement
Changelog Changelog
Version | Description |
---|---|
5.4.0 | Introduced. |