diff --git a/wp-admin/network.php b/wp-admin/network.php index e1a91d0a1..cf5deb9dc 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -179,7 +179,38 @@ $base = ''; define( 'DOMAIN_CURRENT_SITE', '' ); define( 'PATH_CURRENT_SITE', '' ); define( 'SITE_ID_CURRENT_SITE', 1 ); -define( 'BLOG_ID_CURRENT_SITE', 1 ); +define( 'BLOG_ID_CURRENT_SITE', 1 ); + '', 'SECURE_AUTH_KEY' => '', 'LOGGED_IN_KEY' => '', 'NONCE_KEY' => '', 'AUTH_SALT' => '', 'SECURE_AUTH_SALT' => '', 'LOGGED_IN_SALT' => '', 'NONCE_SALT' => '' ); + foreach ( $keys_salts as $c => $v ) { + if ( defined( $c ) ) + unset( $keys_salts[ $c ] ); + } + if ( ! empty( $keys_salts ) ) { + $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 ); + } + } 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 ); + } + } + $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 ); ?>

+ + + +

Once you complete these steps, your network is enabled and configured. Return to Dashboard

$v ) + foreach ( $secret_keys as $k => $v ) { $secret_keys[$k] = substr( $v, 28, 64 ); + } } $key = 0;