[wp-trac] [WordPress Trac] #39378: Allow passing custom class to the post pagination functions
WordPress Trac
noreply at wordpress.org
Thu Dec 22 21:44:03 UTC 2016
#39378: Allow passing custom class to the post pagination functions
-------------------------+-----------------------------
Reporter: jfarthing84 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.7
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The functions `the_posts_pagination()` and `get_the_posts_pagination()`
should accept a class to be used instead of only defaulting to
`.pagination`.
If anyone wishes to achieve this meanwhile, it must be done with the
`navigation_markup_template` filter, unfortunately:
{{{#!php
<?php
function navigvation_markup_template_filter( $template, $class ) {
if ( 'pagination' == $class ) {
$template = str_replace( '%1$s', 'posts-pagination',
$template );
}
return $template;
}
add_filter( 'navigation_markup_template',
'navigvation_markup_template_filter', 10, 2 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39378>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list