Make WordPress Core

Changeset 41652


Ignore:
Timestamp:
09/30/2017 03:19:26 AM (7 years ago)
Author:
flixos90
Message:

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

Props jeremyfelt.
Fixes #42013.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-users.php

    r41225 r41652  
    299299            <th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
    300300            <td><select name="new_role" id="new_role_adduser">
    301             <?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
     301            <?php
     302            switch_to_blog( $id );
     303            wp_dropdown_roles( get_option( 'default_role' ) );
     304            restore_current_blog();
     305            ?>
    302306            </select></td>
    303307        </tr>
     
    332336            <th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
    333337            <td><select name="new_role" id="new_role_newuser">
    334             <?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
     338            <?php
     339            switch_to_blog( $id );
     340            wp_dropdown_roles( get_option( 'default_role' ) );
     341            restore_current_blog();
     342            ?>
    335343            </select></td>
    336344        </tr>
Note: See TracChangeset for help on using the changeset viewer.