rebase on oct-10-2023
This commit is contained in:
@@ -263,7 +263,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>';
|
||||
}
|
||||
|
||||
$is_www = ( 0 === strpos( $hostname, 'www.' ) );
|
||||
$is_www = str_starts_with( $hostname, 'www.' );
|
||||
if ( $is_www ) :
|
||||
?>
|
||||
<h3><?php esc_html_e( 'Server Address' ); ?></h3>
|
||||
@@ -394,7 +394,7 @@ function network_step2( $errors = false ) {
|
||||
$base = parse_url( $slashed_home, PHP_URL_PATH );
|
||||
$document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
|
||||
$abspath_fix = str_replace( '\\', '/', ABSPATH );
|
||||
$home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
|
||||
$home_path = str_starts_with( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
|
||||
$wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
|
||||
$rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user