Respect user trailing slash preference for multipage posts and eliminate redundant /1/. fixes #3949
git-svn-id: https://develop.svn.wordpress.org/trunk@5017 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9768611dc1
commit
af92eb9142
@ -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
Block a user