Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Merge pull request #258 from bluehost/release/2.12.11
Browse files Browse the repository at this point in the history
Release/2.12.11
  • Loading branch information
circlecube authored Nov 9, 2022
2 parents 46e745b + 75dc3b1 commit 69a8cd7
Show file tree
Hide file tree
Showing 36 changed files with 675 additions and 2,042 deletions.
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#tags/6.0.3",
"core": "WordPress/WordPress#tags/6.1",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
Expand Down
43 changes: 41 additions & 2 deletions bluehost-wordpress-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Bluehost
* Description: This plugin integrates your WordPress site with the Bluehost control panel, including performance, security, and update features.
* Version: 2.12.10
* Version: 2.12.11
* Tested up to: 6.0.2
* Requires at least: 5.8
* Requires PHP: 7.0
Expand Down Expand Up @@ -32,7 +32,7 @@
}

// Define constants
define( 'BLUEHOST_PLUGIN_VERSION', '2.12.10' );
define( 'BLUEHOST_PLUGIN_VERSION', '2.12.11' );
define( 'BLUEHOST_PLUGIN_FILE', __FILE__ );
define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
Expand Down Expand Up @@ -81,5 +81,44 @@ function() {
)
);

$wordpress_hosting_page = ( get_option( 'mm_brand' ) === 'Bluehost_India' ) ? 'https://www.bluehost.in/wordpress' : 'https://bluehost.com/wordpress';
$my_panel = ( get_option( 'mm_brand' ) === 'Bluehost_India' ) ? 'https://my.bluehost.in/' : 'https://my.bluehost.com/';

// Set a value - scoped to comingsoon index
$bh_module_container->set(
'comingsoon',
array(
'admin_app_url' => admin_url( 'admin.php?page=bluehost#/home' ),
'template_h1' => __( 'A New WordPress Site!', 'bluehost-wordpress-plugin' ),
'template_h2' => __( 'Coming Soon!', 'bluehost-wordpress-plugin' ),
'template_login_btn' => true,
'template_footer_t' => sprintf(
/* translators: %1$s is replaced with opening link tag taking you to bluehost.com/wordpress, %2$s is replaced with closing link tag, %3$s is replaced with opening link tag taking you to login page, %4$s is replaced with closing link tag, %5$s is replaced with opening link tag taking you to my.bluehost.com, %6$s is replaced with closing link tag */
esc_html__( 'A %1$sBluehost%2$s powered website. Is this your website? Log in to %3$sWordPress%4$s or %5$sBluehost%6$s.', 'bluehost-wordpress-plugin' ) . ' ',
'<a href="' . esc_url( $wordpress_hosting_page ) . '" target="_blank" rel="noopener noreferrer nofollow">',
'</a>',
'<a href="' . esc_url( wp_login_url() ) . '">',
'</a>',
'<a href="' . esc_url( $my_panel ) . '" target="_blank" rel="noopener noreferrer nofollow">',
'</a>'
),
'template_page_title' => sprintf(
/* translators: %s: Blog name */
__( '%s &mdash; Coming Soon', 'bluehost-wordpress-plugin' ),
esc_html( get_option( 'blogname' ) )
),
'admin_bar_text' => '<div style="background-color: #ffcf00; color: #191936; padding: 0 1rem;">' . __( 'Coming Soon Active', 'bluehost-wordpress-plugin' ) . '</div>',
'admin_notice_text' => sprintf(
/* translators: %1$s is replaced with the opening link tag and %2$s is replaced with the closing link tag, %3$s is the opening link tag to preview the page, %4$s is the closing link tag. */
__( 'Your site is currently displaying a %1$scoming soon page%2$s. Once you are ready, %3$slaunch your site%4$s.', 'bluehost-wordpress-plugin' ),
'<a href="' . get_home_url() . '?preview=coming_soon" title="' . __( 'Preview the coming soon landing page', 'bluehost-wordpress-plugin' ) . '">',
'</a>',
'<a href="' . esc_url( admin_url( 'admin.php?page=bluehost#/home' ) ) . '">',
'</a>'
),
'template_styles' => esc_url( BLUEHOST_PLUGIN_URL . 'static/coming-soon.css' ),
)
);

// Complete the module loader setup by assigning the container
setContainer( $bh_module_container );
3 changes: 0 additions & 3 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
AdminBar::init();
BuildAssets::init();
LoginRedirect::init();
Themes::init();

// Disable Yoast SEO onboarding redirect
add_action(
Expand All @@ -74,10 +73,8 @@ function () {
require __DIR__ . '/inc/admin-page-notifications-blocker.php';
require __DIR__ . '/inc/base.php';
require __DIR__ . '/inc/cli-init.php';
require __DIR__ . '/inc/coming-soon.php';
require __DIR__ . '/inc/jetpack.php';
require __DIR__ . '/inc/menu.php';
require __DIR__ . '/inc/Notifications/bootstrap.php';
require __DIR__ . '/inc/CTB/bootstrap.php';
require __DIR__ . '/inc/partners.php';
require __DIR__ . '/inc/performance.php';
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@
"bluehost/bluehost-wp-customer-data": "^1.4.6",
"doctrine/inflector": "1.2.0 as 1.3.1",
"newfold-labs/wp-module-business-reviews": "^1.1",
"newfold-labs/wp-module-coming-soon": "^1.0",
"newfold-labs/wp-module-data": "^2.2.2",
"newfold-labs/wp-module-ecommerce": "0.5.2",
"newfold-labs/wp-module-ecommerce": "0.5.3",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^1.4.2",
"newfold-labs/wp-module-onboarding": "0.2.5",
"newfold-labs/wp-module-marketplace": "^1.4.6",
"newfold-labs/wp-module-notifications": "^1.1",
"newfold-labs/wp-module-onboarding": "0.2.6",
"newfold-labs/wp-module-secure-passwords": "^1.1",
"newfold-labs/wp-module-sso": "^1.0.3",
"wp-forge/collection": "^1.0.2",
Expand Down
158 changes: 127 additions & 31 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions inc/CTB/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ function() {
BLUEHOST_PLUGIN_VERSION,
true
);
wp_localize_script(
'bh-ctb',
'bhctb',
array(
'restApiUrl' => esc_url_raw( rest_url() ),
'restApiNonce' => wp_create_nonce( 'wp_rest' ),
)
);
}
);

Expand Down
Loading

0 comments on commit 69a8cd7

Please sign in to comment.