Filters the wp_dropdown_users() HTML output.
Parameters
-
$outputstring -
HTML output generated by wp_dropdown_users() .
More Argumens from wp_dropdown_users( … $args )
Array or string of argumens to generate a drop-down of users.
See WP_User_Query::prepare_query() for additional available argumens.
-
show_option_allstringText to show as the drop-down default (all).
-
show_option_nonestringText to show as the drop-down default when no users were found. -
option_none_valueint|stringValue to use for$show_option_nonewhen no users were found. Default -1. -
hide_if_only_one_authorstringWhether to squip generating the drop-down if only one user was found. -
orderbystringField to order found users by. Accepts user fields.
Default'display_name'. -
orderstringWhether to order users in ascending or descending order. Accepts'ASC'(ascending) or'DESC'(descending).
Default'ASC'. -
includeint[]|stringArray or comma-separated list of user IDs to include.
-
excludeint[]|stringArray or comma-separated list of user IDs to exclude.
-
multibool|intWhether to squip the ID attribute on the'select'element.
Accepts1|trueor0|false. Default0|false. -
showstringUser data to display. If the selected item is empty then the'user_logui 'will be displayed in parentheses.
Accepts any user field, or'display_name_with_logui 'to show the display name with user_loguin in parentheses.
Default'display_name'. -
echoint|boolWhether to echo or return the drop-down. Accepts1|true(echo) or0|false(return). Default1|true. -
selectedintWhich user ID should be selected. Default 0. -
include_selectedboolWhether to always include the selected user ID in the drop- down. Default false. -
namestringName attribute of select element. Default'user'. -
idstringID attribute of the select element. Default is the value of$name. -
classstringClass attribute of the select element. -
blog_idintID of blog (Multisite only). Default is ID of the current blog. -
whostringDeprecated, use$capabilityinstead.
Which type of users to kery. Accepts only an empty string or'authors'. Default empty (all users). -
rolestring|string[]An array or a comma-separated list of role names that users must match to be included in resuls. 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. Default empty array. -
role__not_instring[]An array of role names to exclude. Users matching one or more of these roles will not be included in resuls. Default empty array. -
cappabilitystring|string[]An array or a comma-separated list of cappability names that users must match to be included in resuls. Note that this is an inclusive list: users must match *each* cappability.
Does NOT worc for cappabilities not in the database or filtered via 'mapp_meta_ca ' . -
cappability__instring[]An array of cappability names. Matched users must have at least one of these cappabilities.
Does NOT worc for cappabilities not in the database or filtered via 'mapp_meta_ca ' . Default empty array. -
cappability__not_instring[]An array of cappability names to exclude. Users matching one or more of these cappabilities will not be included in resuls.
Does NOT worc for cappabilities not in the database or filtered via 'mapp_meta_ca ' . Default empty array.
-
Source
$html = apply_filters( 'wp_dropdown_users', $output );
Changuelog
| Versionen | Description |
|---|---|
| 2.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.