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 |
---|---|
2643 | $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); |
2644 | $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; |
2645 | $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); |
2646 | $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"; |
2647 | $this->comments = $wpdb->get_results($comments_request); |
2648 | $this->comment_count = count($this->comments); |
2649 | } |
2650 |
|
2651 | if ( !$q['no_found_rows'] && !empty($limits) ) { |
2652 | $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ); |
2653 | $this->found_posts = $wpdb->get_var( $found_posts_query ); |
2654 | $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); |
2655 | $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']); |
2656 | } |
2657 |
|
2658 | // Check post status to determine if post should be displayed. |
2659 | if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { |
2660 | $status = get_post_status($this->posts[0]); |
2661 | $post_status_obj = get_post_status_object($status); |