oembed_ttl

FILTER wp-includes\class-wp-embed.php (ligne 249) github
Filters the oEmbed TTL value (time to live).

Paramètres

Entrée :
DAY_IN_SECONDS, $url, $attr, $post_id
Sortie :
@param int    $time    Time to live (in seconds).
@param string $url     The attempted embed URL.
@param array  $attr    An array of shortcode attributes.
@param int    $post_id Post ID.

Utilisation

// Modifier la valeur avec le filtre 'oembed_ttl'
add_filter('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...