Changeset 10285
- Timestamp:
- 12/31/2008 05:40:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10268 r10285 2587 2587 } 2588 2588 2589 /** 2590 * {@internal Missing Short Description}} 2591 * 2592 * @since unknown 2593 * 2594 * @param unknown_type $default 2595 */ 2596 function wp_dropdown_roles( $default = false ) { 2589 2590 /** 2591 * Print out <option> html elements for role selectors based on $wp_roles 2592 * 2593 * @package WordPress 2594 * @subpackage Administration 2595 * @since 2.1 2596 * 2597 * @uses $wp_roles 2598 * @param string $default slug for the role that should be already selected 2599 */ 2600 function wp_dropdown_roles( $selected = false ) { 2597 2601 global $wp_roles; 2598 2602 $p = ''; 2599 2603 $r = ''; 2600 foreach( $wp_roles->role_names as $role => $name ) { 2604 2605 $role_names = $wp_roles->role_names; 2606 $role_names = apply_filters('role_names_listing', $role_names); 2607 2608 foreach( $role_names as $role => $name ) { 2601 2609 $name = translate_with_context($name); 2602 if ( $ default== $role ) // Make default first in list2610 if ( $selected == $role ) // Make default first in list 2603 2611 $p = "\n\t<option selected='selected' value='$role'>$name</option>"; 2604 2612 else
Note: See TracChangeset
for help on using the changeset viewer.