trailingslashit() fix for paged posts links from activeingredient. fixes #3163
git-svn-id: http://svn.automattic.com/wordpress/trunk@4603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
84ec7763be
commit
1877fbb867
|
@ -158,7 +158,7 @@ function wp_link_pages($args = '') {
|
|||
if ( '' == get_option('permalink_structure') )
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
|
||||
else
|
||||
$output .= '<a href="' . trailingslashit( get_permalink() ) . $i . '/">';
|
||||
$output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">';
|
||||
}
|
||||
$output .= $j;
|
||||
if ( ($i != $page) || ((!$more) && ($page==1)) )
|
||||
|
@ -171,16 +171,16 @@ function wp_link_pages($args = '') {
|
|||
$i = $page - 1;
|
||||
if ( $i && $more ) {
|
||||
if ( '' == get_option('permalink_structure') )
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">'.$previouspagelink.'</a>';
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $previouspagelink . '</a>';
|
||||
else
|
||||
$output .= '<a href="' . get_permalink() . $i . '/">'.$previouspagelink.'</a>';
|
||||
}
|
||||
$i = $page + 1;
|
||||
if ( $i <= $numpages && $more ) {
|
||||
if ( '' == get_option('permalink_structure') )
|
||||
$output .= '<a href="'.get_permalink() . '&page=' . $i . '">'.$nextpagelink.'</a>';
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">'.$nextpagelink.'</a>';
|
||||
else
|
||||
$output .= '<a href="'.get_permalink().$i.'/">'.$nextpagelink.'</a>';
|
||||
$output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">' . $nextpagelink . '</a>';
|
||||
}
|
||||
$output .= $after;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue