From ddd8bacca87a0708e3470f00a1231978f972ec57 Mon Sep 17 00:00:00 2001 From: William Patton Date: Thu, 12 Jul 2018 20:07:38 +0100 Subject: [PATCH 1/2] Swap shorthand array `[]` to `array()` in pagination function definition --- inc/pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/pagination.php b/inc/pagination.php index 6ed13e4..7508569 100644 --- a/inc/pagination.php +++ b/inc/pagination.php @@ -7,7 +7,7 @@ if ( ! function_exists ( 'understrap_pagination' ) ) { - function understrap_pagination($args = [], $class = 'pagination') { + function understrap_pagination( $args = array(), $class = 'pagination' ) { if ($GLOBALS['wp_query']->max_num_pages <= 1) return; From efabf58b1dd5f5e3e7ecda5b75eb6defab9d08a0 Mon Sep 17 00:00:00 2001 From: William Patton Date: Fri, 13 Jul 2018 00:10:59 +0100 Subject: [PATCH 2/2] Swap array shorthand `[]` in wp_parse_args call to `array()` --- inc/pagination.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inc/pagination.php b/inc/pagination.php index 7508569..b582f73 100644 --- a/inc/pagination.php +++ b/inc/pagination.php @@ -11,15 +11,15 @@ if ( ! function_exists ( 'understrap_pagination' ) ) { if ($GLOBALS['wp_query']->max_num_pages <= 1) return; - $args = wp_parse_args( $args, [ - 'mid_size' => 2, - 'prev_next' => true, - '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, array( + 'mid_size' => 2, + 'prev_next' => true, + '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);