Merge pull request #743 from pattonwebz/fix/742-php5.3-compat
Swap shorthand array `[]` to `array()` in pagination function definition
This commit is contained in:
commit
9cfc628afe
|
@ -7,11 +7,11 @@
|
|||
|
||||
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;
|
||||
|
||||
$args = wp_parse_args( $args, [
|
||||
$args = wp_parse_args( $args, array(
|
||||
'mid_size' => 2,
|
||||
'prev_next' => true,
|
||||
'prev_text' => __('«', 'understrap'),
|
||||
|
@ -19,7 +19,7 @@ if ( ! function_exists ( 'understrap_pagination' ) ) {
|
|||
'screen_reader_text' => __('Posts navigation', 'understrap'),
|
||||
'type' => 'array',
|
||||
'current' => max( 1, get_query_var('paged') ),
|
||||
]);
|
||||
) );
|
||||
|
||||
$links = paginate_links($args);
|
||||
|
||||
|
|
Reference in New Issue