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:
Holger 2018-08-20 16:05:27 +02:00 committed by GitHub
commit 9cfc628afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -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' => __('&laquo;', '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);