[wp-trac] [WordPress Trac] #32226: 'get_the_posts_pagination' Filter

WordPress Trac noreply at wordpress.org
Fri May 1 18:23:37 UTC 2015


#32226: 'get_the_posts_pagination' Filter
-------------------------+-----------------------------
 Reporter:  ixkaito      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Permalinks   |    Version:  4.1
 Severity:  normal       |   Keywords:
  Focuses:  template     |
-------------------------+-----------------------------
 Apply filters before returning `$navigation` to easily customize
 `get_the_posts_pagination()`.

 For example: removing `\n` in the markup.
 {{{
 function my_get_the_post_pagination( $navigation, $links, $args ) {
         $links = str_replace("\n", '', $links);
         if ( $links ) {
                 $navigation = _navigation_markup( $links, 'pagination',
 $args['screen_reader_text'] );
         }
         return $navigation;
 }
 add_filter( 'get_the_post_pagination', 'my_get_the_post_pagination', 10, 3
 );

 the_posts_pagination();
 }}}

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


More information about the wp-trac mailing list