wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



rest_parse_embed_param › WordPress Function

Da5.4.0
Deprecaton/a
rest_parse_embed_param ( $embed )
Parametri:
  • (string|array) $embed Raw "_embed" parameter value.
    Richiesto:
Ritorna:
  • (true|string[]) Either true to embed all embeds, or a list of relations to embed.
Definito a:
Codex:

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



Sorgenti

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