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 |
---|---|
1172 | * @type bool $count Whether to return a comment count (true) or array |
1173 | * of comment objects (false). |
1174 | * @type string $status Comment status. |
1175 | * @type int $parent Parent ID of comment to retrieve children of. |
1176 | * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. |
1177 | * @type array $include_unapproved Array of IDs or email addresses whose unapproved comments |
1178 | * will be included in paginated comments. |
1179 | * } |
1180 | */ |
1181 | $comment_args = apply_filters( 'get_page_of_comment_query_args', $comment_args ); |
1182 |
|
1183 | $comment_query = new WP_Comment_Query(); |
1184 | $older_comment_count = $comment_query->query( $comment_args ); |
1185 |
|
1186 | // No older comments? Then it's page #1. |
1187 | if ( 0 == $older_comment_count ) { |
1188 | $page = 1; |
1189 |
|
1190 | // Divide comments older than this one by comments per page to get this comment's page number. |