Changeset 19933
- Timestamp:
- 02/16/2012 03:42:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r19907 r19933 2621 2621 2622 2622 switch ( $option ) { 2623 case 'admin_email': 2624 $value = sanitize_email($value); 2625 if ( !is_email($value) ) { 2623 case 'admin_email' : 2624 case 'new_admin_email' : 2625 $value = sanitize_email( $value ); 2626 if ( ! is_email( $value ) ) { 2626 2627 $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization 2627 if ( function_exists('add_settings_error') ) 2628 add_settings_error('admin_email', 'invalid_admin_email', __('The email address entered did not appear to be a valid email address. Please enter a valid email address.')); 2629 } 2630 break; 2631 2632 case 'new_admin_email': 2633 $value = sanitize_email($value); 2634 if ( !is_email($value) ) { 2635 $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization 2636 if ( function_exists('add_settings_error') ) 2637 add_settings_error('new_admin_email', 'invalid_admin_email', __('The email address entered did not appear to be a valid email address. Please enter a valid email address.')); 2628 if ( function_exists( 'add_settings_error' ) ) 2629 add_settings_error( $option, 'invalid_admin_email', __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' ) ); 2638 2630 } 2639 2631 break;
Note: See TracChangeset
for help on using the changeset viewer.