From 8da32c1a75c79bddebf812f6abcd85f3c182ce15 Mon Sep 17 00:00:00 2001 From: Alex Wright Date: Fri, 30 Mar 2018 11:21:47 -0500 Subject: [PATCH] Add pluggable function wrappers to inc/pagination.php; add single quotes around active class name on line 41 --- inc/pagination.php | 85 +++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/inc/pagination.php b/inc/pagination.php index 8874fed..c58dfaa 100644 --- a/inc/pagination.php +++ b/inc/pagination.php @@ -5,54 +5,53 @@ * @package understrap */ - if ( ! function_exists( 'understrap_pagination' ) ) : - function understrap_pagination($args = [], $class = 'pagination') { +if ( ! function_exists ( 'understrap_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; - $args = wp_parse_args( $args, [ - 'mid_size' => 2, - 'prev_next' => false, - 'prev_text' => __('«', 'understrap'), - 'next_text' => __('»', 'understrap'), - 'screen_reader_text' => __('Posts navigation', 'understrap'), - 'type' => 'array', - 'current' => max( 1, get_query_var('paged') ), - ]); + $args = wp_parse_args( $args, [ + 'mid_size' => 2, + 'prev_next' => false, + 'prev_text' => __('«', 'understrap'), + 'next_text' => __('»', 'understrap'), + 'screen_reader_text' => __('Posts navigation', 'understrap'), + 'type' => 'array', + 'current' => max( 1, get_query_var('paged') ), + ]); - $links = paginate_links($args); - $next_link = get_next_posts_page_link(); - $prev_link = get_previous_posts_page_link(); + $links = paginate_links($args); + $next_link = get_next_posts_page_link(); + $prev_link = get_previous_posts_page_link(); - ?> + ?> - +