The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include: <ul> <li>next_post_link</li> <li>previous_post_link</li> </ul>
Parameters
$outputstring
The adjacent post link.
$formatstring
Link anchor format.
$linkstring
Link permalink format.
$postWP_Post|string
The adjacent post. Empty string if no corresponding post exists.
2382* @param string$output The adjacent post link.2383* @param string$format Link anchor format.2384* @param string$link Link permalink format.2385* @param WP_Post|string$post The adjacent post.Emptystringif no corresponding post exists.2386* @param string$adjacent Whether the post is previous or next.2387*/2388returnapply_filters("{$adjacent}_post_link",$output,$format,$link,$post,$adjacent);2389}23902391/**2392* Displays the adjacent post link.2393*2394* Can be either next post link or previous.
History
Introduced in 2.6.0. Unchanged from 6.7.7 through 7.1.0.