Set auth cookie for plugins directory to support direct load plugin files that call auth_redirect(). see #7001

git-svn-id: https://develop.svn.wordpress.org/trunk@8209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-06-27 22:54:21 +00:00
parent c7afa63283
commit b980b3f310
2 changed files with 26 additions and 9 deletions

View File

@@ -360,6 +360,20 @@ if ( !defined('COOKIEPATH') )
if ( !defined('SITECOOKIEPATH') )
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );
/**
* It is possible to define this in wp-config.php
* @since 2.6
*/
if ( !defined('ADMIN_COOKIE_PATH') )
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
/**
* It is possible to define this in wp-config.php
* @since 2.6
*/
if ( !defined('PLUGINS_COOKIE_PATH') )
define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) );
/**
* It is possible to define this in wp-config.php
* @since 2.0.0