From b0154d17b73632425da08647d56568b822633433 Mon Sep 17 00:00:00 2001 From: thanghv Date: Fri, 27 Dec 2024 19:35:44 +0700 Subject: [PATCH 1/3] Fixed: rocket schedule issue --- class/class-mainwp-child-wp-rocket.php | 16 +--------------- readme.txt | 2 +- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/class/class-mainwp-child-wp-rocket.php b/class/class-mainwp-child-wp-rocket.php index 8b2af648..17dcac00 100644 --- a/class/class-mainwp-child-wp-rocket.php +++ b/class/class-mainwp-child-wp-rocket.php @@ -87,7 +87,6 @@ public function init() { } add_filter( 'mainwp_site_sync_others_data', array( $this, 'sync_others_data' ), 10, 2 ); - add_filter( 'cron_schedules', array( $this, 'add_five_seconds_cron_interval' ) ); //phpcs:ignore -- NOSONAR -ok. if ( 'hide' === get_option( 'mainwp_wprocket_hide_plugin' ) ) { add_filter( 'all_plugins', array( $this, 'all_plugins' ) ); add_action( 'admin_menu', array( $this, 'remove_menu' ) ); @@ -213,19 +212,6 @@ public function sync_others_data( $information, $data = array() ) { } - /** - * [Hook add filter for add_five_seconds_cron_interval] - * - * @return array - */ - public function add_five_seconds_cron_interval() { - $schedules['five_seconds'] = array( - 'interval' => 5, - 'display' => esc_html__( 'Every Five Seconds' ), - ); - return $schedules; - } - /** * Method remove_notices() * @@ -767,7 +753,7 @@ public function save_settings() { */ public function update_exclusion_list() { // Call cron by rocket update dynamic lists. - wp_schedule_event( time(), 'five_seconds', 'rocket_update_dynamic_lists' ); + wp_schedule_single_event( time() + 10, 'rocket_update_dynamic_lists' ); return array( 'result' => 'SUCCESS' ); } diff --git a/readme.txt b/readme.txt index f8804e5a..16b5941e 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Author: mainwp Author URI: https://mainwp.com Plugin URI: https://mainwp.com Requires at least: 6.2 -Tested up to: 6.7 +Tested up to: 6.7.1 Requires PHP: 7.4 Stable tag: 5.3.2 License: GPLv3 or later From 50db29cb5d5c2cbe9e56681f6810d21a4e5da114 Mon Sep 17 00:00:00 2001 From: thanghv Date: Sat, 28 Dec 2024 02:14:07 +0700 Subject: [PATCH 2/3] Fixed: error purge cache --- class/class-mainwp-child-cache-purge.php | 2 +- class/class-mainwp-child.php | 2 +- mainwp-child.php | 2 +- readme.txt | 8 +++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/class/class-mainwp-child-cache-purge.php b/class/class-mainwp-child-cache-purge.php index 3caa9ae5..5a9ae633 100644 --- a/class/class-mainwp-child-cache-purge.php +++ b/class/class-mainwp-child-cache-purge.php @@ -1070,7 +1070,7 @@ public function wprocket_auto_cache_purge() { $purge_result = array(); if ( 1 === (int) $do_purge ) { - $purge_result = MainWP_Child_WP_Rocket::instance()->purge_cache_all(); + $purge_result = MainWP_Child_WP_Rocket::instance()->preload_purge_cache_all(); } // Record results & return response. diff --git a/class/class-mainwp-child.php b/class/class-mainwp-child.php index 8497f2ab..399ffc96 100644 --- a/class/class-mainwp-child.php +++ b/class/class-mainwp-child.php @@ -30,7 +30,7 @@ class MainWP_Child { * * @var string MainWP Child plugin version. */ - public static $version = '5.3.2'; // NOSONAR - not IP. + public static $version = '5.3.3'; // NOSONAR - not IP. /** * Private variable containing the latest MainWP Child update version. diff --git a/mainwp-child.php b/mainwp-child.php index 5715292b..97c28b90 100644 --- a/mainwp-child.php +++ b/mainwp-child.php @@ -12,7 +12,7 @@ * Author: MainWP * Author URI: https://mainwp.com * Text Domain: mainwp-child - * Version: 5.3.2 + * Version: 5.3.3 * Requires at least: 5.4 * Requires PHP: 7.4 */ diff --git a/readme.txt b/readme.txt index 16b5941e..e5fc5555 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Plugin URI: https://mainwp.com Requires at least: 6.2 Tested up to: 6.7.1 Requires PHP: 7.4 -Stable tag: 5.3.2 +Stable tag: 5.3.3 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -111,6 +111,12 @@ We have an extensive FAQ with more questions and answers [here](https://mainwp.c == Changelog == += 5.3.3 - 12-27-2024 = + +* Fixed: Incorrect feedback message displayed when running updates. +* Fixed: Issue causing WP Cron scheduled events to fail. +* Added: Support for one-click plugin and theme exclusions for the WP Rocket JS delay option. + = 5.3.2 - 12-26-2024 = * Updated: Compatibility with the latest WP Rocket plugin settings. From 96d5a57143cda50e5bcd3ba7d93025e0caac2e3d Mon Sep 17 00:00:00 2001 From: thanghv Date: Sat, 28 Dec 2024 02:18:50 +0700 Subject: [PATCH 3/3] Update readme --- readme.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/readme.txt b/readme.txt index e5fc5555..b76cf19b 100644 --- a/readme.txt +++ b/readme.txt @@ -115,7 +115,6 @@ We have an extensive FAQ with more questions and answers [here](https://mainwp.c * Fixed: Incorrect feedback message displayed when running updates. * Fixed: Issue causing WP Cron scheduled events to fail. -* Added: Support for one-click plugin and theme exclusions for the WP Rocket JS delay option. = 5.3.2 - 12-26-2024 =