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 |
---|---|
2590 | $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); |
2591 | $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; |
2592 | $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); |
2593 | $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"; |
2594 | $this->comments = $wpdb->get_results($comments_request); |
2595 | $this->comment_count = count($this->comments); |
2596 | } |
2597 |
|
2598 | if ( !$q['no_found_rows'] && !empty($limits) ) { |
2599 | $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ); |
2600 | $this->found_posts = $wpdb->get_var( $found_posts_query ); |
2601 | $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); |
2602 | $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']); |
2603 | } |
2604 |
|
2605 | // Check post status to determine if post should be displayed. |
2606 | if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { |
2607 | $status = get_post_status($this->posts[0]); |
2608 | $post_status_obj = get_post_status_object($status); |