diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 10636fe7bc..f1d468bacd 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -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 .= ''; - else - $output .= ''; + if ( 1 == $i ) { + $output .= ''; } else { - if ( $i == 1 ) - $output .= ''; + if ( '' == get_option('permalink_structure') ) + $output .= ''; else $output .= ''; } @@ -177,17 +174,25 @@ function wp_link_pages($args = '') { $output .= $before; $i = $page - 1; if ( $i && $more ) { - if ( '' == get_option('permalink_structure') ) - $output .= '' . $previouspagelink . ''; - else - $output .= ''.$previouspagelink.''; + if ( 1 == $i ) { + $output .= '' . $previouspagelink . ''; + } else { + if ( '' == get_option('permalink_structure') ) + $output .= '' . $previouspagelink . ''; + else + $output .= '' . $previouspagelink . ''; + } } $i = $page + 1; if ( $i <= $numpages && $more ) { - if ( '' == get_option('permalink_structure') ) - $output .= ''.$nextpagelink.''; - else - $output .= '' . $nextpagelink . ''; + if ( 1 == $i ) { + $output .= '' . $nextpagelink . ''; + } else { + if ( '' == get_option('permalink_structure') ) + $output .= '' . $nextpagelink . ''; + else + $output .= '' . $nextpagelink . ''; + } } $output .= $after; }