From dfe0f12c97d08bfe3b7efa34c091781cb86aaf65 Mon Sep 17 00:00:00 2001 From: William Earnhardt Date: Fri, 18 Dec 2020 11:22:02 -0500 Subject: [PATCH] Update notifications cache clearing keys (#73) * Clear notifications transient on plugin_search * Update dependencies * Bump plugin version to 2.5.0 * Explicitly require PHP 7.4 Co-authored-by: Micah Wood --- .github/workflows/cypress.yml | 7 + .github/workflows/lint.yml | 7 + .github/workflows/upload-artifact-on-push.yml | 7 + .github/workflows/upload-asset-on-release.yml | 7 + bluehost-wordpress-plugin.php | 4 +- composer.lock | 174 ++++++++++++++---- inc/Notifications/bootstrap.php | 1 + languages/bluehost-wordpress-plugin.pot | 12 +- 8 files changed, 179 insertions(+), 40 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index ace29e9fb..5d8d78422 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -23,6 +23,13 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + tools: composer, cs2pr + - name: Setup workflow context id: workflow working-directory: ${{ runner.temp }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 52be94952..74908b031 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,6 +22,13 @@ jobs: - uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + tools: composer, cs2pr + - uses: technote-space/get-diff-action@v3 with: SUFFIX_FILTER: .php diff --git a/.github/workflows/upload-artifact-on-push.yml b/.github/workflows/upload-artifact-on-push.yml index d4e76aa12..db0c0c5c5 100644 --- a/.github/workflows/upload-artifact-on-push.yml +++ b/.github/workflows/upload-artifact-on-push.yml @@ -14,6 +14,13 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + tools: composer, cs2pr + - name: Setup Workflow Context id: workflow working-directory: ${{ runner.temp }} diff --git a/.github/workflows/upload-asset-on-release.yml b/.github/workflows/upload-asset-on-release.yml index 6431b1bbe..dc28dce03 100644 --- a/.github/workflows/upload-asset-on-release.yml +++ b/.github/workflows/upload-asset-on-release.yml @@ -15,6 +15,13 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + tools: composer, cs2pr + - name: Setup Workflow Context id: workflow working-directory: ${{ runner.temp }} diff --git a/bluehost-wordpress-plugin.php b/bluehost-wordpress-plugin.php index a0b35d17b..69758b58b 100644 --- a/bluehost-wordpress-plugin.php +++ b/bluehost-wordpress-plugin.php @@ -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.4.0 + * Version: 2.5.0 * Requires at least: 4.7 * Requires PHP: 5.6 * Author: Bluehost @@ -27,7 +27,7 @@ } // Define constants -define( 'BLUEHOST_PLUGIN_VERSION', '2.4.0' ); +define( 'BLUEHOST_PLUGIN_VERSION', '2.5.0' ); define( 'BLUEHOST_PLUGIN_FILE', __FILE__ ); define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); diff --git a/composer.lock b/composer.lock index 93f267a5b..ee2b2f740 100644 --- a/composer.lock +++ b/composer.lock @@ -312,16 +312,16 @@ }, { "name": "endurance/wp-module-data", - "version": "1.4", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/bluehost/endurance-wp-module-data.git", - "reference": "2fbde4344c2130d947efbb52750b6a7e8fc14569" + "reference": "8bcce7734bdcc3a4c6a1ba437039dd5ffdc94503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bluehost/endurance-wp-module-data/zipball/2fbde4344c2130d947efbb52750b6a7e8fc14569", - "reference": "2fbde4344c2130d947efbb52750b6a7e8fc14569", + "url": "https://api.github.com/repos/bluehost/endurance-wp-module-data/zipball/8bcce7734bdcc3a4c6a1ba437039dd5ffdc94503", + "reference": "8bcce7734bdcc3a4c6a1ba437039dd5ffdc94503", "shasum": "" }, "require-dev": { @@ -349,10 +349,10 @@ ], "description": "Endurance Data Module", "support": { - "source": "https://github.com/bluehost/endurance-wp-module-data/tree/1.4", + "source": "https://github.com/bluehost/endurance-wp-module-data/tree/1.4.1", "issues": "https://github.com/bluehost/endurance-wp-module-data/issues" }, - "time": "2020-12-10T16:01:58+00:00" + "time": "2020-12-18T15:05:00+00:00" }, { "name": "pimple/pimple", @@ -402,6 +402,9 @@ "container", "dependency injection" ], + "support": { + "source": "https://github.com/silexphp/Pimple/tree/v3.3.1" + }, "time": "2020-11-24T20:35:42+00:00" }, { @@ -765,6 +768,11 @@ "dependency", "package" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/1.10.19" + }, "funding": [ { "url": "https://packagist.com", @@ -840,6 +848,11 @@ "validation", "versioning" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/1.7.2" + }, "funding": [ { "url": "https://packagist.com", @@ -914,6 +927,11 @@ "spdx", "validator" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" + }, "funding": [ { "url": "https://packagist.com", @@ -1105,6 +1123,10 @@ "stylecheck", "tests" ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, "time": "2020-12-07T18:04:37+00:00" }, { @@ -1167,6 +1189,11 @@ "po", "translation" ], + "support": { + "email": "oom@oscarotero.com", + "issues": "https://github.com/oscarotero/Gettext/issues", + "source": "https://github.com/php-gettext/Gettext/tree/v4.8.3" + }, "time": "2020-11-18T22:35:49+00:00" }, { @@ -1892,16 +1919,16 @@ }, { "name": "symfony/console", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b" + "reference": "47c02526c532fb381374dab26df05e7313978976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e0564fb08d44a98bd5f1960204c958e57bd586b", - "reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b", + "url": "https://api.github.com/repos/symfony/console/zipball/47c02526c532fb381374dab26df05e7313978976", + "reference": "47c02526c532fb381374dab26df05e7313978976", "shasum": "" }, "require": { @@ -1968,6 +1995,9 @@ "console", "terminal" ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1982,20 +2012,20 @@ "type": "tidelift" } ], - "time": "2020-11-28T11:24:18+00:00" + "time": "2020-12-18T08:03:05+00:00" }, { "name": "symfony/filesystem", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "bb92ba7f38b037e531908590a858a04d85c0e238" + "reference": "fa8f8cab6b65e2d99a118e082935344c5ba8c60d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb92ba7f38b037e531908590a858a04d85c0e238", - "reference": "bb92ba7f38b037e531908590a858a04d85c0e238", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fa8f8cab6b65e2d99a118e082935344c5ba8c60d", + "reference": "fa8f8cab6b65e2d99a118e082935344c5ba8c60d", "shasum": "" }, "require": { @@ -2027,6 +2057,9 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2041,20 +2074,20 @@ "type": "tidelift" } ], - "time": "2020-11-12T09:58:18+00:00" + "time": "2020-11-30T17:05:38+00:00" }, { "name": "symfony/finder", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fd8305521692f27eae3263895d1ef1571c71a78d" + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fd8305521692f27eae3263895d1ef1571c71a78d", - "reference": "fd8305521692f27eae3263895d1ef1571c71a78d", + "url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba", + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba", "shasum": "" }, "require": { @@ -2085,6 +2118,9 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2099,7 +2135,7 @@ "type": "tidelift" } ], - "time": "2020-11-18T09:42:36+00:00" + "time": "2020-12-08T17:02:38+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2589,16 +2625,16 @@ }, { "name": "symfony/process", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "240e74140d4d956265048f3025c0aecbbc302d54" + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/240e74140d4d956265048f3025c0aecbbc302d54", - "reference": "240e74140d4d956265048f3025c0aecbbc302d54", + "url": "https://api.github.com/repos/symfony/process/zipball/bd8815b8b6705298beaa384f04fabd459c10bedd", + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd", "shasum": "" }, "require": { @@ -2630,6 +2666,9 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2644,7 +2683,7 @@ "type": "tidelift" } ], - "time": "2020-11-02T15:47:15+00:00" + "time": "2020-12-08T17:03:37+00:00" }, { "name": "symfony/service-contracts", @@ -2727,16 +2766,16 @@ }, { "name": "symfony/string", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242" + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/40e975edadd4e32cd16f3753b3bad65d9ac48242", - "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242", + "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", "shasum": "" }, "require": { @@ -2789,6 +2828,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2803,7 +2845,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:08:07+00:00" + "time": "2020-12-05T07:33:16+00:00" }, { "name": "wp-cli/cache-command", @@ -2872,6 +2914,10 @@ ], "description": "Manages object and transient caches.", "homepage": "https://github.com/wp-cli/cache-command", + "support": { + "issues": "https://github.com/wp-cli/cache-command/issues", + "source": "https://github.com/wp-cli/cache-command/tree/v2.0.5" + }, "time": "2020-12-07T19:32:47+00:00" }, { @@ -2927,6 +2973,10 @@ ], "description": "Verifies file integrity by comparing to published checksums.", "homepage": "https://github.com/wp-cli/checksum-command", + "support": { + "issues": "https://github.com/wp-cli/checksum-command/issues", + "source": "https://github.com/wp-cli/checksum-command/tree/v2.0.5" + }, "time": "2020-12-07T22:47:40+00:00" }, { @@ -3067,6 +3117,10 @@ ], "description": "Downloads, installs, updates, and manages a WordPress installation.", "homepage": "https://github.com/wp-cli/core-command", + "support": { + "issues": "https://github.com/wp-cli/core-command/issues", + "source": "https://github.com/wp-cli/core-command/tree/v2.0.12" + }, "time": "2020-12-07T19:31:14+00:00" }, { @@ -3130,6 +3184,10 @@ ], "description": "Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.", "homepage": "https://github.com/wp-cli/cron-command", + "support": { + "issues": "https://github.com/wp-cli/cron-command/issues", + "source": "https://github.com/wp-cli/cron-command/tree/v2.0.6" + }, "time": "2020-12-07T19:30:59+00:00" }, { @@ -3267,6 +3325,10 @@ ], "description": "Inspects oEmbed providers, clears embed cache, and more.", "homepage": "https://github.com/wp-cli/embed-command", + "support": { + "issues": "https://github.com/wp-cli/embed-command/issues", + "source": "https://github.com/wp-cli/embed-command/tree/v2.0.7" + }, "time": "2020-12-07T19:30:42+00:00" }, { @@ -3531,6 +3593,10 @@ ], "description": "Executes arbitrary PHP code or files.", "homepage": "https://github.com/wp-cli/eval-command", + "support": { + "issues": "https://github.com/wp-cli/eval-command/issues", + "source": "https://github.com/wp-cli/eval-command/tree/v2.0.8" + }, "time": "2020-12-07T19:30:26+00:00" }, { @@ -3589,6 +3655,10 @@ ], "description": "Exports WordPress content to a WXR file.", "homepage": "https://github.com/wp-cli/export-command", + "support": { + "issues": "https://github.com/wp-cli/export-command/issues", + "source": "https://github.com/wp-cli/export-command/tree/v2.0.5" + }, "time": "2020-12-07T19:30:08+00:00" }, { @@ -3742,6 +3812,10 @@ ], "description": "Provides internationalization tools for WordPress projects.", "homepage": "https://github.com/wp-cli/i18n-command", + "support": { + "issues": "https://github.com/wp-cli/i18n-command/issues", + "source": "https://github.com/wp-cli/i18n-command/tree/v2.2.6" + }, "time": "2020-12-07T19:28:27+00:00" }, { @@ -3798,6 +3872,10 @@ ], "description": "Imports content from a given WXR file.", "homepage": "https://github.com/wp-cli/import-command", + "support": { + "issues": "https://github.com/wp-cli/import-command/issues", + "source": "https://github.com/wp-cli/import-command/tree/v2.0.4" + }, "time": "2020-12-07T19:28:45+00:00" }, { @@ -3873,6 +3951,10 @@ ], "description": "Installs, activates, and manages language packs.", "homepage": "https://github.com/wp-cli/language-command", + "support": { + "issues": "https://github.com/wp-cli/language-command/issues", + "source": "https://github.com/wp-cli/language-command/tree/v2.0.8" + }, "time": "2020-12-07T19:29:09+00:00" }, { @@ -3930,6 +4012,10 @@ ], "description": "Activates, deactivates or checks the status of the maintenance mode of a site.", "homepage": "https://github.com/wp-cli/maintenance-mode-command", + "support": { + "issues": "https://github.com/wp-cli/maintenance-mode-command/issues", + "source": "https://github.com/wp-cli/maintenance-mode-command/tree/v2.0.4" + }, "time": "2020-12-07T19:29:39+00:00" }, { @@ -4219,6 +4305,10 @@ ], "description": "Lists or flushes the site's rewrite rules, updates the permalink structure.", "homepage": "https://github.com/wp-cli/rewrite-command", + "support": { + "issues": "https://github.com/wp-cli/rewrite-command/issues", + "source": "https://github.com/wp-cli/rewrite-command/tree/v2.0.6" + }, "time": "2020-12-07T19:27:22+00:00" }, { @@ -4281,6 +4371,10 @@ ], "description": "Adds, removes, lists, and resets roles and capabilities.", "homepage": "https://github.com/wp-cli/role-command", + "support": { + "issues": "https://github.com/wp-cli/role-command/issues", + "source": "https://github.com/wp-cli/role-command/tree/v2.0.5" + }, "time": "2020-12-07T19:27:04+00:00" }, { @@ -4461,6 +4555,10 @@ ], "description": "Launches PHP's built-in web server for a specific WordPress installation.", "homepage": "https://github.com/wp-cli/server-command", + "support": { + "issues": "https://github.com/wp-cli/server-command/issues", + "source": "https://github.com/wp-cli/server-command/tree/v2.0.6" + }, "time": "2020-12-07T19:26:47+00:00" }, { @@ -4515,6 +4613,10 @@ ], "description": "Opens an interactive PHP console for running and testing PHP code.", "homepage": "https://github.com/wp-cli/shell-command", + "support": { + "issues": "https://github.com/wp-cli/shell-command/issues", + "source": "https://github.com/wp-cli/shell-command/tree/v2.0.7" + }, "time": "2020-12-07T19:26:30+00:00" }, { @@ -4572,6 +4674,10 @@ ], "description": "Lists, adds, or removes super admin users on a multisite installation.", "homepage": "https://github.com/wp-cli/super-admin-command", + "support": { + "issues": "https://github.com/wp-cli/super-admin-command/issues", + "source": "https://github.com/wp-cli/super-admin-command/tree/v2.0.5" + }, "time": "2020-12-07T19:26:13+00:00" }, { @@ -4635,6 +4741,10 @@ ], "description": "Adds, moves, and removes widgets; lists sidebars.", "homepage": "https://github.com/wp-cli/widget-command", + "support": { + "issues": "https://github.com/wp-cli/widget-command/issues", + "source": "https://github.com/wp-cli/widget-command/tree/v2.1.2" + }, "time": "2020-12-07T19:25:02+00:00" }, { @@ -4885,5 +4995,5 @@ "ext-iconv": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/inc/Notifications/bootstrap.php b/inc/Notifications/bootstrap.php index 7f2912147..babcf5538 100644 --- a/inc/Notifications/bootstrap.php +++ b/inc/Notifications/bootstrap.php @@ -16,6 +16,7 @@ function ( $key ) { 'jetpack_connected', 'first_post_published', 'fifth_post_published', + 'plugin_search', ); if ( in_array( $key, $events, true ) ) { $notifications = get_transient( 'bluehost_notifications' ); diff --git a/languages/bluehost-wordpress-plugin.pot b/languages/bluehost-wordpress-plugin.pot index b351cc274..dc53701e8 100644 --- a/languages/bluehost-wordpress-plugin.pot +++ b/languages/bluehost-wordpress-plugin.pot @@ -2,7 +2,7 @@ # This file is distributed under the GPLv2 or later. msgid "" msgstr "" -"Project-Id-Version: Bluehost 2.4.0\n" +"Project-Id-Version: Bluehost 2.5.0\n" "Report-Msgid-Bugs-To: https://github.com/bluehost/bluehost-wordpress-plugin/issues\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -111,7 +111,7 @@ msgid "Endurance Page Cache plugin is not installed." msgstr "" #: inc/RestApi/CachingController.php:67 -#: inc/RestApi/SettingsController.php:189 +#: inc/RestApi/SettingsController.php:195 msgid "Sorry, you are not allowed to access this endpoint." msgstr "" @@ -153,13 +153,13 @@ msgid "Unable to parse JSON" msgstr "" #. translators: %s Settings > General page URL. -#: inc/updates.php:112 -#: inc/updates.php:140 -#: inc/updates.php:167 +#: inc/updates.php:117 +#: inc/updates.php:145 +#: inc/updates.php:172 msgid "Auto-updates enabled on the Bluehost > Settings page." msgstr "" -#: inc/updates.php:163 +#: inc/updates.php:168 msgid "Auto-updates enabled" msgstr ""