Swap array shorthand `[]` in wp_parse_args call to `array()`
This commit is contained in:
parent
ddd8bacca8
commit
efabf58b1d
|
@ -11,7 +11,7 @@ if ( ! function_exists ( 'understrap_pagination' ) ) {
|
||||||
|
|
||||||
if ($GLOBALS['wp_query']->max_num_pages <= 1) return;
|
if ($GLOBALS['wp_query']->max_num_pages <= 1) return;
|
||||||
|
|
||||||
$args = wp_parse_args( $args, [
|
$args = wp_parse_args( $args, array(
|
||||||
'mid_size' => 2,
|
'mid_size' => 2,
|
||||||
'prev_next' => true,
|
'prev_next' => true,
|
||||||
'prev_text' => __('«', 'understrap'),
|
'prev_text' => __('«', 'understrap'),
|
||||||
|
@ -19,7 +19,7 @@ if ( ! function_exists ( 'understrap_pagination' ) ) {
|
||||||
'screen_reader_text' => __('Posts navigation', 'understrap'),
|
'screen_reader_text' => __('Posts navigation', 'understrap'),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'current' => max( 1, get_query_var('paged') ),
|
'current' => max( 1, get_query_var('paged') ),
|
||||||
]);
|
) );
|
||||||
|
|
||||||
$links = paginate_links($args);
|
$links = paginate_links($args);
|
||||||
|
|
||||||
|
|
Reference in New Issue