WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2634 | $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); |
2635 | $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; |
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); |