From 0d308bfd6b7b1974ba3dda6a7f65a529cae3df24 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 30 Dec 2014 06:56:19 +0000 Subject: [PATCH] Pass the $adjacent parameter to the "{$adjacent}_post_link" filter. props ankit.gade@rtcamp.com, kpdesign. fixes #30440. git-svn-id: https://develop.svn.wordpress.org/trunk@31000 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 97a59906ba..83d0c533c7 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -1865,13 +1865,15 @@ function get_adjacent_post_link( $format, $link, $in_same_term = false, $exclude * of adjacency, 'next' or 'previous'. * * @since 2.6.0 + * @since 4.2.0 Added the `$adjacent` parameter. * - * @param string $output The adjacent post link. - * @param string $format Link anchor format. - * @param string $link Link permalink format. - * @param WP_Post $post The adjacent post. + * @param string $output The adjacent post link. + * @param string $format Link anchor format. + * @param string $link Link permalink format. + * @param WP_Post $post The adjacent post. + * @param string $adjacent Whether the post is previous or next. */ - return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post ); + return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent ); } /**