[wp-trac] [WordPress Trac] #35696: Allow extra control over CSS Classes in paginate_links()

WordPress Trac noreply at wordpress.org
Tue Feb 2 20:09:54 UTC 2016


#35696: Allow extra control over CSS Classes in paginate_links()
-------------------------+------------------------------
 Reporter:  maor         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  template
-------------------------+------------------------------
Changes (by ramiy):

 * keywords:  needs-patch => has-patch


Comment:

 The attached patch adds a `$classes` argument. It's an array of classes.

 '''WordPress Pagination''' (those are also the default values for
 backwards-compatibility):
 {{{
 $args = array(
         'classes' => array(
                 'ul'      => 'page-numbers',
                 'li'      => '',
                 'a'       => 'page-numbers',
                 'prev'    => 'prev',
                 'next'    => 'next',
                 'current' => 'current',
                 'dots'    => 'dots'
         )
 );
 echo paginate_links( $args );
 }}}

 '''[http://www.w3schools.com/bootstrap/bootstrap_pagination.asp Bootstrap
 Pagination]:'''
 {{{
 $args = array(
         'classes' => array(
                 'ul'      => 'pagination pagination-lg',
                 'li'      => '',
                 'a'       => '',
                 'prev'    => '',
                 'next'    => '',
                 'current' => 'active',
                 'dots'    => ''
         )
 );
 echo paginate_links( $args );
 }}}

 '''[http://foundation.zurb.com/sites/docs/pagination.html Foundation
 Pagination]:'''
 {{{
 $args = array(
         'classes' => array(
                 'ul'      => 'pagination',
                 'li'      => '',
                 'a'       => '',
                 'prev'    => 'pagination-previous',
                 'next'    => 'pagination-next',
                 'current' => 'current',
                 'dots'    => 'ellipsis'
         )
 );
 echo paginate_links( $args );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35696#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list