trailingslashit() fix for paged posts links from activeingredient. fixes #3163

git-svn-id: https://develop.svn.wordpress.org/trunk@4603 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2006-12-04 14:42:34 +00:00
parent f2659c992f
commit 8ac738081e
1 changed files with 4 additions and 4 deletions

View File

@ -158,7 +158,7 @@ function wp_link_pages($args = '') {
if ( '' == get_option('permalink_structure') )
$output .= '<a href="' . get_permalink() . '&amp;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() . '&amp;page=' . $i . '">'.$previouspagelink.'</a>';
$output .= '<a href="' . get_permalink() . '&amp;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() . '&amp;page=' . $i . '">'.$nextpagelink.'</a>';
$output .= '<a href="' . get_permalink() . '&amp;page=' . $i . '">'.$nextpagelink.'</a>';
else
$output .= '<a href="'.get_permalink().$i.'/">'.$nextpagelink.'</a>';
$output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">' . $nextpagelink . '</a>';
}
$output .= $after;
}