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:
parent
6e74a9bf23
commit
75c4cb98f4
|
@ -298,7 +298,11 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
|
<th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
|
||||||
<td><select name="new_role" id="new_role_adduser">
|
<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>
|
</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -331,7 +335,11 @@ if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_use
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
|
<th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
|
||||||
<td><select name="new_role" id="new_role_newuser">
|
<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>
|
</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="form-field">
|
<tr class="form-field">
|
||||||
|
|
Loading…
Reference in New Issue