Links: in get_adjacent_post()
, add a "get_{$adjacent}_post_excluded_terms"
filter.
Props rmccue, Japh, MikeHansenMe. Fixes #9571. git-svn-id: https://develop.svn.wordpress.org/trunk@34528 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
641150a87a
commit
a98ca8b314
@ -1629,6 +1629,18 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
|
||||
$op = $previous ? '<' : '>';
|
||||
$order = $previous ? 'DESC' : 'ASC';
|
||||
|
||||
/**
|
||||
* Filter the excluded term ids
|
||||
*
|
||||
* The dynamic portion of the hook name, `$adjacent`, refers to the type
|
||||
* of adjacency, 'next' or 'previous'.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string $excluded_terms Array of excluded term IDs.
|
||||
*/
|
||||
$excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms );
|
||||
|
||||
/**
|
||||
* Filter the JOIN clause in the SQL for an adjacent post query.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user