Changeset 9131 for trunk/wp-admin/options.php
- Timestamp:
- 10/13/2008 06:32:16 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/options.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options.php
r9066 r9131 42 42 43 43 case 'update': 44 $any_changed = 0;45 46 44 $option_page = $_POST[ 'option_page' ]; 47 45 check_admin_referer( $option_page . '-options' ); … … 50 48 wp_die( __( 'Error! Options page not found.' ) ); 51 49 52 if ( $option_page == 'options') {50 if ( 'options' == $option_page ) { 53 51 $options = explode(',', stripslashes( $_POST[ 'page_options' ] )); 54 52 } else { … … 56 54 } 57 55 58 if ($options) { 59 foreach ($options as $option) { 56 // Handle custom date/time formats 57 if ( 'general' == $option_page ) { 58 if ( !empty($_POST['date_format']) && !empty($_POST['date_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['date_format'] ) ) 59 $_POST['date_format'] = $_POST['date_format_custom']; 60 if ( !empty($_POST['time_format']) && !empty($_POST['time_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['time_format'] ) ) 61 $_POST['time_format'] = $_POST['time_format_custom']; 62 } 63 64 if ( $options ) { 65 foreach ( $options as $option ) { 60 66 $option = trim($option); 61 67 $value = $_POST[$option]; 62 if (!is_array($value))$value = trim($value);68 if ( !is_array($value) ) $value = trim($value); 63 69 $value = stripslashes_deep($value); 64 70 update_option($option, $value); … … 66 72 } 67 73 68 $goback = add_query_arg( 'updated', 'true', wp_get_referer());69 wp_redirect( $goback);70 break;74 $goback = add_query_arg( 'updated', 'true', wp_get_referer() ); 75 wp_redirect( $goback ); 76 break; 71 77 72 78 default:
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)