WordPress at a glance
filter is not described

get_(adjacent)_post_sort filter-hook . WP 2.5.0

Filters the ORDER BY clause in the SQL for an adjacent post query.

The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, 'next' or 'previous'.

Usage

add_filter( 'get_(adjacent)_post_sort', 'filter_function_name_6866', 10, 3 );
function filter_function_name_6866( $order_by, $post, $order ){
	// filter...

	return $order_by;
}
$order_by(string)
The ORDER BY clause in the SQL.
$post(WP_Post)
WP_Post object.
$order(string)
Sort order. 'DESC' for previous post, 'ASC' for next.

Notes

  • Since 4.4.0 Added the $post parameter.
  • Since 4.9.0 Added the $order parameter.

Where the hook is called

get_adjacent_post()
get_(adjacent)_post_sort
wp-includes/link-template.php 1821
$sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post, $order );

Where the hook is used (in WP core)

Использование не найдено.