git-svn-id: http://svn.automattic.com/wordpress/trunk@2803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-08-23 07:43:11 +00:00
parent a258b5203e
commit e58da70252
1 changed files with 8 additions and 1 deletions

View File

@ -409,7 +409,14 @@ function get_pagenum_link($pagenum = 1) {
$qstr = preg_replace('|^/+|', '', $qstr);
if ($permalink) $qstr = trailingslashit($qstr);
return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
$qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
// showing /page/1/ or ?paged=1 is redundant
if ($pagenum === 1) {
$qstr = str_replace('page/1/', '', $qstr); // for mod_rewrite style
$qstr = remove_query_arg('paged', $qstr); // for query style
}
return $qstr;
}
function next_posts($max_page = 0) { // original by cfactor at cooltux.org