Changeset 16746
- Timestamp:
- 12/06/2010 03:26:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network.php
r16672 r16746 366 366 unset( $keys_salts[ $c ] ); 367 367 } 368 if ( ! empty( $keys_salts ) ) { 368 if ( ! empty( $keys_salts ) ) { 369 $keys_salts_str = ''; 369 370 $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); 370 371 if ( is_wp_error( $from_api ) ) { 371 372 foreach ( $keys_salts as $c => $v ) { 372 $keys_salts [ $c ] = wp_generate_password( 64, true, true );373 $keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );"; 373 374 } 374 375 } else { 375 376 $from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) ); 376 377 foreach ( $keys_salts as $c => $v ) { 377 $keys_salts [ $c ] = substr( array_shift( $from_api ), 28, 64 );378 $keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );"; 378 379 } 379 380 } … … 382 383 <p><?php 383 384 echo _n( 'This unique authentication key is also missing from your <code>wp-config.php</code> file.', 'These unique authentication keys are also missing from your <code>wp-config.php</code> file.', $num_keys_salts ); ?> <?php _e( 'To make your installation more secure, you should also add:' ) ?></p> 384 <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php 385 foreach ( $keys_salts as $c => $v ) { 386 echo "\ndefine( '$c', '" . esc_textarea( $v ) . "' );"; 387 } 388 ?></textarea> 385 <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php echo esc_textarea( $keys_salts_str ); ?></textarea> 389 386 <?php 390 387 }
Note: See TracChangeset
for help on using the changeset viewer.