apply_filters( 'wp_dropdown_users_args', array $query_args , array $parsed_args )
Filters the query arguments for the list of users in the dropdown.
Parameters
- $query_args
-
(array) The query arguments for get_users().
- $parsed_args
-
(array) The arguments passed to wp_dropdown_users() combined with the defaults.
Source
File: wp-includes/user.php
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
This filter allows you to set subscribers as authors of blog posts within the admin without giving them additional privileges. Here’s the code:
In addition to Jonathan’s contribution, you can also expand it further by specifying the role. This is undocumented on wp codex. But does work e.g.
In addition to RiseOfLex88’s contribution, you can also specify multiple roles.
Expand full source codeCollapse full source code
If you dump variable “$query_args” inside this function, this is what you will get:
Expand full source codeCollapse full source code