Changeset 24813 for trunk/wp-admin/includes/ms.php
- Timestamp:
- 07/28/2013 07:45:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r24245 r24813 503 503 echo implode( "\n\t", $output ); 504 504 } 505 506 /* Warn the admin if SECRET SALT information is missing from wp-config.php */507 function secret_salt_warning() {508 if ( !is_super_admin() )509 return;510 $secret_keys = array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT' );511 $out = '';512 foreach( $secret_keys as $key ) {513 if ( ! defined( $key ) )514 $out .= "define( '$key', '" . esc_html( wp_generate_password( 64, true, true ) ) . "' );<br />";515 }516 if ( $out != '' ) {517 $msg = __( 'Warning! WordPress encrypts user cookies, but you must add the following lines to <strong>wp-config.php</strong> for it to be more secure.' );518 $msg .= '<br/>' . __( "Before the line <code>/* That's all, stop editing! Happy blogging. */</code> please add this code:" );519 $msg .= "<br/><br/><code>$out</code>";520 521 echo "<div class='update-nag'>$msg</div>";522 }523 }524 add_action( 'network_admin_notices', 'secret_salt_warning' );525 505 526 506 function site_admin_notice() {
Note: See TracChangeset
for help on using the changeset viewer.