pre_oembed_result

FILTER wp-includes\class-wp-oembed.php (ligne 408) github
Filters the oEmbed result before any HTTP requests are made. This allows one to short-circuit the default logic, perhaps by replacing it with a routine that is more optimal for your setup. Returning a non-null value from the filter will effectively short-circuit retrieval and return the passed value instead.

Paramètres

Entrée :
null, $url, $args
Sortie :
@param null|string  $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
@param string       $url    The URL to the content that should be attempted to be embedded.
@param string|array $args   Optional. Additional arguments for retrieving embed HTML.

Utilisation

// Modifier la valeur avec le filtre 'pre_oembed_result'
add_filter('pre_oembed_result', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...