New secure cookie protocol. see #5367

git-svn-id: https://develop.svn.wordpress.org/trunk@6387 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-12-16 17:41:59 +00:00
parent 3155e09967
commit bb7922cd42
7 changed files with 171 additions and 116 deletions

View File

@@ -128,7 +128,7 @@ function update_recently_edited( $file ) {
update_option( 'recently_edited', $oldfiles );
}
// If siteurl or home changed, reset cookies and flush rewrite rules.
// If siteurl or home changed, flush rewrite rules.
function update_home_siteurl( $old_value, $value ) {
global $wp_rewrite, $user_login, $user_pass_md5;
@@ -137,10 +137,6 @@ function update_home_siteurl( $old_value, $value ) {
// If home changed, write rewrite rules to new location.
$wp_rewrite->flush_rules();
// Clear cookies for old paths.
wp_clearcookie();
// Set cookies for new paths.
wp_setcookie( $user_login, $user_pass_md5, true, get_option( 'home' ), get_option( 'siteurl' ));
}
add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );