rest_oembed_ttl

FILTER wp-includes\class-wp-oembed-controller.php (ligne 240) github
Filters the oEmbed TTL value (time to live). Similar to the {@see 'oembed_ttl'} filter, but for the REST API oEmbed proxy endpoint.

Paramètres

Entrée :
DAY_IN_SECONDS, $url, $args
Sortie :
@param int    $time    Time to live (in seconds).
@param string $url     The attempted embed URL.
@param array  $args    An array of embed request arguments.

Utilisation

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

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

Actualités

Chargement des actualités...