WordPress.org

Make WordPress Core

Ticket #33405: 33405.diff

File 33405.diff, 900 bytes (added by luukdv, 5 years ago)
  • wp-includes/general-template.php

    diff --git wp-includes/general-template.php wp-includes/general-template.php
    index ed91e5b..446414e 100644
    function paginate_links( $args = '' ) { 
    33303330                        $page_links[] = "<span class='page-numbers current'>" . $args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number'] . "</span>";
    33313331                        $dots = true;
    33323332                else :
    3333                         if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
     3333                        if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size - 1 && $n <= $current + $mid_size + 1 ) || $n > $total - $end_size ) ) :
    33343334                                $link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );
    33353335                                $link = str_replace( '%#%', $n, $link );
    33363336                                if ( $add_args )