Correctly calculate the location of wp-config.php, used in the instructions for setting up a network. see #22639.
git-svn-id: http://core.svn.wordpress.org/trunk@22980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5d0933d884
commit
f74e41b389
|
@ -316,6 +316,10 @@ function network_step2( $errors = false ) {
|
|||
$wp_siteurl_subdir = trailingslashit( '/' . preg_replace( '#^' . preg_quote( $base, '#' ) . '#', '', $wp_dir_from_root ) );
|
||||
$rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
|
||||
|
||||
$location_of_wp_config = ABSPATH;
|
||||
if ( ! file_exists( ABSPATH . 'wp-config.php' ) && file_exists( dirname( ABSPATH ) . '/wp-config.php' ) )
|
||||
$location_of_wp_config = trailingslashit( dirname( ABSPATH ) );
|
||||
|
||||
// Wildcard DNS message.
|
||||
if ( is_wp_error( $errors ) )
|
||||
echo '<div class="error">' . $errors->get_error_message() . '</div>';
|
||||
|
@ -360,7 +364,7 @@ function network_step2( $errors = false ) {
|
|||
}
|
||||
?>
|
||||
<ol>
|
||||
<li><p><?php printf( __( 'Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That’s all, stop editing! Happy blogging. */</code>:' ), ABSPATH ); ?></p>
|
||||
<li><p><?php printf( __( 'Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That’s all, stop editing! Happy blogging. */</code>:' ), $location_of_wp_config ); ?></p>
|
||||
<textarea class="code" readonly="readonly" cols="100" rows="6">
|
||||
define('MULTISITE', true);
|
||||
define('SUBDOMAIN_INSTALL', <?php echo $subdomain_install ? 'true' : 'false'; ?>);
|
||||
|
|
Loading…
Reference in New Issue