WordPress at a glance
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'.

Usage

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

	return $output;
}
$output(string)
The adjacent post link.
$format(string)
Link anchor format.
$link(string)
Link permalink format.
$post(WP_Post)
The adjacent post.
$adjacent(string)
Whether the post is previous or next.

Notes

  • Since 4.2.0 Added the $adjacent parameter.

Where the hook is called

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

Where the hook is used (in WP core)

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