Changeset 11118 for trunk/wp-includes/functions.php
- Timestamp:
- 04/29/2009 05:43:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r11109 r11118 827 827 828 828 update_user_option( $current_user->ID, 'user-settings', $settings ); 829 setcookie('wp-settings-' .$current_user->ID, $settings, time() + 31536000, SITECOOKIEPATH);829 setcookie('wp-settings-' . $current_user->ID, $settings, time() + 31536000, SITECOOKIEPATH); 830 830 } 831 831 } … … 844 844 return array(); 845 845 846 if ( isset($_COOKIE['wp-settings-'.$user->ID]) ) { 847 $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-'.$user->ID] ); 848 849 if ( $cookie && strpos($cookie, '=') ) { // the '=' cannot be 1st char 846 $arr = array(); 847 if ( isset($_COOKIE['wp-settings-' . $user->ID]) ) { 848 $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user->ID] ); 849 850 if ( $cookie && strpos($cookie, '=') ) // the '=' cannot be 1st char 850 851 parse_str($cookie, $arr); 851 return $arr; 852 } 853 } 854 855 return array(); 852 853 } elseif ( isset($user->wp_usersettings) && is_string($user->wp_usersettings) ) { 854 parse_str( $user->wp_usersettings, $arr ); 855 } 856 857 return $arr; 856 858 } 857 859
Note: See TracChangeset
for help on using the changeset viewer.