Changeset 40323
- Timestamp:
- 03/24/2017 02:52:26 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r40059 r40323 822 822 */ 823 823 function wp_dropdown_roles( $selected = '' ) { 824 $p = '';825 824 $r = ''; 826 825 … … 829 828 foreach ( $editable_roles as $role => $details ) { 830 829 $name = translate_user_role($details['name'] ); 831 if ( $selected == $role ) // preselect specified role 832 $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>"; 833 else 834 $r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>"; 835 } 836 echo $p . $r; 830 // preselect specified role 831 if ( $selected == $role ) { 832 $r .= "\n\t<option selected='selected' value='" . esc_attr( $role ) . "'>$name</option>"; 833 } else { 834 $r .= "\n\t<option value='" . esc_attr( $role ) . "'>$name</option>"; 835 } 836 } 837 838 echo $r; 837 839 } 838 840
Note: See TracChangeset
for help on using the changeset viewer.