Allow overriding the default secret key. Proy. Props nbachiyski. fixes #5960
git-svn-id: https://develop.svn.wordpress.org/trunk@6982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
856d0f9f7a
commit
da19acbc4b
@ -1016,9 +1016,9 @@ if ( !function_exists('wp_salt') ) :
|
|||||||
* @return string Salt value from either 'SECRET_KEY' or 'secret' option
|
* @return string Salt value from either 'SECRET_KEY' or 'secret' option
|
||||||
*/
|
*/
|
||||||
function wp_salt() {
|
function wp_salt() {
|
||||||
|
global $wp_default_secret_key;
|
||||||
$secret_key = '';
|
$secret_key = '';
|
||||||
if ( defined('SECRET_KEY') && ('' != SECRET_KEY) && ('put your unique phrase here' != SECRET_KEY) )
|
if ( defined('SECRET_KEY') && ('' != SECRET_KEY) && ( $wp_default_secret_key != SECRET_KEY) )
|
||||||
$secret_key = SECRET_KEY;
|
$secret_key = SECRET_KEY;
|
||||||
|
|
||||||
if ( defined('SECRET_SALT') ) {
|
if ( defined('SECRET_SALT') ) {
|
||||||
|
@ -275,6 +275,12 @@ if (strpos($_SERVER['PHP_SELF'], 'install.php') === false) {
|
|||||||
define('COOKIEHASH', $cookiehash);
|
define('COOKIEHASH', $cookiehash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php
|
||||||
|
* @since 2.5
|
||||||
|
*/
|
||||||
|
$wp_default_secret_key = 'put your unique phrase here';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It is possible to define this in wp-config.php
|
* It is possible to define this in wp-config.php
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user