| 28 | |
| 29 | $default_key = 'put your unique phrase here'; |
| 30 | $missing_key = false; |
| 31 | $duplicated_keys = array(); |
| 32 | |
| 33 | foreach ( array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT' ) as $key ) { |
| 34 | if ( defined( $key ) ) |
| 35 | $duplicated_keys[ constant( $key ) ] = isset( $duplicated_keys[ constant( $key ) ] ); |
| 36 | else |
| 37 | $missing_key = true; |
| 38 | } |
| 39 | |
| 40 | if ( isset( $duplicated_keys[ $default_key ] ) ) |
| 41 | $duplicated_keys[ $default_key ] = true; |
| 42 | $duplicated_keys = array_filter( $duplicated_keys ); |
| 43 | |
| 44 | if ( $duplicated_keys || $missing_key ) |
| 45 | echo '<p>' . sprintf( __( 'While you are in your <code>wp-config.php</code> file, you should also make sure you have the 8 unique phrases in place. You can generate these using the <a href="%s">WordPress.org secret key service</a>.' ), 'https://api.wordpress.org/secret-key/1.1/salt/' ) . '</p>'; |