From 987c35a790ac95c62c7f817ea135cd8cac7558bd Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 4 Dec 2012 00:51:02 +0000 Subject: [PATCH] Multisite in a subdirectory: For subdomain installs, use a root admin cookie path, not a wp-admin specific one. This is necessary because, like subdirectory installs, we will have wp-admin accessed at different levels. fixes #22705. git-svn-id: http://core.svn.wordpress.org/trunk@23005 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-default-constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index 2a193afa98..53dfc9b55c 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -63,7 +63,7 @@ function ms_cookie_constants( ) { * @since 2.6.0 */ if ( !defined( 'ADMIN_COOKIE_PATH' ) ) { - if( !is_subdomain_install() ) { + if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); } else { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );