| 2657 | | // Don't print empty markup if there's only one page. |
| 2658 | | if ( $GLOBALS['wp_query']->max_num_pages > 1 ) { |
| 2659 | | // Make sure the nav element has an aria-label attribute: fallback to the screen reader text. |
| 2660 | | if ( ! empty( $args['screen_reader_text'] ) && empty( $args['aria_label'] ) ) { |
| 2661 | | $args['aria_label'] = $args['screen_reader_text']; |
| 2662 | | } |
| | 2659 | // Make sure the nav element has an aria-label attribute, fallback to the screen reader text. |
| | 2660 | if ( ! empty( $args['screen_reader_text'] ) && empty( $args['aria_label'] ) ) { |
| | 2661 | $args['aria_label'] = $args['screen_reader_text']; |
| | 2662 | } |
| 2664 | | $args = wp_parse_args( |
| 2665 | | $args, |
| 2666 | | array( |
| 2667 | | 'prev_text' => __( 'Older posts' ), |
| 2668 | | 'next_text' => __( 'Newer posts' ), |
| 2669 | | 'screen_reader_text' => __( 'Posts navigation' ), |
| 2670 | | 'aria_label' => __( 'Posts' ), |
| 2671 | | 'class' => 'posts-navigation', |
| 2672 | | ) |
| 2673 | | ); |
| | 2664 | $args = wp_parse_args( |
| | 2665 | $args, |
| | 2666 | array( |
| | 2667 | 'prev_text' => __( 'Older posts' ), |
| | 2668 | 'next_text' => __( 'Newer posts' ), |
| | 2669 | 'screen_reader_text' => __( 'Posts navigation' ), |
| | 2670 | 'aria_label' => __( 'Posts' ), |
| | 2671 | 'class' => 'posts-navigation', |
| | 2672 | 'max_num_pages' => $wp_query->max_num_pages, |
| | 2673 | ) |
| | 2674 | ); |