From a185eeb0b424fe3e347bc064eae4c7af90ad3a6e Mon Sep 17 00:00:00 2001 From: J Ryan Wagner Date: Tue, 21 Mar 2023 16:57:23 -0400 Subject: [PATCH] CMSP-9: Defines multisite variable where appropriate. (#11) * CMSP-9: Defines multisite variable where appropriate. * Fix spacing issue Co-authored-by: Chris Reynolds --------- Co-authored-by: Ryan Wagner Co-authored-by: Chris Reynolds --- pantheon.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pantheon.php b/pantheon.php index 7bd9168..c94afed 100644 --- a/pantheon.php +++ b/pantheon.php @@ -40,6 +40,11 @@ */ define( 'FS_METHOD', 'direct' ); } + // When developing a WordPress Multisite locally, ensure that this constant is set. + // This will set the Multisite variable in all Pantheon environments. + if ( getenv( 'FRAMEWORK' ) === 'wordpress_network' && ! defined( 'WP_ALLOW_MULTISITE' ) ) { + define( 'WP_ALLOW_MULTISITE', true ); + } if ( defined( 'WP_ALLOW_MULTISITE' ) && ( ! defined( 'MULTISITE' ) || empty( MULTISITE ) ) ) { require_once 'inc/pantheon-multisite-finalize.php'; }