Fix the wp-settings-* cookies used in getUserSetting()/setUserSetting(). They should be set without COOKIE_DOMAIN to work properly for sub-domains. Fixes #29095.

git-svn-id: https://develop.svn.wordpress.org/trunk@29478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2014-08-13 02:46:18 +00:00
parent 6d6bce429d
commit b343d48221
3 changed files with 23 additions and 45 deletions

View File

@@ -72,8 +72,9 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" );
did_action( 'init' ) && $scripts->localize( 'utils', 'userSettings', array(
'url' => (string) SITECOOKIEPATH,
'uid' => get_current_user_id() . '-' . get_current_blog_id(),
'uid' => (string) get_current_user_id(),
'time' => (string) time(),
'secure' => (string) ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) ),
) );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );