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 |
---|---|
1475 | * will be included in results. |
1476 | * @type int $post_id ID of the post. |
1477 | * @type bool $no_found_rows Whether to refrain from querying for found rows. |
1478 | * @type bool $update_comment_meta_cache Whether to prime cache for comment meta. |
1479 | * @type bool|string $hierarchical Whether to query for comments hierarchically. |
1480 | * @type int $offset Comment offset. |
1481 | * @type int $number Number of comments to fetch. |
1482 | * } |
1483 | */ |
1484 | $comment_args = apply_filters( 'comments_template_query_args', $comment_args ); |
1485 |
|
1486 | $comment_query = new WP_Comment_Query( $comment_args ); |
1487 | $_comments = $comment_query->comments; |
1488 |
|
1489 | // Trees must be flattened before they're passed to the walker. |
1490 | if ( $comment_args['hierarchical'] ) { |
1491 | $comments_flat = array(); |
1492 | foreach ( $_comments as $_comment ) { |
1493 | $comments_flat[] = $_comment; |