WordPress at a glance
function is not described

rest_parse_embed_param() WP 5.4.0

Parses the "_embed" parameter into the list of resources to embed.

No Hooks.

Return

true|String[]. Either true to embed all embeds, or a list of relations to embed.

Usage

rest_parse_embed_param( $embed );
$embed(string|array) (required)
Raw "_embed" parameter value.

Changelog

Since 5.4.0 Introduced.

Code of rest_parse_embed_param() WP 5.7.2

<?php
function rest_parse_embed_param( $embed ) {
	if ( ! $embed || 'true' === $embed || '1' === $embed ) {
		return true;
	}

	$rels = wp_parse_list( $embed );

	if ( ! $rels ) {
		return true;
	}

	return $rels;
}