Skip to content

Commit

Permalink
Conditionally set WP_HOME and WP_SITEURL
Browse files Browse the repository at this point in the history
Fix #353
  • Loading branch information
marfillaster authored Feb 3, 2023
1 parent 1e90ec6 commit dda6d2f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions wp-config-pantheon.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@
$scheme = 'https';
$_SERVER['HTTPS'] = 'on';
}
define('WP_HOME', $scheme . '://' . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', $scheme . '://' . $_SERVER['HTTP_HOST']);

if ( ! defined( 'WP_HOME' ) {
define('WP_HOME', $scheme . '://' . $_SERVER['HTTP_HOST']);
}

if ( ! defined( 'WP_SITEURL' ) {
define('WP_SITEURL', $scheme . '://' . $_SERVER['HTTP_HOST']);
}
}
// Don't show deprecations; useful under PHP 5.5
error_reporting(E_ALL ^ E_DEPRECATED);
Expand Down

0 comments on commit dda6d2f

Please sign in to comment.