s/$blog/$blog_id/ as an argument in wp_dropdown_users(), for consistency, see #11086
git-svn-id: https://develop.svn.wordpress.org/trunk@13123 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e2e67c91cb
commit
9682c32c7b
@ -507,7 +507,7 @@ function setup_userdata($for_user_id = '') {
|
|||||||
* <li>selected - Which User ID is selected.</li>
|
* <li>selected - Which User ID is selected.</li>
|
||||||
* <li>name - Default is 'user'. Name attribute of select element.</li>
|
* <li>name - Default is 'user'. Name attribute of select element.</li>
|
||||||
* <li>class - Class attribute of select element.</li>
|
* <li>class - Class attribute of select element.</li>
|
||||||
* <li>blog - ID of blog (Multisite only). Defaults to ID of current blog.</li>
|
* <li>blog_id - ID of blog (Multisite only). Defaults to ID of current blog.</li>
|
||||||
* </ol>
|
* </ol>
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
@ -517,13 +517,13 @@ function setup_userdata($for_user_id = '') {
|
|||||||
* @return string|null Null on display. String of HTML content on retrieve.
|
* @return string|null Null on display. String of HTML content on retrieve.
|
||||||
*/
|
*/
|
||||||
function wp_dropdown_users( $args = '' ) {
|
function wp_dropdown_users( $args = '' ) {
|
||||||
global $wpdb, $blog_id;
|
global $wpdb;
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'show_option_all' => '', 'show_option_none' => '',
|
'show_option_all' => '', 'show_option_none' => '',
|
||||||
'orderby' => 'display_name', 'order' => 'ASC',
|
'orderby' => 'display_name', 'order' => 'ASC',
|
||||||
'include' => '', 'exclude' => '', 'multi' => 0,
|
'include' => '', 'exclude' => '', 'multi' => 0,
|
||||||
'show' => 'display_name', 'echo' => 1,
|
'show' => 'display_name', 'echo' => 1,
|
||||||
'selected' => 0, 'name' => 'user', 'class' => '', 'blog' => $blog_id,
|
'selected' => 0, 'name' => 'user', 'class' => '', 'blog_id' => $GLOBALS['blog_id'],
|
||||||
);
|
);
|
||||||
|
|
||||||
$defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0;
|
$defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0;
|
||||||
@ -531,7 +531,7 @@ function wp_dropdown_users( $args = '' ) {
|
|||||||
$r = wp_parse_args( $args, $defaults );
|
$r = wp_parse_args( $args, $defaults );
|
||||||
extract( $r, EXTR_SKIP );
|
extract( $r, EXTR_SKIP );
|
||||||
|
|
||||||
$blog_prefix = $wpdb->get_blog_prefix( $blog );
|
$blog_prefix = $wpdb->get_blog_prefix( $blog_id );
|
||||||
$query = "SELECT {$wpdb->users}.* FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities'";
|
$query = "SELECT {$wpdb->users}.* FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities'";
|
||||||
|
|
||||||
$query_where = array();
|
$query_where = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user