From c2b5e81e373cdfe398494d05d1491b32050fa346 Mon Sep 17 00:00:00 2001
From: Chris Reynolds
Date: Tue, 30 Apr 2024 11:50:01 -0600
Subject: [PATCH] [BUGS-7678] update multisite install instructions to use
`PANTHEON_HOSTNAME` constant (#42)
* add a fallback $hostname and use that if SERVER['HTTP_HOST'] is not set
* simplify the config_file_contents and add a docblock for the filter
* remove the else condition
* use HTTP_HOST if available for lower environments, too
* remove complicated hostname configuration
replace with PANTHEON_HOSTNAME constant
* remove unused $hostname var
* update DOMAIN_CURRENT_SITE to only use PANTHEON_HOSTNAME if it's defined
---
inc/network/includes-network.php | 40 ++++++++------------------------
1 file changed, 10 insertions(+), 30 deletions(-)
diff --git a/inc/network/includes-network.php b/inc/network/includes-network.php
index 81268a7..d471899 100644
--- a/inc/network/includes-network.php
+++ b/inc/network/includes-network.php
@@ -360,7 +360,6 @@ function network_step1( $errors = false ) {
function network_step2( $errors = false ) {
global $wpdb, $is_nginx;
- $hostname = get_clean_basedomain();
$slashed_home = trailingslashit( get_option( 'home' ) );
$base = parse_url( $slashed_home, PHP_URL_PATH );
$document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
@@ -459,40 +458,21 @@ function network_step2( $errors = false ) {