mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-17 08:05:21 +01:00
Users: Introduce the wp_dropdown_users_args
filter, making it possible to filter the arguments for wp_dropdown_users()
before the query is run.
The 'name' argument (or the `WP_Screen` object if in the admin) can be used to help target specific instances of `wp_dropdown_users()` via this hook. Props norcross. See #19867. Built from https://develop.svn.wordpress.org/trunk@34692 git-svn-id: http://core.svn.wordpress.org/trunk@34656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4d377dd4a1
commit
7866772449
@ -922,6 +922,16 @@ function wp_dropdown_users( $args = '' ) {
|
||||
|
||||
$query_args = wp_array_slice_assoc( $r, array( 'blog_id', 'include', 'exclude', 'orderby', 'order', 'who' ) );
|
||||
$query_args['fields'] = array( 'ID', 'user_login', $show );
|
||||
|
||||
/**
|
||||
* Filter the arguments for user drop-down arguments before being passed into the query.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $query_args The default arguments for wp_dropdown_users().
|
||||
*/
|
||||
$query_args = apply_filters( 'wp_dropdown_users_args', $query_args );
|
||||
|
||||
$users = get_users( $query_args );
|
||||
|
||||
$output = '';
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34691';
|
||||
$wp_version = '4.4-alpha-34692';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user