Ticket #22639: 22639.4.patch
| File 22639.4.patch, 2.8 KB (added by evansolomon, 6 months ago) |
|---|
-
wp-admin/network.php
315 315 $wp_dir_from_root = preg_replace( '#^' . preg_quote( $_SERVER['DOCUMENT_ROOT'], '#' ) . '#', '', ABSPATH ); 316 316 $wp_siteurl_subdir = trailingslashit( '/' . preg_replace( '#^' . preg_quote( $base, '#' ) . '#', '', $wp_dir_from_root ) ); 317 317 $rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : ''; 318 $home_path = trailingslashit( preg_replace( '#' . preg_quote( $wp_dir_from_root, '#' ) . '$#', '', ABSPATH ) ); 318 319 319 320 // Wildcard DNS message. 320 321 if ( is_wp_error( $errors ) ) … … 349 350 <h3><?php esc_html_e( 'Enabling the Network' ); ?></h3> 350 351 <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p> 351 352 <div class="updated inline"><p><?php 352 if ( file_exists( ABSPATH. '.htaccess' ) )353 if ( file_exists( $home_path . '.htaccess' ) ) 353 354 printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), '.htaccess' ); 354 elseif ( file_exists( ABSPATH. 'web.config' ) )355 elseif ( file_exists( $home_path . 'web.config' ) ) 355 356 printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), 'web.config' ); 356 357 else 357 358 _e( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> file.' ); … … 454 455 EOF; 455 456 456 457 ?> 457 <li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), trailingslashit( str_replace( trailingslashit( $wp_siteurl_subdir ), '', ABSPATH ) )); ?></p>458 <li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), $home_path ); ?></p> 458 459 <?php 459 460 if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) 460 461 echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>'; … … 488 489 EOF; 489 490 490 491 ?> 491 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH); ?></p>492 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), $home_path ); ?></p> 492 493 <?php 493 494 if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) 494 495 echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
