get_the_author_{$field}

FILTER wp-includes\author-template.php (ligne 195) github
Filters the value of the requested user metadata. The filter name is dynamic and depends on the $field parameter of the function.

Paramètres

Entrée :
$value, $user_id, $original_user_id
Sortie :
@param string    $value            The value of the metadata.
@param int       $user_id          The user ID for the value.
@param int|false $original_user_id The original user ID, as passed to the function.

Utilisation

// Modifier la valeur avec le filtre 'get_the_author_{$field}'
add_filter('get_the_author_{$field}', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...