Make WordPress Core

Ticket #24606: 24606.diff

File 24606.diff, 1.4 KB (added by obenland, 11 years ago)
  • wp-includes/general-template.php

     
    20252025        $page_links = array();
    20262026        $n = 0;
    20272027        $dots = false;
     2028        $base = str_replace( '%_%', $format, $base );
    20282029
    20292030        if ( $prev_next && $current && 1 < $current ) :
    2030                 $link = str_replace('%_%', 2 == $current ? '' : $format, $base);
    2031                 $link = str_replace('%#%', $current - 1, $link);
     2031                $link = str_replace('%#%', $current - 1, $base);
    20322032                if ( $add_args )
    20332033                        $link = add_query_arg( $add_args, $link );
    20342034                $link .= $add_fragment;
     
    20412041                        $dots = true;
    20422042                else :
    20432043                        if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
    2044                                 $link = str_replace('%_%', 1 == $n ? '' : $format, $base);
    2045                                 $link = str_replace('%#%', $n, $link);
     2044                                $link = str_replace('%#%', $n, $base);
    20462045                                if ( $add_args )
    20472046                                        $link = add_query_arg( $add_args, $link );
    20482047                                $link .= $add_fragment;
     
    20552054                endif;
    20562055        endfor;
    20572056        if ( $prev_next && $current && ( $current < $total || -1 == $total ) ) :
    2058                 $link = str_replace('%_%', $format, $base);
    2059                 $link = str_replace('%#%', $current + 1, $link);
     2057                $link = str_replace('%#%', $current + 1, $base);
    20602058                if ( $add_args )
    20612059                        $link = add_query_arg( $add_args, $link );
    20622060                $link .= $add_fragment;