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 |
---|---|
472 |
|
473 | /** |
474 | * Filters whether to short-circuit performing the query for author post counts. |
475 | * |
476 | * @since 6.1.0 |
477 | * |
478 | * @param int[]|false $post_counts Array of post counts, keyed by author ID. |
479 | * @param array $parsed_args The arguments passed to wp_list_authors() combined with the defaults. |
480 | */ |
481 | $post_counts = apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args ); |
482 |
|
483 | if ( ! is_array( $post_counts ) ) { |
484 | $post_counts = $wpdb->get_results( |
485 | "SELECT DISTINCT post_author, COUNT(ID) AS count |
486 | FROM $wpdb->posts |
487 | WHERE " . get_private_posts_cap_sql( 'post' ) . ' |
488 | GROUP BY post_author' |
489 | ); |
490 |
|