Networks and Sites: Readjust tabs in wp-admin/includes/network.php for (more or less) consistent alignment.

See #47062.

git-svn-id: https://develop.svn.wordpress.org/trunk@45391 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-05-23 23:34:40 +00:00
parent 4f51d3679c
commit 60df42d187

View File

@ -257,7 +257,7 @@ function network_step1( $errors = false ) {
echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>'; echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>';
} }
$is_www = ( 0 === strpos( $hostname, 'www.' ) ); $is_www = ( 0 === strpos( $hostname, 'www.' ) );
if ( $is_www ) : if ( $is_www ) :
?> ?>
<h3><?php esc_html_e( 'Server Address' ); ?></h3> <h3><?php esc_html_e( 'Server Address' ); ?></h3>
@ -462,24 +462,24 @@ function network_step2( $errors = false ) {
<?php <?php
} }
?> ?>
<ol> <ol>
<li><p> <li><p>
<?php <?php
printf( printf(
/* translators: 1: wp-config.php, 2: location of wp-config file, 3: translated version of "That's all, stop editing! Happy publishing." */ /* translators: 1: wp-config.php, 2: location of wp-config file, 3: translated version of "That's all, stop editing! Happy publishing." */
__( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ), __( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'<code>' . $location_of_wp_config . '</code>', '<code>' . $location_of_wp_config . '</code>',
/* /*
* translators: This string should only be translated if wp-config-sample.php is localized. * translators: This string should only be translated if wp-config-sample.php is localized.
* You can check the localized release package or * You can check the localized release package or
* https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php * https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
*/ */
'<code>/* ' . __( 'That&#8217;s all, stop editing! Happy publishing.' ) . ' */</code>' '<code>/* ' . __( 'That&#8217;s all, stop editing! Happy publishing.' ) . ' */</code>'
); );
?> ?>
</p> </p>
<textarea class="code" readonly="readonly" cols="100" rows="7"> <textarea class="code" readonly="readonly" cols="100" rows="7">
define('MULTISITE', true); define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', <?php echo $subdomain_install ? 'true' : 'false'; ?>); define('SUBDOMAIN_INSTALL', <?php echo $subdomain_install ? 'true' : 'false'; ?>);
define('DOMAIN_CURRENT_SITE', '<?php echo $hostname; ?>'); define('DOMAIN_CURRENT_SITE', '<?php echo $hostname; ?>');
@ -487,61 +487,61 @@ define('PATH_CURRENT_SITE', '<?php echo $base; ?>');
define('SITE_ID_CURRENT_SITE', 1); define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
</textarea> </textarea>
<?php <?php
$keys_salts = array( $keys_salts = array(
'AUTH_KEY' => '', 'AUTH_KEY' => '',
'SECURE_AUTH_KEY' => '', 'SECURE_AUTH_KEY' => '',
'LOGGED_IN_KEY' => '', 'LOGGED_IN_KEY' => '',
'NONCE_KEY' => '', 'NONCE_KEY' => '',
'AUTH_SALT' => '', 'AUTH_SALT' => '',
'SECURE_AUTH_SALT' => '', 'SECURE_AUTH_SALT' => '',
'LOGGED_IN_SALT' => '', 'LOGGED_IN_SALT' => '',
'NONCE_SALT' => '', 'NONCE_SALT' => '',
); );
foreach ( $keys_salts as $c => $v ) { foreach ( $keys_salts as $c => $v ) {
if ( defined( $c ) ) { if ( defined( $c ) ) {
unset( $keys_salts[ $c ] ); unset( $keys_salts[ $c ] );
}
} }
}
if ( ! empty( $keys_salts ) ) { if ( ! empty( $keys_salts ) ) {
$keys_salts_str = ''; $keys_salts_str = '';
$from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
if ( is_wp_error( $from_api ) ) { if ( is_wp_error( $from_api ) ) {
foreach ( $keys_salts as $c => $v ) { foreach ( $keys_salts as $c => $v ) {
$keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );"; $keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );";
}
} else {
$from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) );
foreach ( $keys_salts as $c => $v ) {
$keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );";
}
} }
} else { $num_keys_salts = count( $keys_salts );
$from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) ); ?>
foreach ( $keys_salts as $c => $v ) { <p>
$keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );"; <?php
if ( 1 == $num_keys_salts ) {
printf(
/* translators: %s: wp-config.php */
__( 'This unique authentication key is also missing from your %s file.' ),
'<code>wp-config.php</code>'
);
} else {
printf(
/* translators: %s: wp-config.php */
__( 'These unique authentication keys are also missing from your %s file.' ),
'<code>wp-config.php</code>'
);
} }
} ?>
$num_keys_salts = count( $keys_salts ); <?php _e( 'To make your installation more secure, you should also add:' ); ?>
?> </p>
<p> <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php echo esc_textarea( $keys_salts_str ); ?></textarea>
<?php <?php
if ( 1 == $num_keys_salts ) {
printf(
/* translators: %s: wp-config.php */
__( 'This unique authentication key is also missing from your %s file.' ),
'<code>wp-config.php</code>'
);
} else {
printf(
/* translators: %s: wp-config.php */
__( 'These unique authentication keys are also missing from your %s file.' ),
'<code>wp-config.php</code>'
);
} }
?> ?>
<?php _e( 'To make your installation more secure, you should also add:' ); ?> </li>
</p>
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php echo esc_textarea( $keys_salts_str ); ?></textarea>
<?php
}
?>
</li>
<?php <?php
if ( iis7_supports_permalinks() ) : if ( iis7_supports_permalinks() ) :
// IIS doesn't support RewriteBase, all your RewriteBase are belong to us // IIS doesn't support RewriteBase, all your RewriteBase are belong to us