{$adjacent}_post_link

FILTER wp-includes\link-template.php (ligne 2397) github
Filters the adjacent post link. The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include:  - `next_post_link`  - `previous_post_link`

Paramètres

Entrée :
$output, $format, $link, $post, $adjacent
Sortie :
@param string         $output   The adjacent post link.
@param string         $format   Link anchor format.
@param string         $link     Link permalink format.
@param WP_Post|string $post     The adjacent post. Empty string if no corresponding post exists.
@param string         $adjacent Whether the post is previous or next.

Utilisation

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

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

Actualités

Chargement des actualités...