Fixes
git-svn-id: http://svn.automattic.com/wordpress/trunk@3122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06c09b9e74
commit
60e7c34c12
|
@ -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 . '</a>';
|
||||
|
||||
$format = str_replace('%link', $link, $format);
|
||||
|
||||
echo $format;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue