diff --git a/includes/Brands.php b/includes/Brands.php index 3afce1c..5f78ac2 100644 --- a/includes/Brands.php +++ b/includes/Brands.php @@ -94,12 +94,18 @@ public static function get_brands() { 'utm_medium' => 'brand-plugin', ), ), + 'migrationInfo' => array( + 'defaultLink' => Config::is_jarvis() ? + 'https://www.bluehost.com/my-account/hosting/details/sites/add/transfer' + : 'https://my.bluehost.com/cgi/services/migration', + ), 'config' => array( 'enabled_flows' => array( 'ecommerce' => true, 'wp-setup' => true, ), 'wonder_blocks' => true, + 'prioritization' => false, ), ), 'bluehost-india' => array( @@ -154,12 +160,14 @@ public static function get_brands() { 'utm_medium' => 'brand-plugin', ), ), + 'migrationInfo' => array(), 'config' => array( 'enabled_flows' => array( 'ecommerce' => true, 'wp-setup' => false, ), 'wonder_blocks' => true, + 'prioritization' => false, ), ), 'webcom' => array( @@ -212,12 +220,14 @@ public static function get_brands() { 'utm_medium' => '', ), ), + 'migrationInfo' => array(), 'config' => array( 'enabled_flows' => array( 'ecommerce' => false, 'wp-setup' => false, ), 'wonder_blocks' => true, + 'prioritization' => false, ), ), 'crazy-domains' => array( @@ -270,12 +280,81 @@ public static function get_brands() { 'utm_medium' => 'brand-plugin', ), ), + 'migrationInfo' => array(), + 'config' => array( + 'enabled_flows' => array( + 'ecommerce' => true, + 'wp-setup' => true, + ), + 'wonder_blocks' => true, + 'prioritization' => false, + 'views' => array( + 'sidebar' => array( + 'illustration' => array( + 'shown' => false, + ), + ), + ), + ), + ), + 'hostgator-br' => array( + 'brand' => 'hostgator-br', + 'name' => 'HostGator', + 'url' => 'https://www.hostgator.com.br', + 'knowledgeBaseUrl' => 'https://suporte.hostgator.com.br/hc/pt-br', + 'helpUrl' => 'https://cliente.hostgator.com.br/suporte', + 'blogUrl' => 'https://www.hostgator.com.br/blog/', + 'facebookUrl' => 'https://www.facebook.com/HostgatorBrasil/', + 'twitterName' => '@hostgatorbrasil', + 'twitterUrl' => 'https://twitter.com/hostgatorbrasil', + 'youtubeUrl' => 'https://www.youtube.com/c/HostGatorBrasil', + 'linkedinUrl' => 'https://www.linkedin.com/company/hostgator-latam/', + 'accountUrl' => 'https://financeiro.hostgator.com.br/', + 'domainsUrl' => 'https://cliente.hostgator.com.br/dominios', + 'emailUrl' => 'https://cliente.hostgator.com.br/emails-list', + 'pluginDashboardPage' => \admin_url( 'admin.php?page=hostgator' ), + 'phoneNumbers' => array( + 'support' => '', + ), + 'hireExpertsInfo' => array( + 'defaultLink' => 'https://suporte.hostgator.com.br/hc/pt-br', + 'fragment' => '', + 'queryParameters' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + 'utm_campaign' => 'wp-setup', + ), + ), + 'expertsInfo' => array( + 'defaultLink' => 'https://suporte.hostgator.com.br/hc/pt-br', + 'queryParams' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + ), + ), + 'fullServiceCreativeTeamInfo' => array( + 'defaultLink' => 'https://suporte.hostgator.com.br/hc/pt-br', + 'fragment' => '', + 'queryParams' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + ), + ), + 'techSupportInfo' => array( + 'defaultLink' => 'https://suporte.hostgator.com.br/hc/pt-br', + 'queryParams' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + ), + ), + 'migrationInfo' => array(), 'config' => array( 'enabled_flows' => array( 'ecommerce' => true, 'wp-setup' => true, ), 'wonder_blocks' => true, + 'prioritization' => false, 'views' => array( 'sidebar' => array( 'illustration' => array( @@ -292,7 +371,7 @@ public static function get_brands() { * Sets the hosting brand for which Onboarding is active. * * @param object $container The brand plugin container. - * @return void + * @return string */ public static function set_current_brand( $container ) { if ( ! defined( 'NFD_ONBOARDING_PLUGIN_BRAND' ) ) { @@ -300,7 +379,17 @@ public static function set_current_brand( $container ) { if ( empty( $brand ) ) { $brand = 'wordpress'; } - define( 'NFD_ONBOARDING_PLUGIN_BRAND', sanitize_title_with_dashes( str_replace( '_', '-', $brand ) ) ); + + if ( false !== strpos( $brand, 'hostgator' ) ) { + $region = strtolower( $container->plugin()->region ); + $brand = "hostgator-{$region}"; + } + + $brand = sanitize_title_with_dashes( str_replace( '_', '-', $brand ) ); + + define( 'NFD_ONBOARDING_PLUGIN_BRAND', $brand ); + + return $brand; } } } diff --git a/includes/Config.php b/includes/Config.php index 1f99a20..f3294dd 100644 --- a/includes/Config.php +++ b/includes/Config.php @@ -1,6 +1,8 @@ get( $capability ); + } + + /** + * Checks if the site is on Jarvis hosting. + * + * @return boolean + */ + public static function is_jarvis() { + return self::get_site_capability( 'isJarvis' ); + } }