Fixes
git-svn-id: https://develop.svn.wordpress.org/trunk@3122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1c6832ed77
commit
39a7455309
@ -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
Block a user