mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Conditionally set the the secure flag on the test cookie, post password cookie, settings cookies, and comment author cookies depending on whether the front end and/or admin area are served over https. Fixes #28427
git-svn-id: https://develop.svn.wordpress.org/trunk@28895 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -746,8 +746,9 @@ function wp_user_settings() {
|
||||
}
|
||||
|
||||
// The cookie is not set in the current browser or the saved value is newer.
|
||||
setcookie( 'wp-settings-' . $user_id, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH );
|
||||
setcookie( 'wp-settings-time-' . $user_id, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH );
|
||||
$secure = is_https_url( site_url() );
|
||||
setcookie( 'wp-settings-' . $user_id, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
|
||||
setcookie( 'wp-settings-time-' . $user_id, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
|
||||
$_COOKIE['wp-settings-' . $user_id] = $settings;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user