Skip to content

Commit

Permalink
Merge pull request #277 from newfold-labs/update/modules
Browse files Browse the repository at this point in the history
Update/modules
  • Loading branch information
circlecube authored Oct 18, 2023
2 parents cb6ab21 + 1fb33f9 commit 6750197
Show file tree
Hide file tree
Showing 9 changed files with 1,013 additions and 779 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.3.1",
"core": "WordPress/WordPress#tags/6.3.2",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
Expand Down
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@
},
"require": {
"doctrine/inflector": "1.2.0 as 1.3.1",
"newfold-labs/wp-module-coming-soon": "^1.1.9",
"newfold-labs/wp-module-coming-soon": "^1.1.10",
"newfold-labs/wp-module-data": "^2.4.8",
"newfold-labs/wp-module-ecommerce": "^1.3.2",
"newfold-labs/wp-module-deactivation": "^1.0.2",
"newfold-labs/wp-module-ecommerce": "^1.3.3",
"newfold-labs/wp-module-global-ctb": "^1.0.7",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.0.2",
"newfold-labs/wp-module-notifications": "^1.1.5",
"newfold-labs/wp-module-onboarding": "^1.11.1",
"newfold-labs/wp-module-onboarding": "^1.11.4",
"newfold-labs/wp-module-performance": "^1.2.1",
"newfold-labs/wp-module-runtime": "^1.0.6",
"newfold-labs/wp-module-runtime": "^1.0.7",
"newfold-labs/wp-module-secure-passwords": "^1.1",
"newfold-labs/wp-module-sso": "^1.0.4",
"wp-forge/wp-update-handler": "^1.0",
Expand Down
213 changes: 162 additions & 51 deletions composer.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function __construct() {
\add_action( 'admin_head', array( __CLASS__, 'admin_nav_style' ) );
/* Add runtime for data store */
\add_filter('newfold-runtime', array( __CLASS__, 'add_to_runtime' ) );
\add_filter('newfold_runtime', array( __CLASS__, 'add_to_runtime' ) );
/* Filter plugin locale */
\add_filter( 'plugin_locale', array( __CLASS__, 'locale_filter' ) );
\add_filter( 'load_script_translation_file', array( __CLASS__, 'load_script_locale_filter' ), 10, 3 );
Expand All @@ -41,7 +42,7 @@ public function __construct() {
* Add to runtime
*/
public static function add_to_runtime( $sdk ) {
include HOSTGATOR_PLUGIN_DIR . '/inc/Data.php';
include_once HOSTGATOR_PLUGIN_DIR . '/inc/Data.php';
return array_merge( $sdk, Data::runtime() );
}

Expand Down Expand Up @@ -247,7 +248,7 @@ public static function assets() {
\wp_register_script(
'hostgator-script',
HOSTGATOR_BUILD_URL . '/index.js',
array_merge( $asset['dependencies'] ),
array_merge( $asset['dependencies'], [ 'nfd-runtime' ] ),
$asset['version'],
true
);
Expand Down
1,521 changes: 814 additions & 707 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
],
"dependencies": {
"@heroicons/react": "^2.0.18",
"@newfold-labs/wp-module-ecommerce": "^1.2.6",
"@newfold-labs/wp-module-runtime": "^1.0.6",
"@newfold-labs/wp-module-ecommerce": "^1.3.3",
"@newfold-labs/wp-module-runtime": "^1.0.7",
"@newfold/ui-component-library": "^1.0.0",
"@reduxjs/toolkit": "^1.9.6",
"@wordpress/compose": "^6.19.0",
"@wordpress/dom-ready": "^3.42.0",
"@wordpress/element": "^5.19.0",
"@wordpress/i18n": "^4.42.0",
"@wordpress/icons": "^9.33.0",
"@reduxjs/toolkit": "^1.9.7",
"@wordpress/compose": "^6.20.0",
"@wordpress/dom-ready": "^3.43.0",
"@wordpress/element": "^5.20.0",
"@wordpress/i18n": "^4.43.0",
"@wordpress/icons": "^9.34.0",
"classnames": "^2.3.2",
"jquery": "^3.7.1",
"lodash": "^4.17.21",
Expand All @@ -32,12 +32,12 @@
},
"devDependencies": {
"@automattic/babel-plugin-preserve-i18n": "^1.0.0",
"@replayio/cypress": "^1.4.0",
"@replayio/cypress": "^1.5.0",
"@tailwindcss/forms": "^0.5.6",
"@testing-library/cypress": "^10.0.1",
"@wordpress/env": "^8.8.0",
"@wordpress/scripts": "^26.13.0",
"cypress": "^13.3.0",
"@wordpress/scripts": "^26.14.0",
"cypress": "^13.3.1",
"cypress-axe": "1.5.0",
"node-wp-i18n": "^1.2.7",
"tailwindcss": "^3.3.3"
Expand Down
1 change: 0 additions & 1 deletion src/app/pages/marketplace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const MarketplacePage = () => {

// constants to pass to module
const moduleConstants = {
'supportsCTB': false,
'text': {
'title': __('Marketplace', 'wp-plugin-hostgator'),
'subTitle': __('Explore our featured collection of tools and services.', 'wp-plugin-hostgator'),
Expand Down
16 changes: 15 additions & 1 deletion src/app/pages/settings/comingSoon.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ const ComingSoon = () => {
'wp-plugin-hostgator'
);
};

const getComingSoonSectionTitle = () => {
const getStatus = () => {
return (
comingSoon
? <span className="nfd-text-[#e10001]">{__('Coming Soon', 'wp-plugin-hostgator')}</span>
: <span className="nfd-text-[#008112]">{__('Live', 'wp-plugin-hostgator')}</span>
);
};

return (
<span>{__('Site Status', 'wp-plugin-hostgator')}: {getStatus()}</span>
)
};

const toggleComingSoon = () => {
hostgatorSettingsApiFetch({ comingSoon: !comingSoon }, setError, (response) => {
Expand Down Expand Up @@ -65,7 +79,7 @@ const ComingSoon = () => {

return (
<SectionSettings
title={__('Maintenance Mode', 'wp-plugin-hostgator')}
title={getComingSoonSectionTitle()}
description={__('Still building your site? Need to make a big change?', 'wp-plugin-hostgator')}
>
<div className="nfd-flex nfd-flex-col nfd-gap-6">
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/integration/home.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Home Page', function () {

it('Maintenance Mode Section Exists', () => {
cy
.get('.hgwp-app-home-coming-soon').contains('h3', 'Maintenance Mode')
.get('.hgwp-app-home-coming-soon').contains('h3', 'Site Status')
.scrollIntoView()
.should('be.visible');
});
Expand Down

0 comments on commit 6750197

Please sign in to comment.