fixing next/previous page links to work w/ clean URLs
git-svn-id: http://svn.automattic.com/wordpress/trunk@713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
13e9584684
commit
c31ebcf3c0
|
@ -1239,7 +1239,7 @@ function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
||||||
if (!$paged) $paged = 1;
|
if (!$paged) $paged = 1;
|
||||||
$nextpage = intval($paged) + 1;
|
$nextpage = intval($paged) + 1;
|
||||||
if (!$max_page || $max_page >= $nextpage) {
|
if (!$max_page || $max_page >= $nextpage) {
|
||||||
echo $pagenow.$querystring_start.
|
echo $siteurl.'/'.$pagenow.$querystring_start.
|
||||||
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
||||||
'paged'.$querystring_equal.$nextpage;
|
'paged'.$querystring_equal.$nextpage;
|
||||||
}
|
}
|
||||||
|
@ -1265,7 +1265,7 @@ function next_posts_link($label='Next Page »', $max_page=0) {
|
||||||
$nextpage = intval($paged) + 1;
|
$nextpage = intval($paged) + 1;
|
||||||
if (empty($p) && (empty($paged) || $nextpage <= $max_page)) {
|
if (empty($p) && (empty($paged) || $nextpage <= $max_page)) {
|
||||||
echo '<a href="';
|
echo '<a href="';
|
||||||
echo next_posts($max_page);
|
next_posts($max_page);
|
||||||
echo '">'. htmlspecialchars($label) .'</a>';
|
echo '">'. htmlspecialchars($label) .'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1291,7 +1291,7 @@ function previous_posts() { // original by cfactor at cooltux.org
|
||||||
}
|
}
|
||||||
$nextpage = intval($paged) - 1;
|
$nextpage = intval($paged) - 1;
|
||||||
if ($nextpage < 1) $nextpage = 1;
|
if ($nextpage < 1) $nextpage = 1;
|
||||||
echo $pagenow.$querystring_start.
|
echo $siteurl.'/'.$pagenow.$querystring_start.
|
||||||
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
||||||
'paged'.$querystring_equal.$nextpage;
|
'paged'.$querystring_equal.$nextpage;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ function previous_posts_link($label='« Previous Page') {
|
||||||
global $p, $paged, $what_to_show;
|
global $p, $paged, $what_to_show;
|
||||||
if (empty($p) && ($paged > 1) && ($what_to_show == 'paged')) {
|
if (empty($p) && ($paged > 1) && ($what_to_show == 'paged')) {
|
||||||
echo '<a href="';
|
echo '<a href="';
|
||||||
echo previous_posts();
|
previous_posts();
|
||||||
echo '">'. htmlspecialchars($label) .'</a>';
|
echo '">'. htmlspecialchars($label) .'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue