wp_get_attachment_link_attributes

FILTER wp-includes\post-template.php (ligne 1690) github
Filters the list of attachment link attributes.

Paramètres

Entrée :
array( 'href' => $url
Sortie :
@param array $attributes An array of attributes for the link markup,
@param int   $id         Post ID.

Utilisation

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

function ma_fonction_filtre(array( 'href' => $url) {
    // Modifier la valeur
    return array( 'href' => $url;
}

Actualités

Chargement des actualités...