pre_get_avatar_data

FILTER wp-includes\link-template.php (ligne 4492) github
Filters whether to retrieve the avatar URL early. Passing a non-null value in the 'url' member of the return array will effectively short circuit get_avatar_data(), passing the value through the {@see 'get_avatar_data'} filter and returning early.

Paramètres

Entrée :
$args, $id_or_email
Sortie :
@param array $args        Arguments passed to get_avatar_data(), after processing.
@param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash,

Utilisation

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

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

Actualités

Chargement des actualités...