rest_parse_embed_param

The timeline below displays how wordpress function rest_parse_embed_param has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * Parses the "_embed" parameter into the list of resources to embed.
 *
 * @since 5.4.0
 *
 * @param string|array $embed Raw "_embed" parameter value.
 * @return true|string[] Either true to embed all embeds, or a list of relations to embed.
 */
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;
}