secret_salt_warning [ WordPress Function ]
secret_salt_warning ( No parameters )
| Defined at: |
|
No description yet.
Source
<?php
function secret_salt_warning() {
if ( !is_super_admin() )
return;
$secret_keys = array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT' );
$out = '';
foreach( $secret_keys as $key ) {
if ( ! defined( $key ) )
$out .= "define( '$key', '" . esc_html( wp_generate_password( 64, true, true ) ) . "' );<br />";
}
if ( $out != '' ) {
$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.' );
$msg .= '<br/>' . __( "Before the line <code>/* That's all, stop editing! Happy blogging. */</code> please add this code:" );
$msg .= "<br/><br/><code>$out</code>";
echo "<div class='update-nag'>$msg</div>";
}
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/secret salt warning « WordPress Codex
Function Reference/secret salt warning. Source File. secret_salt_warning() is located in wp-admin/includes/ms.php . See also index of Function Reference and ...
codex.wordpress.org - #14803 (Admins should be warned if authentication keys and salts ...
(See secret_salt_warning() in wp-admin/includes/ms.php) While performing that ... The attached patch modifies secret_salt_warning() to also check that the ...
core.trac.wordpress.org - PHPXRef 0.7 : WordPress : /wp-admin/includes/ms.php source
... wp-config.php */ 527 function secret_salt_warning() { 528 if ( !is_super_admin() ) 529 return; 530 $secret_keys = array( 'AUTH_KEY', 'SECURE_AUTH_KEY', ...
phpxref.ftwr.co.uk - /wp-admin/includes/ms.php source - PHP Cross Reference ...
Jun 1, 2011... is missing from wp-config.php */ 576 function secret_salt_warning() ... ' secret_salt_warning' ); 594 595 function site_admin_notice() { 596 ...
xref.yoast.com