From 39a7455309f950eedb823a6f3a1161b721a13120 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 17 Nov 2005 01:57:18 +0000 Subject: [PATCH] Fixes git-svn-id: https://develop.svn.wordpress.org/trunk@3122 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-links.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wp-includes/template-functions-links.php b/wp-includes/template-functions-links.php index b8000107c6..b18a80172a 100644 --- a/wp-includes/template-functions-links.php +++ b/wp-includes/template-functions-links.php @@ -297,13 +297,11 @@ function get_next_post($in_same_cat = false, $excluded_categories = '') { function previous_post_link($format='« %link', $link='%title', $in_same_cat = false, $excluded_categories = '') { - if ( is_attachment() ) { + + if ( is_attachment() ) $post = & get_post($GLOBALS['post']->post_parent); - $pre = __('Belongs to '); - } else { + else $post = get_previous_post($in_same_cat, $excluded_categories); - $pre = ''; - } if ( !$post ) return; @@ -314,6 +312,7 @@ function previous_post_link($format='« %link', $link='%title', $in_same_ca $link = $pre . $string . $link . ''; $format = str_replace('%link', $link, $format); + echo $format; }