diff --git wp-includes/general-template.php wp-includes/general-template.php
index ed91e5b..ec29a04 100644
|
|
function paginate_links( $args = '' ) { |
3330 | 3330 | $page_links[] = "<span class='page-numbers current'>" . $args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number'] . "</span>"; |
3331 | 3331 | $dots = true; |
3332 | 3332 | else : |
3333 | | if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) : |
| 3333 | $in_range = $n >= $current - $mid_size && $n <= $current + $mid_size; |
| 3334 | // If the dots cover only one link, just show the link instead |
| 3335 | $singular = $n >= $current - $mid_size - 1 && $n <= $current + $mid_size + 1 && ( $n == $end_size + 1 || $n == $total - $end_size ); |
| 3336 | |
| 3337 | if ( $args['show_all'] || ( $n <= $end_size || ( $current && ( $in_range || $singular ) ) || $n > $total - $end_size ) ) : |
3334 | 3338 | $link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] ); |
3335 | 3339 | $link = str_replace( '%#%', $n, $link ); |
3336 | 3340 | if ( $add_args ) |