Ticket #39386: 39386.patch
File 39386.patch, 1.0 KB (added by , 7 years ago) |
---|
-
src/wp-includes/default-constants.php
247 247 /** 248 248 * @since 1.2.0 249 249 */ 250 if ( !defined('COOKIEPATH') ) 251 define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) ); 250 if ( ! defined( 'COOKIEPATH' ) ) { 251 $home = get_option( 'home' ); 252 if ( ! $home ) { 253 $home = wp_guess_url(); 254 } 255 define( 'COOKIEPATH', preg_replace( '|https?://[^/]+|i', '', $home . '/' ) ); 256 } 252 257 253 258 /** 254 259 * @since 1.5.0 255 260 */ 256 if ( !defined('SITECOOKIEPATH') ) 257 define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) ); 261 if ( ! defined( 'SITECOOKIEPATH' ) ) { 262 $siteurl = get_option( 'siteurl' ); 263 if ( ! $siteurl ) { 264 $siteurl = wp_guess_url(); 265 } 266 define( 'SITECOOKIEPATH', preg_replace( '|https?://[^/]+|i', '', $siteurl . '/' ) ); 267 } 258 268 259 269 /** 260 270 * @since 2.6.0