Ticket #24709: 24709.1.patch
File 24709.1.patch, 2.1 KB (added by , 11 years ago) |
---|
-
wp-includes/general-template.php
1999 1999 'mid_size' => 2, 2000 2000 'type' => 'plain', 2001 2001 'add_args' => false, // array of query args to add 2002 'add_fragment' => '' 2002 'add_fragment' => '', 2003 'before_page_link' => '', 2004 'after_page_link' => '' 2003 2005 ); 2004 2006 2005 2007 $args = wp_parse_args( $args, $defaults ); … … 2029 2031 for ( $n = 1; $n <= $total; $n++ ) : 2030 2032 $n_display = number_format_i18n($n); 2031 2033 if ( $n == $current ) : 2032 $page_links[] = "<span class='page-numbers current'> $n_display</span>";2034 $page_links[] = "<span class='page-numbers current'>" . $before_page_link . $n_display . $after_page_link . "</span>"; 2033 2035 $dots = true; 2034 2036 else : 2035 2037 if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) : … … 2038 2040 if ( $add_args ) 2039 2041 $link = add_query_arg( $add_args, $link ); 2040 2042 $link .= $add_fragment; 2041 $page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'> $n_display</a>";2043 $page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>" . $before_page_link . $n_display . $after_page_link . "</a>"; 2042 2044 $dots = true; 2043 2045 elseif ( $dots && !$show_all ) : 2044 2046 $page_links[] = '<span class="page-numbers dots">' . __( '…' ) . '</span>'; -
wp-includes/link-template.php
1904 1904 'total' => $max_page, 1905 1905 'current' => $page, 1906 1906 'echo' => true, 1907 'add_fragment' => '#comments' 1907 'add_fragment' => '#comments', 1908 'before_page_link' => '', 1909 'after_page_link' => '' 1908 1910 ); 1909 1911 if ( $wp_rewrite->using_permalinks() ) 1910 1912 $defaults['base'] = user_trailingslashit(trailingslashit(get_permalink()) . 'comment-page-%#%', 'commentpaged');