From 55a2ea611fb3bb3ac0ae69ee67ff6927be0316df Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 16 Jun 2008 22:27:07 +0000 Subject: [PATCH] previous_post_link and next_post_link filters. Props JohnLamansky. fixes #6985 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@8108 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/link-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index edfb5f1fbf..9875356c65 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -611,7 +611,8 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate $format = str_replace('%link', $link, $format); - echo $format; + $adjacent = $previous ? 'previous' : 'next'; + echo apply_filters( "{$adjacent}_post_link", $format, $link ); } function get_pagenum_link($pagenum = 1) {