Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.

See #37699.

Built from https://develop.svn.wordpress.org/trunk@38457


git-svn-id: http://core.svn.wordpress.org/trunk@38398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2016-08-31 04:55:54 +00:00
parent 049c36d11f
commit e5225324a2
9 changed files with 38 additions and 42 deletions

View File

@@ -965,8 +965,6 @@ function setup_userdata($for_user_id = '') {
* @since 2.3.0
* @since 4.5.0 Added the 'display_name_with_login' value for 'show'.
*
* @global int $blog_id
*
* @param array|string $args {
* Optional. Array or string of arguments to generate a drop-down of users.
* See WP_User_Query::prepare_query() for additional available arguments.
@@ -1016,7 +1014,7 @@ function wp_dropdown_users( $args = '' ) {
'include' => '', 'exclude' => '', 'multi' => 0,
'show' => 'display_name', 'echo' => 1,
'selected' => 0, 'name' => 'user', 'class' => '', 'id' => '',
'blog_id' => $GLOBALS['blog_id'], 'who' => '', 'include_selected' => false,
'blog_id' => get_current_blog_id(), 'who' => '', 'include_selected' => false,
'option_none_value' => -1
);