[wp-trac] [WordPress Trac] #46451: wp_dropdown_users() does not pass all applicable arguments on to get_users()
WordPress Trac
noreply at wordpress.org
Sat Mar 9 19:56:39 UTC 2019
#46451: wp_dropdown_users() does not pass all applicable arguments on to
get_users()
--------------------------+------------------------------
Reporter: pbiron | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by pbiron):
What the xxxx was I thinking, the easiest way is:
{{{#!php
<?php
$blacklist = array(
'show_option_all',
'show_option_none',
'hide_if_only_one_author',
'multi',
'show',
'echo',
'selected',
'name',
'class',
'id',
'include_selected',
'option_none_value',
);
$query_args = array_diff_key( $r, array_flip( $blacklist ) );
...
$users = get_users( $query_args );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46451#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list