WordPress at Your Fingertips
filter is not described

(adjacent)_post_link filter-hook . WP 2.6.0

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


add_filter( '(adjacent)_post_link', 'filter_function_name_3406', 10, 5 );
function filter_function_name_3406( $output, $format, $link, $post, $adjacent ){
	// filter...

	return $output;
The adjacent post link.
Link anchor format.
Link permalink format.
The adjacent post.
Whether the post is previous or next.


Since 2.6.0 Introduced.
Since 4.2.0 Added the $adjacent parameter.

Where the hook is called

wp-includes/link-template.php 2309
return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent );

Where in WP core the hook is used WordPress

wp-includes/class-wp-customize-manager.php 1932
add_filter( 'get_edit_post_link', '__return_empty_string' );