Use wp_dropdown_roles() in wp-admin/network/site-users.php.
props jeremyfelt. fixes #27215. Built from https://develop.svn.wordpress.org/trunk@27310 git-svn-id: http://core.svn.wordpress.org/trunk@27163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
abebb1fde2
commit
af4f68b410
|
@ -52,10 +52,6 @@ $is_main_site = is_main_site( $id );
|
|||
|
||||
switch_to_blog( $id );
|
||||
|
||||
$editblog_roles = $wp_roles->roles;
|
||||
|
||||
$default_role = get_option( 'default_role' );
|
||||
|
||||
$action = $wp_list_table->current_action();
|
||||
|
||||
if ( $action ) {
|
||||
|
@ -270,13 +266,7 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
|
|||
<tr>
|
||||
<th scope="row"><?php _e( 'Role' ); ?></th>
|
||||
<td><select name="new_role" id="new_role_0">
|
||||
<?php
|
||||
reset( $editblog_roles );
|
||||
foreach ( $editblog_roles as $role => $role_assoc ) {
|
||||
$name = translate_user_role( $role_assoc['name'] );
|
||||
echo '<option ' . selected( $default_role, $role, false ) . ' value="' . esc_attr( $role ) . '">' . esc_html( $name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -309,13 +299,7 @@ if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_use
|
|||
<tr>
|
||||
<th scope="row"><?php _e( 'Role' ); ?></th>
|
||||
<td><select name="new_role" id="new_role_0">
|
||||
<?php
|
||||
reset( $editblog_roles );
|
||||
foreach ( $editblog_roles as $role => $role_assoc ) {
|
||||
$name = translate_user_role( $role_assoc['name'] );
|
||||
echo '<option ' . selected( $default_role, $role, false ) . ' value="' . esc_attr( $role ) . '">' . esc_html( $name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr class="form-field">
|
||||
|
|
Loading…
Reference in New Issue