Skip to content

Commit

Permalink
Merge pull request #960 from bluehost/release/3.9.0
Browse files Browse the repository at this point in the history
Release/3.9.0
  • Loading branch information
circlecube authored Feb 28, 2024
2 parents a62af0d + 7158728 commit d01332a
Show file tree
Hide file tree
Showing 12 changed files with 3,452 additions and 20,249 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ jobs:
fail-fast: false
matrix:
phpVersion:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
wpVersion:
- '6.2'
- '6.3'
Expand Down
4 changes: 2 additions & 2 deletions bluehost-wordpress-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin URI: https://bluehost.com
* Update URI: https://github.com/bluehost/bluehost-wordpress-plugin
* Description: WordPress plugin that integrates a WordPress site with the Bluehost control panel, including performance, security, and update features.
* Version: 3.8.4
* Version: 3.9.0
* Requires at least: 6.0
* Requires PHP: 7.1
* Tested up to: 6.4.3
Expand All @@ -32,7 +32,7 @@
}

// Define constants
define( 'BLUEHOST_PLUGIN_VERSION', '3.8.4' );
define( 'BLUEHOST_PLUGIN_VERSION', '3.9.0' );
define( 'BLUEHOST_PLUGIN_FILE', __FILE__ );
define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
Expand Down
48 changes: 38 additions & 10 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
use WP_Forge\UpgradeHandler\UpgradeHandler;
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\ModuleLoader\Plugin;
use NewfoldLabs\WP\Context\Context;
use function NewfoldLabs\WP\ModuleLoader\container as setContainer;
use function NewfoldLabs\WP\Context\setContext;
use function NewfoldLabs\WP\Context\getContext;

// Composer autoloader
if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
Expand All @@ -25,12 +28,17 @@
}

/*
* Initialize coming soon module via container
* Initialize module settings via container
*/
$bluehost_module_container = new Container(
array(
'cache_types' => array( 'browser', 'skip404' ),
)
$bluehost_module_container = new Container();

// Context setup
add_action(
'newfold/context/set',
function () {
// set brand
setContext( 'brand.name', 'bluehost' );
}
);

// Set plugin to container
Expand All @@ -44,19 +52,38 @@ function () {
'file' => BLUEHOST_PLUGIN_FILE,
'brand' => get_option( 'mm_brand', 'bluehost' ),
'install_date' => get_option( 'bluehost_plugin_install_date' ),
'site_id' => \NewfoldLabs\WP\Module\CustomerBluehost\SiteMeta::get_id(),
)
);
}
)
);

$bluehost_module_container->set(
'marketplace_brand',
'bluehost'
// 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';
}

if ( $bluehost_module_container ) {
$bluehost_module_container->set( 'cache_types', $cache_types );
$bluehost_module_container->set( 'marketplace_brand', $marketplace_brand );
}
},
11
);

// properly get branding links depending on market
// Properly get branding links depending on market
$wordpress_hosting_page = ( get_option( 'mm_brand' ) === 'Bluehost_India' ) ? 'https://www.bluehost.in?utm_source=coming-soon-template&utm_medium=bluehost_plugin' : 'https://bluehost.com?utm_source=coming-soon-template&utm_medium=bluehost_plugin';
$my_panel = ( get_option( 'mm_brand' ) === 'Bluehost_India' ) ? 'https://my.bluehost.in/web-hosting/cplogin' : 'https://my.bluehost.com/web-hosting/cplogin';
$website_guide_link = 'https://www.bluehost.com/blog/how-to-create-a-website-guide/';
Expand Down Expand Up @@ -106,6 +133,7 @@ function () {
'template_styles' => esc_url( BLUEHOST_PLUGIN_URL . 'assets/styles/coming-soon.css' ),
)
);

setContainer( $bluehost_module_container );

// Set up the updater endpoint and map values
Expand Down
24 changes: 11 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "7.1.0"
"php": "7.3.0"
},
"platform-check": false,
"allow-plugins": {
Expand Down Expand Up @@ -66,26 +66,24 @@
"wp-phpunit/wp-phpunit": "^6.4.2"
},
"require": {
"newfold-labs/wp-module-business-reviews": "^1.1.1",
"newfold-labs/wp-module-coming-soon": "^1.2.0",
"newfold-labs/wp-module-ctb": "^1.1.3",
"newfold-labs/wp-module-customer-bluehost": "^1.6.0",
"newfold-labs/wp-module-coming-soon": "^1.2.2",
"newfold-labs/wp-module-context": "^1.0.0",
"newfold-labs/wp-module-data": "^2.4.18",
"newfold-labs/wp-module-deactivation": "^1.0.5",
"newfold-labs/wp-module-ecommerce": "^1.3.21",
"newfold-labs/wp-module-ecommerce": "^1.3.23",
"newfold-labs/wp-module-global-ctb": "^1.0.11",
"newfold-labs/wp-module-help-center": "^1.0.23",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.2.1",
"newfold-labs/wp-module-notifications": "^1.2.4",
"newfold-labs/wp-module-onboarding": "^1.12.1",
"newfold-labs/wp-module-patterns": "^0.1.13",
"newfold-labs/wp-module-performance": "^1.3.0",
"newfold-labs/wp-module-marketplace": "^2.2.4",
"newfold-labs/wp-module-notifications": "^1.2.5",
"newfold-labs/wp-module-onboarding": "^2.1.4",
"newfold-labs/wp-module-patterns": "^0.1.14",
"newfold-labs/wp-module-performance": "^1.4.0",
"newfold-labs/wp-module-runtime": "^1.0.9",
"newfold-labs/wp-module-secure-passwords": "^1.1.1",
"newfold-labs/wp-module-sso": "^1.0.4",
"newfold-labs/wp-module-staging": "^1.2.3",
"wp-forge/wp-update-handler": "^1.0",
"newfold-labs/wp-module-staging": "^1.3.0",
"wp-forge/wp-update-handler": "^1.0.2",
"wp-forge/wp-upgrade-handler": "^1.0"
}
}
Loading

0 comments on commit d01332a

Please sign in to comment.