Links: in get_adjacent_post(), add a "get_{$adjacent}_post_excluded_terms" filter.

Props rmccue, Japh, MikeHansenMe.
Fixes #9571.

Built from https://develop.svn.wordpress.org/trunk@34528


git-svn-id: http://core.svn.wordpress.org/trunk@34492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-25 02:38:25 +00:00
parent e87150fc06
commit 80974b0db6
2 changed files with 13 additions and 1 deletions

View File

@ -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.
*

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34527';
$wp_version = '4.4-alpha-34528';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.