Multisite: Display correct roles in Network > Site Users screen for sites other than the main site.

Props jeremyfelt.
Fixes #42013.


git-svn-id: https://develop.svn.wordpress.org/trunk@41652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz 2017-09-30 03:19:26 +00:00
parent 6e74a9bf23
commit 75c4cb98f4
1 changed files with 10 additions and 2 deletions

View File

@ -298,7 +298,11 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
<tr>
<th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
<td><select name="new_role" id="new_role_adduser">
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
<?php
switch_to_blog( $id );
wp_dropdown_roles( get_option( 'default_role' ) );
restore_current_blog();
?>
</select></td>
</tr>
</table>
@ -331,7 +335,11 @@ if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_use
<tr>
<th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
<td><select name="new_role" id="new_role_newuser">
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
<?php
switch_to_blog( $id );
wp_dropdown_roles( get_option( 'default_role' ) );
restore_current_blog();
?>
</select></td>
</tr>
<tr class="form-field">