wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



rest_parse_embed_param › WordPress Function

Od5.4.0
Przestarzałyn/a
rest_parse_embed_param ( $embed )
Parametry:
  • (string|array) $embed Raw "_embed" parameter value.
    Wymagane: Tak
Powrót:
  • (true|string[]) Either true to embed all embeds, or a list of relations to embed.
Zdefiniowane na:
Codex:

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



Źródło

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;
}