Filter hook 'wp_list_authors_args'

in WP Core File wp-includes/author-template.php at line 470

View Source

wp_list_authors_args

Filter Hook
Description
Filters the query arguments for the list of all authors of the site.

Hook Information

File Location wp-includes/author-template.php View on GitHub
Hook Type Filter
Line Number 470

Hook Parameters

Type Name Description
array $query_args The query arguments for get_users().
array $parsed_args The arguments passed to wp_list_authors() combined with the defaults.

Usage Examples

Basic Usage
<?php
// Hook into wp_list_authors_args
add_filter('wp_list_authors_args', 'my_custom_filter', 10, 2);

function my_custom_filter($query_args, $parsed_args) {
    // Your custom filtering logic here
    return $query_args;
}

Source Code Context

wp-includes/author-template.php:470 - How this hook is used in WordPress core
<?php
 465  	 * @since 6.1.0
 466  	 *
 467  	 * @param array $query_args  The query arguments for get_users().
 468  	 * @param array $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
 469  	 */
 470  	$query_args = apply_filters( 'wp_list_authors_args', $query_args, $parsed_args );
 471  
 472  	$authors     = get_users( $query_args );
 473  	$post_counts = array();
 474  
 475  	/**

PHP Documentation

<?php
/**
	 * Filters the query arguments for the list of all authors of the site.
	 *
	 * @since 6.1.0
	 *
	 * @param array $query_args  The query arguments for get_users().
	 * @param array $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/author-template.php
Related Hooks

Related hooks will be displayed here in future updates.