Changeset 50228 for trunk/src/wp-admin/users.php
- Timestamp:
- 02/05/2021 02:38:15 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.