From 9b181f097331e078e336a00ad1020e0b6ddec353 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@8108 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 edfb5f1fb..9875356c6 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) {