pre_get_avatar

FILTER wp-includes\pluggable.php (ligne 3249) github
Allows the HTML for a user's avatar to be returned early. Returning a non-null value will effectively short-circuit get_avatar(), passing the value through the {@see 'get_avatar'} filter and returning early.

Paramètres

Entrée :
null, $id_or_email, $args
Sortie :
@param string|null $avatar      HTML for the user's avatar. Default null.
@param mixed       $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,
@param array       $args        Arguments passed to get_avatar_url(), after processing.

Utilisation

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

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

Actualités

Chargement des actualités...