enclosure_links

FILTER wp-includes\functions.php (ligne 945) github
Filters the list of enclosure links before querying the database. Allows for the addition and/or removal of potential enclosures to save to postmeta before checking the database for existing enclosures.

Paramètres

Entrée :
$post_links, $post->ID
Sortie :
@param string[] $post_links An array of enclosure links.
@param int      $post_id    Post ID.

Utilisation

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

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

Actualités

Chargement des actualités...