On this page
apply_filters( "{$adjacent}_post_link", string $output, string $format, string $link, WP_Post $post, string $adjacent )
Filters the adjacent post link.
Description
The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, ‘next’ or ‘previous’.
Possible hook names include:
next_post_linkprevious_post_link
Parameters
$outputstring-
The adjacent post link.
$formatstring-
Link anchor format.
$linkstring-
Link permalink format.
$postWP_Post-
The adjacent post.
$adjacentstring-
Whether the post is previous or next.
Source
File: wp-includes/link-template.php. View all references
return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent );
Related
Used By
| Used By | Description |
|---|---|
| get_adjacent_post_link() wp-includes/link-template.php | Retrieves the adjacent post link. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/adjacent_post_link