Add pluggable function wrappers to inc/pagination.php; add single quotes around active class name on line 41
This commit is contained in:
parent
9397cfc53e
commit
8da32c1a75
|
@ -5,7 +5,7 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! function_exists( 'understrap_pagination' ) ) :
|
if ( ! function_exists ( 'understrap_pagination' ) ) {
|
||||||
function understrap_pagination($args = [], $class = 'pagination') {
|
function understrap_pagination($args = [], $class = 'pagination') {
|
||||||
|
|
||||||
if ($GLOBALS['wp_query']->max_num_pages <= 1) return;
|
if ($GLOBALS['wp_query']->max_num_pages <= 1) return;
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<?php
|
<?php
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ( $links as $link ) { ?>
|
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 ); ?>
|
<?php echo str_replace( 'page-numbers', 'page-link', $link ); ?>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -54,5 +54,4 @@
|
||||||
</nav>
|
</nav>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
endif;
|
}
|
||||||
?>
|
|
Reference in New Issue