mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 21:28:02 +01:00
Cleaner and more complete fix for [5017]. fixes #3949
git-svn-id: https://develop.svn.wordpress.org/trunk@5018 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
af92eb9142
commit
b2105a943e
@ -155,14 +155,11 @@ function wp_link_pages($args = '') {
|
||||
$j = str_replace('%',"$i",$pagelink);
|
||||
$output .= ' ';
|
||||
if ( ($i != $page) || ((!$more) && ($page==1)) ) {
|
||||
if ( '' == get_option('permalink_structure') ) {
|
||||
if ( $i == 1 )
|
||||
$output .= '<a href="' . get_permalink() . $i . '">';
|
||||
else
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
|
||||
if ( 1 == $i ) {
|
||||
$output .= '<a href="' . get_permalink() . '">';
|
||||
} else {
|
||||
if ( $i == 1 )
|
||||
$output .= '<a href="' . get_permalink() . '">';
|
||||
if ( '' == get_option('permalink_structure') )
|
||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
|
||||
else
|
||||
$output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i) . '">';
|
||||
}
|
||||
@ -177,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) . '">' . $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) . '">' . $nextpagelink . '</a>';
|
||||
}
|
||||
}
|
||||
$output .= $after;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user