Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: found_posts

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2636                $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
2637                $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits";
2638                $this->comments = $wpdb->get_results($comments_request);
2639                $this->comment_count = count($this->comments);
2640           }
2641
2642           if ( !$q['no_found_rows'] && !empty($limits) ) {
2643                $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );
2644                $this->found_posts = $wpdb->get_var( $found_posts_query );
2645                $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
2646                $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
2647           }
2648
2649           // Check post status to determine if post should be displayed.
2650           if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
2651                $status = get_post_status($this->posts[0]);
2652                $post_status_obj = get_post_status_object($status);
2653                //$type = get_post_type($this->posts[0]);
2654                if ( !$post_status_obj->public ) {