diff --git a/bootstrap.php b/bootstrap.php index 8f8bdfc83..f3f5d2262 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -63,17 +63,26 @@ function () { ) ); -// Set performance settings -$cache_types = array( 'browser', 'skip404' ); -if ( 'atomic' === getContext( 'platform' ) ) { - $cache_types = array(); -} -$bluehost_module_container->set( 'cache_types', $cache_types ); +// Assign container values based on context +add_action( + 'plugins_loaded', + function () { + global $bluehost_module_container; + + // Performance default settings + $cache_types = array( 'browser', 'skip404' ); + // Marketplace default settings + $marketplace_brand = 'bluehost'; + + // Platform overrides + if ( 'atomic' === getContext( 'platform' ) ) { + $cache_types = array(); + $marketplace_brand = 'bluehost-cloud'; + } -// Marketplace settings -$bluehost_module_container->set( - 'marketplace_brand', - 'atomic' !== getContext( 'platform' ) ? 'bluehost' : 'bluehost-cloud' + $bluehost_module_container->set( 'cache_types', $cache_types ); + $bluehost_module_container->set( 'marketplace_brand', $marketplace_brand ); + } ); // Properly get branding links depending on market