diff --git a/wp-admin/network.php b/wp-admin/network.php index 01006442d7..1c36a434be 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -365,27 +365,24 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); if ( defined( $c ) ) unset( $keys_salts[ $c ] ); } - if ( ! empty( $keys_salts ) ) { + if ( ! empty( $keys_salts ) ) { + $keys_salts_str = ''; $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); if ( is_wp_error( $from_api ) ) { foreach ( $keys_salts as $c => $v ) { - $keys_salts[ $c ] = wp_generate_password( 64, true, true ); + $keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );"; } } else { $from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) ); foreach ( $keys_salts as $c => $v ) { - $keys_salts[ $c ] = substr( array_shift( $from_api ), 28, 64 ); + $keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );"; } } $num_keys_salts = count( $keys_salts ); ?>
wp-config.php file.', 'These unique authentication keys are also missing from your wp-config.php
file.', $num_keys_salts ); ?>