diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-12 23:03:30 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-12 23:03:30 +0000 |
commit | 0d4bfdbf8c17706b57e92838d1599cb9e82c893b (patch) | |
tree | f02f84d4c598373d7e5921ea3d3e66fd50850d24 /wp-includes/post-template.php | |
parent | bed8532fd2d9cc526a74f4fc4214887b37cf6e71 (diff) | |
download | wordpress-mu-0d4bfdbf8c17706b57e92838d1599cb9e82c893b.tar.gz wordpress-mu-0d4bfdbf8c17706b57e92838d1599cb9e82c893b.tar.xz wordpress-mu-0d4bfdbf8c17706b57e92838d1599cb9e82c893b.zip |
WP Merge to 5028
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@915 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post-template.php')
-rw-r--r-- | wp-includes/post-template.php | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index cfa56f8..3b1ca35 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -155,10 +155,14 @@ function wp_link_pages($args = '') { $j = str_replace('%',"$i",$pagelink); $output .= ' '; if ( ($i != $page) || ((!$more) && ($page==1)) ) { - if ( '' == get_option('permalink_structure') ) - $output .= '<a href="' . get_permalink() . '&page=' . $i . '">'; - else - $output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">'; + if ( 1 == $i ) { + $output .= '<a href="' . get_permalink() . '">'; + } else { + if ( '' == get_option('permalink_structure') ) + $output .= '<a href="' . get_permalink() . '&page=' . $i . '">'; + else + $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">'; + } } $output .= $j; if ( ($i != $page) || ((!$more) && ($page==1)) ) @@ -170,17 +174,25 @@ function wp_link_pages($args = '') { $output .= $before; $i = $page - 1; if ( $i && $more ) { - if ( '' == get_option('permalink_structure') ) - $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $previouspagelink . '</a>'; - else - $output .= '<a href="' . get_permalink() . $i . '/">'.$previouspagelink.'</a>'; + if ( 1 == $i ) { + $output .= '<a href="' . get_permalink() . '">' . $previouspagelink . '</a>'; + } else { + if ( '' == get_option('permalink_structure') ) + $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $previouspagelink . '</a>'; + else + $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $previouspagelink . '</a>'; + } } $i = $page + 1; if ( $i <= $numpages && $more ) { - if ( '' == get_option('permalink_structure') ) - $output .= '<a href="' . get_permalink() . '&page=' . $i . '">'.$nextpagelink.'</a>'; - else - $output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">' . $nextpagelink . '</a>'; + if ( 1 == $i ) { + $output .= '<a href="' . get_permalink() . '">' . $nextpagelink . '</a>'; + } else { + if ( '' == get_option('permalink_structure') ) + $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $nextpagelink . '</a>'; + else + $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $nextpagelink . '</a>'; + } } $output .= $after; } |