[wp-trac] [WordPress Trac] #49958: Improve paginator in general-template.php

WordPress Trac noreply at wordpress.org
Mon Apr 20 10:21:34 UTC 2020


#49958: Improve paginator in general-template.php
-----------------------------+-----------------------------
 Reporter:  lolitsjohnnyboy  |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  normal           |   Keywords:
  Focuses:  ui               |
-----------------------------+-----------------------------
 I would like to add custom classes to the default paginator in the
 {{{
 general-template.php
 }}}
  file. For that I would suggest the following change:

 {{{#!php
 <?php
 $page_links[] = sprintf(
         '<a class="page-numbers %s" href="%s">%s</a>',
         /** This filter is documented in wp-includes/general-template.php
 */
         esc_attr( apply_filters( 'paginate_classes' ) ),
         esc_url( apply_filters( 'paginate_links', $link ) ),
         $args['before_page_number'] . number_format_i18n( $n ) .
 $args['after_page_number']
 );
 }}}

 That needs to be applied to every
 {{{
 page-numbers
 }}}
  element and would be very helpful.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49958>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list