Changeset 13197
- Timestamp:
- 02/18/2010 07:43:44 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r13177 r13197 3126 3126 * 3127 3127 * @param string $setting Slug title of the setting to which this error applies 3128 * @param string $ idSlug-name to identify the error. Used as part of 'id' attribute in HTML output.3128 * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output. 3129 3129 * @param string $message The formatted message text to display to the user (will be shown inside styled <div> and <p>) 3130 3130 * @param string $type The type of message it is, controls HTML class. Use 'error' or 'updated'. 3131 3131 */ 3132 function add_settings_error( $setting, $ id, $message, $type = 'error' ) {3132 function add_settings_error( $setting, $code, $message, $type = 'error' ) { 3133 3133 global $wp_settings_errors; 3134 3134 … … 3138 3138 $new_error = array( 3139 3139 'setting' => $setting, 3140 ' title' => $title, // @todo $title not defined. Use $id instead?3140 'code' => $code, 3141 3141 'message' => $message, 3142 3142 'type' => $type … … 3226 3226 $output = ''; 3227 3227 foreach ( $settings_errors as $key => $details ) { 3228 $css_id = 'setting-error-' . $details[' title'];3228 $css_id = 'setting-error-' . $details['code']; 3229 3229 $css_class = $details['type'] . ' fade settings-error'; 3230 3230 $output .= "<div id='$css_id' class='$css_class'> \n"; -
trunk/wp-includes/formatting.php
r13177 r13197 2381 2381 switch ($option) { 2382 2382 case 'admin_email': 2383 if ( !$value = sanitize_email($value) && function_exists('add_settings_error') ) 2383 $value = sanitize_email($value); 2384 if ( !$value && function_exists('add_settings_error') ) 2384 2385 add_settings_error('admin_email', 'invalid_admin_email', __('The E-Mail Address submitted was not in the right format. Please enter a valid Email Address')); 2385 2386 2386 break; 2387 2387
Note: See TracChangeset
for help on using the changeset viewer.