Add pluggable function wrappers to inc/pagination.php; add single quotes around active class name on line 41

This commit is contained in:
Alex Wright 2018-03-30 11:21:47 -05:00
parent 9397cfc53e
commit 8da32c1a75
1 changed files with 42 additions and 43 deletions

View File

@ -5,7 +5,7 @@
* @package understrap
*/
if ( ! function_exists( 'understrap_pagination' ) ) :
if ( ! function_exists ( 'understrap_pagination' ) ) {
function understrap_pagination($args = [], $class = 'pagination') {
if ($GLOBALS['wp_query']->max_num_pages <= 1) return;
@ -38,7 +38,7 @@
<?php
$i = 1;
foreach ( $links as $link ) { ?>
<li class="page-item <?php if ($i == $args['current']) { echo active; }; ?>">
<li class="page-item <?php if ($i == $args['current']) { echo 'active'; }; ?>">
<?php echo str_replace( 'page-numbers', 'page-link', $link ); ?>
</li>
@ -54,5 +54,4 @@
</nav>
<?php
}
endif;
?>
}