Changeset 3859 for trunk/wp-admin/user-edit.php
- Timestamp:
- 06/10/2006 08:26:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-edit.php
r3857 r3859 104 104 // print_r($profileuser); 105 105 echo '<select name="role">'; 106 $role_list = ''; 107 $user_has_role = false; 106 108 foreach($wp_roles->role_names as $role => $name) { 107 $selected = ($profileuser->has_cap($role)) ? ' selected="selected"' : ''; 108 echo "<option value=\"{$role}\"{$selected}>{$name}</option>"; 109 } 110 echo '</select>'; 109 if ( $profileuser->has_cap($role) ) { 110 $selected = ' selected="selected"'; 111 $user_has_role = true; 112 } else { 113 $selected = ''; 114 } 115 $role_list .= "<option value=\"{$role}\"{$selected}>{$name}</option>"; 116 } 117 if ( $user_has_role ) 118 $role_list .= '<option value="">' . __('— No role for this blog —') . '</option>'; 119 else 120 $role_list .= '<option value="" selected="selected">' . __('— No role for this blog —') . '</option>'; 121 echo $role_list . '</select>'; 111 122 ?></label></p> 112 123
Note: See TracChangeset
for help on using the changeset viewer.