Changeset 4175 for trunk/wp-admin/options.php
- Timestamp:
- 09/08/2006 09:42:05 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/options.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options.php
r4144 r4175 87 87 } 88 88 89 // Save for later.90 $old_siteurl = get_option('siteurl');91 $old_home = get_option('home');92 93 89 if ($options) { 94 90 foreach ($options as $option) { … … 96 92 $value = trim(stripslashes($_POST[$option])); 97 93 $value = sanitize_option($option, $value); 98 99 if (update_option($option, $value) ) { 100 $any_changed++; 101 } 94 update_option($option, $value); 102 95 } 103 96 } 104 105 if ($any_changed) {106 // If siteurl or home changed, reset cookies.107 if ( get_option('siteurl') != $old_siteurl || get_option('home') != $old_home ) {108 // If home changed, write rewrite rules to new location.109 $wp_rewrite->flush_rules();110 // Clear cookies for old paths.111 wp_clearcookie();112 // Set cookies for new paths.113 wp_setcookie($user_login, $user_pass_md5, true, get_option('home'), get_option('siteurl'));114 }115 116 //$message = sprintf(__('%d setting(s) saved... '), $any_changed);117 }118 97 119 98 $referred = remove_query_arg('updated' , wp_get_referer());
Note: See TracChangeset
for help on using the changeset viewer.