WordPress.org

Make WordPress Core

Ticket #15092: clipboard.3.patch

File clipboard.3.patch, 1.2 KB (added by hakre, 8 years ago)

probably better substr than trim

  • wp-admin/network.php

     
    355355                                $keys_salts[ $c ] = substr( array_shift( $from_api ), 28, 64 );
    356356                        }
    357357                }
     358                $key_salts_config = '';
     359                foreach ( $keys_salts as $c => $v ) {
     360                        $key_salts_config .= "\ndefine( '{$c}', '{$v}' );";
     361                }
     362                $key_salts_config = substr( $key_salts_config , 1 );
    358363                $num_keys_salts = count( $keys_salts );
    359364?>
    360365        <p><?php
    361366                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>
    362         <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php
    363         foreach ( $keys_salts as $c => $v ) {
    364                 echo "\ndefine( '$c', '" . wp_htmledit_pre( $v ) . "' );";
    365         }
    366 ?></textarea>
     367        <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>">
     368<?php echo wp_htmledit_pre( $key_salts_config ); ?></textarea>
    367369<?php
    368370        }
    369371?>