On this page
apply_filters( 'wp_list_authors_args', array $query_args, array $parsed_args )
Filters the query arguments for the list of all authors of the site.
Parameters
$query_argsarray-
The query arguments for get_users() .
More Arguments from get_users( ... $args )
Array or string of Query parameters.
blog_idintThe site ID. Default is the current site.rolestring|string[]An array or a comma-separated list of role names that users must match to be included in results. Note that this is an inclusive list: users must match *each* role.role__instring[]An array of role names. Matched users must have at least one of these roles.role__not_instring[]An array of role names to exclude. Users matching one or more of these roles will not be included in results.meta_keystring|string[]Meta key or keys to filter by.meta_valuestring|string[]Meta value or values to filter by.meta_comparestringMySQL operator used for comparing the meta value.
See WP_Meta_Query::__construct() for accepted values and default value.meta_compare_keystringMySQL operator used for comparing the meta key.
See WP_Meta_Query::__construct() for accepted values and default value.meta_typestringMySQL data type that the meta_value column will be CAST to for comparisons.
See WP_Meta_Query::__construct() for accepted values and default value.meta_type_keystringMySQL data type that the meta_key column will be CAST to for comparisons.
See WP_Meta_Query::__construct() for accepted values and default value.meta_queryarrayAn associative array of WP_Meta_Query arguments.
See WP_Meta_Query::__construct() for accepted values.capabilitystring|string[]An array or a comma-separated list of capability names that users must match to be included in results. Note that this is an inclusive list: users must match *each* capability.
Does NOT work for capabilities not in the database or filtered via 'map_meta_cap'.
capability__instring[]An array of capability names. Matched users must have at least one of these capabilities.
Does NOT work for capabilities not in the database or filtered via 'map_meta_cap'.
capability__not_instring[]An array of capability names to exclude. Users matching one or more of these capabilities will not be included in results.
Does NOT work for capabilities not in the database or filtered via 'map_meta_cap'.
includeint[]An array of user IDs to include.excludeint[]An array of user IDs to exclude.searchstringSearch keyword. Searches for possible string matches on columns.
When$search_columnsis left empty, it tries to determine which column to search in based on search string.search_columnsstring[]Array of column names to be searched. Accepts'ID','user_login','user_email','user_url','user_nicename','display_name'.
orderbystring|arrayField(s) to sort the retrieved users by. May be a single value, an array of values, or a multi-dimensional array with fields as keys and orders ('ASC'or'DESC') as values. Accepted values are:
'ID''display_name'(or'name')'include''user_login'(or'login')'login__in''user_nicename'(or'nicename'),'nicename__in'- 'user_email (or
'email') 'user_url'(or'url'),'user_registered'(or'registered')'post_count''meta_value','meta_value_num'- The value of
$meta_key - An array key of
$meta_queryTo use'meta_value'or'meta_value_num',$meta_keymust be also be defined. Default'user_login'.
orderstringDesignates ascending or descending order of users. Order values passed as part of an$orderbyarray take precedence over this parameter. Accepts'ASC','DESC'. Default'ASC'.offsetintNumber of users to offset in retrieved results. Can be used in conjunction with pagination. Default 0.numberintNumber of users to limit the query for. Can be used in conjunction with pagination. Value -1 (all) is supported, but should be used with caution on larger sites.
Default -1 (all users).pagedintWhen used with number, defines the page of results to return.
Default 1.count_totalboolWhether to count the total number of users found. If pagination is not needed, setting this to false can improve performance.
Default true.fieldsstring|string[]Which fields to return. Single or all fields (string), or array of fields. Accepts:
'ID''display_name''user_login''user_nicename''user_email''user_url''user_registered''user_pass''user_activation_key''user_status''spam'(only available on multisite installs)'deleted'(only available on multisite installs)'all'for all fields and loads user meta.'all_with_meta'Deprecated. Use'all'.
'all'.whostringType of users to query. Accepts'authors'.
Default empty (all users).has_published_postsbool|string[]Pass an array of post types to filter results to users who have published posts in those post types.trueis an alias for all public post types.nicenamestringThe user nicename.nicename__instring[]An array of nicenames to include. Users matching one of these nicenames will be included in results.nicename__not_instring[]An array of nicenames to exclude. Users matching one of these nicenames will not be included in results.loginstringThe user login.login__instring[]An array of logins to include. Users matching one of these logins will be included in results.login__not_instring[]An array of logins to exclude. Users matching one of these logins will not be included in results.
$parsed_argsarray-
The arguments passed to wp_list_authors() combined with the defaults.
More Arguments from wp_list_authors( ... $args )
Array or string of default arguments.
orderbystringHow to sort the authors. Accepts'nicename','email','url','registered','user_nicename','user_email','user_url','user_registered','name','display_name','post_count','ID','meta_value','user_login'. Default'name'.orderstringSorting direction for $orderby. Accepts'ASC','DESC'. Default'ASC'.numberintMaximum authors to return or display. Default empty (all authors).optioncountboolShow the count in parenthesis next to the author's name. Default false.exclude_adminboolWhether to exclude the'admin'account, if it exists. Default true.show_fullnameboolWhether to show the author's full name. Default false.hide_emptyboolWhether to hide any authors with no posts. Default true.feedstringIf not empty, show a link to the author's feed and use this text as the alt parameter of the link.feed_imagestringIf not empty, show a link to the author's feed and use this image URL as clickable anchor.feed_typestringThe feed type to link to. Possible values include'rss2','atom'.
Default is the value of get_default_feed() .echoboolWhether to output the result or instead return it. Default true.stylestringIf'list', each author is wrapped in an<li>element, otherwise the authors will be separated by commas.htmlboolWhether to list the items in HTML form or plaintext. Default true.excludeint[]|stringArray or comma/space-separated list of author IDs to exclude.includeint[]|stringArray or comma/space-separated list of author IDs to include.
Source
File: wp-includes/author-template.php. View all references
$query_args = apply_filters( 'wp_list_authors_args', $query_args, $parsed_args );
Related
Used By
| Used By | Description |
|---|---|
| wp_list_authors() wp-includes/author-template.php | Lists all the authors of the site, with several options available. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_list_authors_args