- Timestamp:
- 02/05/2021 02:38:15 PM (4 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-users-list-table.php
r50129 r50228 301 301 <option value=""><?php _e( 'Change role to…' ); ?></option> 302 302 <?php wp_dropdown_roles(); ?> 303 <option value="none"><?php echo __( '— No role for this site —' ) ?> </option> 303 304 </select> 304 305 <?php -
trunk/src/wp-admin/users.php
r50139 r50228 115 115 $role = $_REQUEST['new_role']; 116 116 117 // Mocking the `none` role so we are able to save it to the database 118 $editable_roles['none'] = array( 119 'name' => __( '— No role for this site —' ), 120 ); 121 117 122 if ( ! $role || empty( $editable_roles[ $role ] ) ) { 118 123 wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 ); 124 } 125 126 if ( 'none' === $role ) { 127 $role = ''; 119 128 } 120 129
Note: See TracChangeset
for help on using the changeset viewer.