Skip to content

Commit

Permalink
Merge pull request #435 from mainwp/mainwp-child-dev
Browse files Browse the repository at this point in the history
Mainwp child dev
  • Loading branch information
thanghv authored Dec 27, 2024
2 parents f3738df + 96d5a57 commit 555214e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion class/class-mainwp-child-cache-purge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 1 addition & 15 deletions class/class-mainwp-child-wp-rocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
Expand Down Expand Up @@ -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()
*
Expand Down Expand Up @@ -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' );
}
Expand Down
2 changes: 1 addition & 1 deletion class/class-mainwp-child.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion mainwp-child.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ 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
Stable tag: 5.3.3
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -111,6 +111,11 @@ 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.

= 5.3.2 - 12-26-2024 =

* Updated: Compatibility with the latest WP Rocket plugin settings.
Expand Down

0 comments on commit 555214e

Please sign in to comment.