Changeset 15590 for trunk/wp-admin/includes/template.php
- Timestamp:
- 09/07/2010 11:21:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r15555 r15590 713 713 714 714 /** 715 * Print out <option> html elements for role selectors based on $wp_roles 716 * 717 * @package WordPress 718 * @subpackage Administration 715 * Print out <option> html elements for role selectors 716 * 719 717 * @since 2.1 720 718 * 721 * @uses $wp_roles 722 * @param string $default slug for the role that should be already selected 719 * @param string $selected slug for the role that should be already selected 723 720 */ 724 721 function wp_dropdown_roles( $selected = false ) { … … 730 727 foreach ( $editable_roles as $role => $details ) { 731 728 $name = translate_user_role($details['name'] ); 732 if ( $selected == $role ) // Make default first in list729 if ( $selected == $role ) // preselect specified role 733 730 $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>"; 734 731 else … … 1269 1266 * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors. 1270 1267 * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted. 1271 * @return <type> 1272 */ 1273 function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) { 1268 */ 1269 function settings_errors( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) { 1274 1270 1275 1271 if ($hide_on_update AND $_GET['updated']) return; … … 1494 1490 * 1495 1491 * @since 2.7.0 1496 * @param int $ id The post id. If not supplied the global $post is used.1497 * 1498 */ 1499 function _draft_or_post_title( $post_id = 0) {1492 * @param int $post_id The post id. If not supplied the global $post is used. 1493 * @return string The post title if set 1494 */ 1495 function _draft_or_post_title( $post_id = 0 ) { 1500 1496 $title = get_the_title($post_id); 1501 1497 if ( empty($title) )
Note: See TracChangeset
for help on using the changeset viewer.