WordPress.org

Make WordPress Core

Changeset 24813


Ignore:
Timestamp:
07/28/13 19:45:57 (9 months ago)
Author:
duck_
Message:

Remove unnecessary secret_salt_warning().

If salts/keys are not defined in wp-config.php then they will be generated
automatically and stored in the database. [19771] also deals with values
that are duplicated or set to default.

Fixes #14803.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r24245 r24813  
    503503    echo implode( "\n\t", $output ); 
    504504} 
    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' ); 
    525505 
    526506function site_admin_notice() { 
Note: See TracChangeset for help on using the changeset viewer.