Fixed problem with previous_post always showing title.

git-svn-id: https://develop.svn.wordpress.org/trunk@248 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Little 2003-06-30 22:27:21 +00:00
parent d5cc6340dc
commit 6f9fcd2213
1 changed files with 3 additions and 1 deletions

View File

@ -622,7 +622,9 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $
++$querycount; ++$querycount;
if ($lastpost) { if ($lastpost) {
$string = '<a href="'.$blogfilename.$querystring_start.'p'.$querystring_equal.$lastpost->ID.$querystring_separator.'more'.$querystring_equal.'1'.$querystring_separator.'c'.$querystring_equal.'1">'.$previous; $string = '<a href="'.$blogfilename.$querystring_start.'p'.$querystring_equal.$lastpost->ID.$querystring_separator.'more'.$querystring_equal.'1'.$querystring_separator.'c'.$querystring_equal.'1">'.$previous;
if ($title == 'yes') {
$string .= wptexturize(stripslashes($lastpost->post_title)); $string .= wptexturize(stripslashes($lastpost->post_title));
}
$string .= '</a>'; $string .= '</a>';
$format = str_replace('%', $string, $format); $format = str_replace('%', $string, $format);
echo $format; echo $format;