| 2633 | | if ( !$q['no_found_rows'] && !empty($limits) ) { |
| 2634 | | $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ); |
| 2635 | | $this->found_posts = $wpdb->get_var( $found_posts_query ); |
| 2636 | | $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); |
| 2637 | | $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']); |
| | 2633 | if ( ! $q['no_found_rows'] ) { |
| | 2634 | if ( empty( $limits ) ) { |
| | 2635 | $this->found_posts = count( $this->posts ); |
| | 2636 | } |
| | 2637 | else { |
| | 2638 | $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()', $this ); |
| | 2639 | $this->found_posts = $wpdb->get_var( $found_posts_query ); |
| | 2640 | } |
| | 2641 | $this->found_posts = apply_filters( 'found_posts', $this->found_posts, $this ); |
| | 2642 | $this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] ); |