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,19 +7,19 @@
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_pagination' ) ) {
|
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;
|
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'),
|
||||||
'next_text' => __('»', 'understrap'),
|
'next_text' => __('»', 'understrap'),
|
||||||
'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