mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function. This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation. Props spacedmonkey. See #28290. git-svn-id: https://develop.svn.wordpress.org/trunk@34778 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1961,19 +1961,19 @@ function wp_salt( $scheme = 'auth' ) {
|
||||
if ( defined( $const ) && constant( $const ) && empty( $duplicated_keys[ constant( $const ) ] ) ) {
|
||||
$values[ $type ] = constant( $const );
|
||||
} elseif ( ! $values[ $type ] ) {
|
||||
$values[ $type ] = get_site_option( "{$scheme}_{$type}" );
|
||||
$values[ $type ] = get_network_option( "{$scheme}_{$type}" );
|
||||
if ( ! $values[ $type ] ) {
|
||||
$values[ $type ] = wp_generate_password( 64, true, true );
|
||||
update_site_option( "{$scheme}_{$type}", $values[ $type ] );
|
||||
update_network_option( "{$scheme}_{$type}", $values[ $type ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( ! $values['key'] ) {
|
||||
$values['key'] = get_site_option( 'secret_key' );
|
||||
$values['key'] = get_network_option( 'secret_key' );
|
||||
if ( ! $values['key'] ) {
|
||||
$values['key'] = wp_generate_password( 64, true, true );
|
||||
update_site_option( 'secret_key', $values['key'] );
|
||||
update_network_option( 'secret_key', $values['key'] );
|
||||
}
|
||||
}
|
||||
$values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] );
|
||||
|
||||
Reference in New Issue
Block a user