Respect user trailing slash preference for multipage posts and eliminate redundant /1/. fixes #3949
git-svn-id: http://svn.automattic.com/wordpress/trunk@5017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d115b53371
commit
aa45fd5ee3
|
@ -155,10 +155,17 @@ 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 ( '' == get_option('permalink_structure') ) {
|
||||
if ( $i == 1 )
|
||||
$output .= '<a href="' . get_permalink() . $i . '">';
|
||||
else
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
|
||||
} else {
|
||||
if ( $i == 1 )
|
||||
$output .= '<a href="' . get_permalink() . '">';
|
||||
else
|
||||
$output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i) . '">';
|
||||
}
|
||||
}
|
||||
$output .= $j;
|
||||
if ( ($i != $page) || ((!$more) && ($page==1)) )
|
||||
|
|
Loading…
Reference in New Issue