From 49e39c3b5989c7902e018dd0a476f043e55108d0 Mon Sep 17 00:00:00 2001 From: wpmuguru Date: Mon, 3 May 2010 18:53:05 +0000 Subject: [PATCH] only use domain cookies in a subdomain install, see #12142 git-svn-id: http://svn.automattic.com/wordpress/trunk@14380 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-default-constants.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index ac3e612f0..23e04f3c4 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -63,8 +63,8 @@ function ms_cookie_constants( ) { /** * @since 2.0.0 */ - if ( !defined('COOKIE_DOMAIN') && 'localhost' != $current_site->domain ) { - if ( isset( $current_site->cookie_domain ) ) + if ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) { + if ( !empty( $current_site->cookie_domain ) ) define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); else define('COOKIE_DOMAIN', '.' . $current_site->domain);