Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: comments_list_table_query_args

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
136           );
137
138           /**
139            * Filters the arguments for the comment query in the comments list table.
140            *
141            * @since 5.1.0
142            *
143            * @param array $args An array of get_comments() arguments.
144            */
145           $args = apply_filters( 'comments_list_table_query_args', $args );
146
147           $_comments = get_comments( $args );
148           if ( is_array( $_comments ) ) {
149                update_comment_cache( $_comments );
150
151                $this->items       = array_slice( $_comments, 0, $comments_per_page );
152                $this->extra_items = array_slice( $_comments, $comments_per_page );
153
154                $_comment_post_ids = array_unique( wp_list_pluck( $_comments, 'comment_post_ID' ) );