From 26fb3ff34d743d5b799e0e5839e07f0e3b893d33 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 14:57:16 -0400 Subject: [PATCH 01/14] add legacy file `mojo-marketplace.php` for migration --- mojo-marketplace.php | 34 ++++++++++++++++++++++++++++++++++ wp-plugin-mojo.php | 30 +----------------------------- 2 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 mojo-marketplace.php diff --git a/mojo-marketplace.php b/mojo-marketplace.php new file mode 100644 index 0000000..fe16c9b --- /dev/null +++ b/mojo-marketplace.php @@ -0,0 +1,34 @@ + Date: Thu, 1 Aug 2024 15:00:27 -0400 Subject: [PATCH 02/14] change updater url to new/old format --- bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 6578fcf..5fe1037 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -102,7 +102,7 @@ function () { setContainer( $mojo_module_container ); // Set up the updater endpoint and map values -$mojo_update_url = 'https://hiive.cloud/workers/release-api/plugins/newfold-labs/wp-plugin-mojo'; // Custom API GET endpoint +$mojo_update_url = 'https://hiive.cloud/workers/release-api/plugins/newfold-labs/wp-plugin-mojo?slug=mojo-marketplace-wp-plugin&file=mojo-marketplace.php '; // Custom API GET endpoint $mojo_plugin_updater = new PluginUpdater( MOJO_PLUGIN_FILE, $mojo_update_url ); $mojo_plugin_updater->setDataMap( array( From 644bbf8f2730b30b486a672488d70e69ab834659 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 15:02:04 -0400 Subject: [PATCH 03/14] update build scripts with new/old directory name --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fbe5946..0103b9b 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,8 @@ "build": "wp-scripts build", "check-engines": "wp-scripts check-engines", "check-licenses": "wp-scripts check-licenses --production", - "create:dist": "rsync -r --include-from=.distinclude --exclude-from=.distignore . ./wp-plugin-mojo", - "create:zip": "cd ./wp-plugin-mojo && zip -r -9 ../wp-plugin-mojo.zip . && ls -lh ../wp-plugin-mojo.zip", + "create:dist": "rsync -r --include-from=.distinclude --exclude-from=.distignore . ./mojo-marketplace-wp-plugin", + "create:zip": "cd ./mojo-marketplace-wp-plugin && zip -r -9 ../mojo-marketplace-wp-plugin.zip . && ls -lh ../mojo-marketplace-wp-plugin.zip", "cypress": "npm cypress open", "develop": "npm run start", "develop:analyzer": "npm run start:analyzer", @@ -69,7 +69,7 @@ "log:watch": "wp-env run wordpress 'tail -f /var/www/html/wp-content/debug.log'", "php-deps": "composer install --no-dev --optimize-autoloader", "postprepare": "npm run set-wp-version", - "prebuild:cleanup": "rm -rf ./build ./wp-plugin-mojo ./wp-plugin-mojo.zip ./vendor", + "prebuild:cleanup": "rm -rf ./build ./mojo-marketplace-wp-plugin ./mojo-marketplace-wp-plugin.zip ./vendor", "set-wp-version": "node ./set-latest-wp-version.js", "simulate-runner-build": "npm run prebuild:cleanup && npm i && npm run php-deps && npm run build && npm run create:dist && npm run create:zip", "srb": "npm run simulate-runner-build", From 4aa1b94aeb515bd3d1b66fb3dec137b6db89da90 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 19:08:26 +0000 Subject: [PATCH 04/14] WordPress i18n triggered by commit 644bbf8f2730b30b486a672488d70e69ab834659 --- .wp-env.json | 2 +- languages/wp-plugin-mojo.pot | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.wp-env.json b/.wp-env.json index d0b7385..2a0a857 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,5 +1,5 @@ { - "core": "WordPress/WordPress#tags/6.5.5", + "core": "WordPress/WordPress#tags/6.6.1", "config": { "WP_DEBUG": true, "WP_DEBUG_LOG": true, diff --git a/languages/wp-plugin-mojo.pot b/languages/wp-plugin-mojo.pot index 1ed7612..feebadf 100644 --- a/languages/wp-plugin-mojo.pot +++ b/languages/wp-plugin-mojo.pot @@ -15,27 +15,27 @@ msgstr "" "X-Domain: wp-plugin-mojo\n" #. Plugin Name of the plugin -#: wp-plugin-mojo.php +#: mojo-marketplace.php msgid "The MOJO Plugin" msgstr "" #. Plugin URI of the plugin -#: wp-plugin-mojo.php +#: mojo-marketplace.php msgid "https://mojomarketplace.com" msgstr "" #. Description of the plugin -#: wp-plugin-mojo.php +#: mojo-marketplace.php msgid "WordPress plugin that integrates a WordPress site with Hosting." msgstr "" #. Author of the plugin -#: wp-plugin-mojo.php +#: mojo-marketplace.php msgid "Bluehost" msgstr "" #. Author URI of the plugin -#: wp-plugin-mojo.php +#: mojo-marketplace.php msgid "https://bluehost.com" msgstr "" From e3e25edab129cb8b5ce2d058705fea81c254411a Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 15:31:56 -0400 Subject: [PATCH 05/14] remove wp-plugin-mojo file in favor of a single file --- .gitignore | 2 +- mojo-marketplace.php | 50 +++++++++++++++++++++++++++++++++++++++++--- wp-plugin-mojo.php | 50 -------------------------------------------- 3 files changed, 48 insertions(+), 54 deletions(-) delete mode 100644 wp-plugin-mojo.php diff --git a/.gitignore b/.gitignore index 6f27710..0f777e3 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ cypress.env.json # Built-app files /.docs /build/* -/wp-plugin-mojo +/mojo-marketplace-wp-plugin # File Types *.log diff --git a/mojo-marketplace.php b/mojo-marketplace.php index fe16c9b..0656006 100644 --- a/mojo-marketplace.php +++ b/mojo-marketplace.php @@ -24,11 +24,55 @@ * License URI: https://www.gnu.org/licenses/gpl-2.0.html */ +namespace Mojo; + // Do not allow multiple copies of the MOJO Plugin to be active if ( defined( 'MOJO_PLUGIN_VERSION' ) ) { - exit; + exit; } -// Define constants +// Define version constant define( 'MOJO_PLUGIN_VERSION', '3.1.0' ); -require_once __DIR__ . 'wp-plugin-mojo.php'; \ No newline at end of file +define( 'MOJO_PLUGIN_FILE', __FILE__ ); +define( 'MOJO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); +define( 'MOJO_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); +if ( ! defined( 'NFD_HIIVE_URL' ) ) { + define( 'NFD_HIIVE_URL', 'https://hiive.cloud/api' ); +} + +define( 'MOJO_BUILD_DIR', MOJO_PLUGIN_DIR . 'build/' . MOJO_PLUGIN_VERSION ); +define( 'MOJO_BUILD_URL', MOJO_PLUGIN_URL . 'build/' . MOJO_PLUGIN_VERSION ); + +global $pagenow; +if ( 'plugins.php' === $pagenow ) { + + require MOJO_PLUGIN_DIR . '/inc/plugin-php-compat-check.php'; + + $plugin_check = new Plugin_PHP_Compat_Check( __FILE__ ); + + $plugin_check->min_php_version = '7.1'; + $plugin_check->min_wp_version = '6.0'; + + $plugin_check->check_plugin_requirements(); +} + +// Check NFD plugin incompaatibilities +require_once MOJO_PLUGIN_DIR . '/inc/plugin-nfd-compat-check.php'; +$nfd_plugins_check = new NFD_Plugin_Compat_Check( MOJO_PLUGIN_FILE ); +// Defer to Incompatible plugin, self-deactivate +$nfd_plugins_check->incompatible_plugins = array( + 'The Bluehost Plugin' => 'bluehost-wordpress-plugin/bluehost-wordpress-plugin.php', + 'The HostGator Plugin' => 'wp-plugin-hostgator/wp-plugin-hostgator.php', + 'The Web.com Plugin' => 'wp-plugin-web/wp-plugin-web.php', + 'The Crazy Domains Plugin' => 'wp-plugin-crazy-domains/wp-plugin-crazy-domains.php', +); +// Deactivate legacy plugin +// $nfd_plugins_check->legacy_plugins = array( + // 'The MOJO Marketplace' => 'mojo-marketplace-wp-plugin/mojo-marketplace.php', // old mojo +// ); +$pass_nfd_check = $nfd_plugins_check->check_plugin_requirements(); + +// Check PHP version before initializing to prevent errors if plugin is incompatible. +if ( $pass_nfd_check && version_compare( PHP_VERSION, '5.3', '>=' ) ) { + require __DIR__ . '/bootstrap.php'; +} diff --git a/wp-plugin-mojo.php b/wp-plugin-mojo.php deleted file mode 100644 index b994a50..0000000 --- a/wp-plugin-mojo.php +++ /dev/null @@ -1,50 +0,0 @@ -min_php_version = '7.1'; - $plugin_check->min_wp_version = '6.0'; - - $plugin_check->check_plugin_requirements(); -} - -// Check NFD plugin incompaatibilities -require_once MOJO_PLUGIN_DIR . '/inc/plugin-nfd-compat-check.php'; -$nfd_plugins_check = new NFD_Plugin_Compat_Check( MOJO_PLUGIN_FILE ); -// Defer to Incompatible plugin, self-deactivate -$nfd_plugins_check->incompatible_plugins = array( - 'The Bluehost Plugin' => 'bluehost-wordpress-plugin/bluehost-wordpress-plugin.php', - 'The HostGator Plugin' => 'wp-plugin-hostgator/wp-plugin-hostgator.php', - 'The Web.com Plugin' => 'wp-plugin-web/wp-plugin-web.php', - 'The Crazy Domains Plugin' => 'wp-plugin-crazy-domains/wp-plugin-crazy-domains.php', -); -// Deactivate legacy plugin -$nfd_plugins_check->legacy_plugins = array( - 'The MOJO Marketplace' => 'mojo-marketplace-wp-plugin/mojo-marketplace.php', // old mojo -); -$pass_nfd_check = $nfd_plugins_check->check_plugin_requirements(); - -// Check PHP version before initializing to prevent errors if plugin is incompatible. -if ( $pass_nfd_check && version_compare( PHP_VERSION, '5.3', '>=' ) ) { - require __DIR__ . '/bootstrap.php'; -} From aed4d67fd6c07e425a9e3c3fa7b321a2b888c034 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 15:36:37 -0400 Subject: [PATCH 06/14] update wordpress version --- .github/workflows/cypress-matrix.yml | 2 +- .wp-env.json | 2 +- mojo-marketplace.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress-matrix.yml b/.github/workflows/cypress-matrix.yml index 8876c6b..4c33361 100644 --- a/.github/workflows/cypress-matrix.yml +++ b/.github/workflows/cypress-matrix.yml @@ -29,9 +29,9 @@ jobs: - '8.1' - '8.2' wpVersion: - - '6.3' - '6.4' - '6.5' + - '6.6' steps: diff --git a/.wp-env.json b/.wp-env.json index d0b7385..2a0a857 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,5 +1,5 @@ { - "core": "WordPress/WordPress#tags/6.5.5", + "core": "WordPress/WordPress#tags/6.6.1", "config": { "WP_DEBUG": true, "WP_DEBUG_LOG": true, diff --git a/mojo-marketplace.php b/mojo-marketplace.php index 0656006..4c4ecc7 100644 --- a/mojo-marketplace.php +++ b/mojo-marketplace.php @@ -13,7 +13,7 @@ * Update URI: https://github.com/newfold-labs/wp-plugin-mojo/ * Description: WordPress plugin that integrates a WordPress site with Hosting. * Version: 3.1.0 - * Tested up to: 6.4.1 + * Tested up to: 6.6.1 * Requires at least: 5.8 * Requires PHP: 7.0 * Author: Bluehost From 7c93876029c6939b4144edcc11fe886dfcef5569 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 16:50:22 -0400 Subject: [PATCH 07/14] update plugin version to 3.2.0 --- mojo-marketplace.php | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mojo-marketplace.php b/mojo-marketplace.php index 4c4ecc7..d33b2ae 100644 --- a/mojo-marketplace.php +++ b/mojo-marketplace.php @@ -12,7 +12,7 @@ * Plugin URI: https://mojomarketplace.com * Update URI: https://github.com/newfold-labs/wp-plugin-mojo/ * Description: WordPress plugin that integrates a WordPress site with Hosting. - * Version: 3.1.0 + * Version: 3.2.0 * Tested up to: 6.6.1 * Requires at least: 5.8 * Requires PHP: 7.0 @@ -32,7 +32,7 @@ } // Define version constant -define( 'MOJO_PLUGIN_VERSION', '3.1.0' ); +define( 'MOJO_PLUGIN_VERSION', '3.2.0' ); define( 'MOJO_PLUGIN_FILE', __FILE__ ); define( 'MOJO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'MOJO_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); diff --git a/package.json b/package.json index 0103b9b..1581f4b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wp-plugin-mojo", "description": "WordPress plugin that integrates a WordPress site with Hosting", "license": "GPL-2.0-or-later", - "version": "3.1.0", + "version": "3.2.0", "private": true, "repository": { "type": "git", From 78b46df94b9cdb29bdbd46b1712127b502bc8c2b Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 20:51:37 +0000 Subject: [PATCH 08/14] WordPress i18n triggered by commit 7c93876029c6939b4144edcc11fe886dfcef5569 --- languages/wp-plugin-mojo.pot | 114 +++++++++++++++++------------------ package-lock.json | 4 +- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/languages/wp-plugin-mojo.pot b/languages/wp-plugin-mojo.pot index feebadf..1028248 100644 --- a/languages/wp-plugin-mojo.pot +++ b/languages/wp-plugin-mojo.pot @@ -2,7 +2,7 @@ # This file is distributed under the GPL 2.0 or later. msgid "" msgstr "" -"Project-Id-Version: The MOJO Plugin 3.1.0\n" +"Project-Id-Version: The MOJO Plugin 3.2.0\n" "Report-Msgid-Bugs-To: https://github.com/newfold-labs/wp-plugin-mojo/issues\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,28 +76,28 @@ msgstr "" #: inc/Admin.php:57 #: inc/Admin.php:211 -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Home" msgstr "" #: inc/Admin.php:60 -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Marketplace" msgstr "" #: inc/Admin.php:65 -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Performance" msgstr "" #: inc/Admin.php:69 #: inc/Admin.php:212 -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Settings" msgstr "" #: inc/Admin.php:72 -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Help" msgstr "" @@ -181,209 +181,209 @@ msgstr "" msgid "Auto-updates enabled" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Mojo WordPress Plugin" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Oh No, An Error!" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "You found an error, please refresh the page and try again!" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "If the error persists, please contact support." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid " Error code: " msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "MOJO Account" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "There's nothing here!" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Admin" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "The performance feature provides improvements to loads faster for visitors including cache settings." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Sorry, that is not allowed." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "This feature cannot currently be modified." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Oops! Something went wrong. Please try again." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Support Center" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Submit a support ticket. Once you open a ticket, we'll respond promptly to get it resolved." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Submit a Request" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Phone" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Speak to our support team over the phone at 855-464-5345." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Call Us" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Blog" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Follow along and take your website to its full potential with WordPress guides and how tos, inspiration, MOJO Marketplace product updates, and more!" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Learn Stuff" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "WP Live Support" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Our WordPress experts will treat your problem like theirs and teach you how to build, grow, and maintain your websites. Starting at $29/month" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Sign Up" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Settings and Performance" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Customize & fine-tune your site." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Manage Settings" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Manage your site settings. You can ajdust automatic updates, comments, revisions and more." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Manage site performance and caching settings as well as clear the site cache." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Visit Marketplace" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Add site services, themes or plugins from the marketplace." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Explore our featured collection of tools and services." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Oops, there was an error loading the marketplace, please try again later." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Sorry, no marketplace items. Please, try again later." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Load More" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Oops! Something Went Wrong" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "An error occurred while loading the content. Please try again later." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Site Status" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Not Live" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Live" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Coming soon page" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Your Coming Soon page lets you hide your site from visitors while you make the magic happen." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Your website is currently displaying a \"Coming Soon\" page." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Manage All Updates" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "WordPress Core" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Plugins" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Themes" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Automatic Updates" msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid "Keeping automatic updates on ensures timely security fixes and the latest features." msgstr "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid " day." msgid_plural " days." msgstr[0] "" msgstr[1] "" -#: build/3.1.0/index.js:1 +#: build/3.2.0/index.js:1 msgid " comment at a time." msgid_plural " comments at a time." msgstr[0] "" diff --git a/package-lock.json b/package-lock.json index e4c2569..411d584 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wp-plugin-mojo", - "version": "3.1.0", + "version": "3.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wp-plugin-mojo", - "version": "3.1.0", + "version": "3.2.0", "license": "GPL-2.0-or-later", "dependencies": { "@heroicons/react": "^2.1.4", From 01f14b87d5af6235eec608d3c56bfc5879ffe185 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 16:53:27 -0400 Subject: [PATCH 09/14] remove commented code for legacy plugin --- mojo-marketplace.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mojo-marketplace.php b/mojo-marketplace.php index d33b2ae..a974d2e 100644 --- a/mojo-marketplace.php +++ b/mojo-marketplace.php @@ -31,7 +31,7 @@ exit; } -// Define version constant +// Define constants define( 'MOJO_PLUGIN_VERSION', '3.2.0' ); define( 'MOJO_PLUGIN_FILE', __FILE__ ); define( 'MOJO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); @@ -66,11 +66,8 @@ 'The Web.com Plugin' => 'wp-plugin-web/wp-plugin-web.php', 'The Crazy Domains Plugin' => 'wp-plugin-crazy-domains/wp-plugin-crazy-domains.php', ); -// Deactivate legacy plugin -// $nfd_plugins_check->legacy_plugins = array( - // 'The MOJO Marketplace' => 'mojo-marketplace-wp-plugin/mojo-marketplace.php', // old mojo -// ); -$pass_nfd_check = $nfd_plugins_check->check_plugin_requirements(); + +$pass_nfd_check = $nfd_plugins_check->check_plugin_requirements(); // Check PHP version before initializing to prevent errors if plugin is incompatible. if ( $pass_nfd_check && version_compare( PHP_VERSION, '5.3', '>=' ) ) { From c58f06f999bc6901c3b51b0014a87320c2f190a8 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 1 Aug 2024 16:58:28 -0400 Subject: [PATCH 10/14] whitespace --- mojo-marketplace.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mojo-marketplace.php b/mojo-marketplace.php index a974d2e..13d5053 100644 --- a/mojo-marketplace.php +++ b/mojo-marketplace.php @@ -28,7 +28,7 @@ // Do not allow multiple copies of the MOJO Plugin to be active if ( defined( 'MOJO_PLUGIN_VERSION' ) ) { - exit; + exit; } // Define constants @@ -37,7 +37,7 @@ define( 'MOJO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'MOJO_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); if ( ! defined( 'NFD_HIIVE_URL' ) ) { - define( 'NFD_HIIVE_URL', 'https://hiive.cloud/api' ); + define( 'NFD_HIIVE_URL', 'https://hiive.cloud/api' ); } define( 'MOJO_BUILD_DIR', MOJO_PLUGIN_DIR . 'build/' . MOJO_PLUGIN_VERSION ); From 64c04bac4fe8410e13f3e9a37848290eab881902 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 2 Aug 2024 15:56:48 +0000 Subject: [PATCH 11/14] WordPress i18n triggered by commit 94046aa2e13f6d1a490c6860c48b94f8c9dc835f --- languages/wp-plugin-mojo.pot | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/languages/wp-plugin-mojo.pot b/languages/wp-plugin-mojo.pot index 1028248..04db75f 100644 --- a/languages/wp-plugin-mojo.pot +++ b/languages/wp-plugin-mojo.pot @@ -74,51 +74,51 @@ msgstr "" msgid "Preview the coming soon landing page" msgstr "" -#: inc/Admin.php:57 -#: inc/Admin.php:211 +#: inc/Admin.php:58 +#: inc/Admin.php:212 #: build/3.2.0/index.js:1 msgid "Home" msgstr "" -#: inc/Admin.php:60 +#: inc/Admin.php:61 #: build/3.2.0/index.js:1 msgid "Marketplace" msgstr "" -#: inc/Admin.php:65 +#: inc/Admin.php:66 #: build/3.2.0/index.js:1 msgid "Performance" msgstr "" -#: inc/Admin.php:69 -#: inc/Admin.php:212 +#: inc/Admin.php:70 +#: inc/Admin.php:213 #: build/3.2.0/index.js:1 msgid "Settings" msgstr "" -#: inc/Admin.php:72 +#: inc/Admin.php:73 #: build/3.2.0/index.js:1 msgid "Help" msgstr "" -#: inc/Admin.php:114 #: inc/Admin.php:115 +#: inc/Admin.php:116 msgid "MOJO" msgstr "" -#: inc/Admin.php:157 +#: inc/Admin.php:158 msgid "Please update to a newer WordPress version." msgstr "" -#: inc/Admin.php:158 +#: inc/Admin.php:159 msgid "There are new WordPress components which this plugin requires in order to render the interface." msgstr "" -#: inc/Admin.php:159 +#: inc/Admin.php:160 msgid "Please update now" msgstr "" -#: inc/Admin.php:225 +#: inc/Admin.php:226 msgid "Thank you for creating with WordPress and MOJO." msgstr "" From 8892aee93e5932096612b1a22f74c31474164edf Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 8 Aug 2024 16:30:22 -0400 Subject: [PATCH 12/14] exclude deactivation survey tests due to the plugin slug being in flux here, we'll skip this test for now and hopefully can work it back in soon. --- cypress.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress.config.js b/cypress.config.js index 41afbed..1858b44 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -76,7 +76,8 @@ module.exports = defineConfig({ supportFile: 'tests/cypress/support/index.js', testIsolation: false, excludeSpecPattern: [ - 'vendor/newfold-labs/wp-module-coming-soon/tests/cypress/integration/coming-soon.cy.js' // excluding until either adding ecommerce module or removing coming soon components in ecommerce module + 'vendor/newfold-labs/wp-module-coming-soon/tests/cypress/integration/coming-soon.cy.js', // excluding until either adding ecommerce module or removing coming soon components in ecommerce module + 'vendor/newfold-labs/wp-module-deactivation/tests/cypress/integration/deactivation-survey.cy.js' // excluding due to the mismatched slug name ], experimentalRunAllSpecs: true, }, From 87e30c25c92650b78df21ca8b9f1597baff1409e Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 8 Aug 2024 17:38:40 -0400 Subject: [PATCH 13/14] update required php version and matrix versions exclude the wp 6.6 and php 7.1 matrix since that version of wp requires 7.2+ --- .github/workflows/cypress-matrix.yml | 4 ++++ mojo-marketplace.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-matrix.yml b/.github/workflows/cypress-matrix.yml index 4c33361..eabdfbc 100644 --- a/.github/workflows/cypress-matrix.yml +++ b/.github/workflows/cypress-matrix.yml @@ -28,10 +28,14 @@ jobs: - '8.0' - '8.1' - '8.2' + - '8.3' wpVersion: - '6.4' - '6.5' - '6.6' + exclude: + - phpVersion: '7.1' + wpVersion: '6.6' steps: diff --git a/mojo-marketplace.php b/mojo-marketplace.php index 13d5053..eaa6fa7 100644 --- a/mojo-marketplace.php +++ b/mojo-marketplace.php @@ -15,7 +15,7 @@ * Version: 3.2.0 * Tested up to: 6.6.1 * Requires at least: 5.8 - * Requires PHP: 7.0 + * Requires PHP: 7.1 * Author: Bluehost * Author URI: https://bluehost.com * Text Domain: wp-plugin-mojo From 6dcf2ea7857e54ce7c17a0c256c254d7808f8d3f Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 9 Aug 2024 10:36:33 -0400 Subject: [PATCH 14/14] lint fix --- inc/Admin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/Admin.php b/inc/Admin.php index 9f71c1e..2c17cd4 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -23,12 +23,12 @@ public function __construct() { /* Load Page Scripts & Styles. */ \add_action( 'load-toplevel_page_mojo', array( __CLASS__, 'assets' ) ); /* Add Links to WordPress Plugins list item. */ - \add_filter( 'plugin_action_links_mojo-marketplace-wp-plugin/mojo-marketplace.php', array( __CLASS__, 'actions' ) ); - \add_filter( 'plugin_action_links_wp-plugin-mojo/mojo-marketplace.php', array( __CLASS__, 'actions' ) ); + \add_filter( 'plugin_action_links_mojo-marketplace-wp-plugin/mojo-marketplace.php', array( __CLASS__, 'actions' ) ); // for build + \add_filter( 'plugin_action_links_wp-plugin-mojo/mojo-marketplace.php', array( __CLASS__, 'actions' ) ); // for local dev /* Add inline style to hide subnav link */ \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' ) ); if ( isset( $_GET['page'] ) && strpos( filter_input( INPUT_GET, 'page', FILTER_UNSAFE_RAW ), 'mojo' ) >= 0 ) { // phpcs:ignore \add_action( 'admin_footer_text', array( __CLASS__, 'add_brand_to_admin_footer' ) ); @@ -72,7 +72,7 @@ public static function subpages() { $help = array( 'mojo#/help' => __( 'Help', 'wp-plugin-mojo' ), ); - + return array_merge( $home, $marketplace,