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; }