Ticket #24606: 24606.diff
File 24606.diff, 1.4 KB (added by , 11 years ago) |
---|
-
wp-includes/general-template.php
2025 2025 $page_links = array(); 2026 2026 $n = 0; 2027 2027 $dots = false; 2028 $base = str_replace( '%_%', $format, $base ); 2028 2029 2029 2030 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); 2032 2032 if ( $add_args ) 2033 2033 $link = add_query_arg( $add_args, $link ); 2034 2034 $link .= $add_fragment; … … 2041 2041 $dots = true; 2042 2042 else : 2043 2043 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); 2046 2045 if ( $add_args ) 2047 2046 $link = add_query_arg( $add_args, $link ); 2048 2047 $link .= $add_fragment; … … 2055 2054 endif; 2056 2055 endfor; 2057 2056 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); 2060 2058 if ( $add_args ) 2061 2059 $link = add_query_arg( $add_args, $link ); 2062 2060 $link .= $add_fragment;