Filters the WHERE 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’.
Possible hook names include:
get_next_post_whereget_previous_post_where$wherestring
WHERE clause in the SQL.$in_same_termbool
$excluded_termsint[]|string
$taxonomystring
$in_same_term is true.$postWP_Post
$where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms, $taxonomy, $post );
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_adjacent_post_where