Changeset 53520
- Timestamp:
- 06/18/2022 03:36:20 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r53455 r53520 2766 2766 */ 2767 2767 function get_the_posts_navigation( $args = array() ) { 2768 global $wp_query; 2769 2768 2770 $navigation = ''; 2769 2771 2770 2772 // Don't print empty markup if there's only one page. 2771 if ( $ GLOBALS['wp_query']->max_num_pages > 1 ) {2773 if ( $wp_query->max_num_pages > 1 ) { 2772 2774 // Make sure the nav element has an aria-label attribute: fallback to the screen reader text. 2773 2775 if ( ! empty( $args['screen_reader_text'] ) && empty( $args['aria_label'] ) ) { … … 2822 2824 * @since 5.5.0 Added the `class` parameter. 2823 2825 * 2826 * @global WP_Query $wp_query WordPress Query object. 2827 * 2824 2828 * @param array $args { 2825 2829 * Optional. Default pagination arguments, see paginate_links(). … … 2833 2837 */ 2834 2838 function get_the_posts_pagination( $args = array() ) { 2839 global $wp_query; 2840 2835 2841 $navigation = ''; 2836 2842 2837 2843 // Don't print empty markup if there's only one page. 2838 if ( $ GLOBALS['wp_query']->max_num_pages > 1 ) {2844 if ( $wp_query->max_num_pages > 1 ) { 2839 2845 // Make sure the nav element has an aria-label attribute: fallback to the screen reader text. 2840 2846 if ( ! empty( $args['screen_reader_text'] ) && empty( $args['aria_label'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.