Skip to content

Commit

Permalink
Merge branch 'develop' into enhancement/6570-js-error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona authored Apr 30, 2024
2 parents ec0ad55 + b86840b commit 8b623fe
Show file tree
Hide file tree
Showing 24 changed files with 360 additions and 53 deletions.
2 changes: 1 addition & 1 deletion assets/js/lcp-beacon.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,4 @@ class RocketLcpBeacon {
}
}

RocketLcpBeacon.run();
RocketLcpBeacon.run();
3 changes: 2 additions & 1 deletion assets/js/lcp-beacon.js.min.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/wpr-admin.js.min.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inc/Engine/Activation/Activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static function activate_plugin() {
require WP_ROCKET_FUNCTIONS_PATH . 'i18n.php';
require WP_ROCKET_FUNCTIONS_PATH . 'htaccess.php';
require WP_ROCKET_FUNCTIONS_PATH . 'api.php';
require WP_ROCKET_FUNCTIONS_PATH . 'admin.php';

/**
* WP Rocket activation.
Expand Down
7 changes: 6 additions & 1 deletion inc/Engine/Common/Database/Queries/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ public function create_new_job( string $url, string $job_id = '', string $queue_
* @param mixed $is_success New job status: ID of inserted row if successfully added; false otherwise.
* @param string $timestamp Current timestamp.
*/
do_action( 'rocket_last_rucss_job_added_time', $result, current_time( 'mysql', true ) );
rocket_do_action_and_deprecated(
'rocket_last_saas_job_added_time',
[ $result, current_time( 'mysql', true ) ],
'3.16',
'rocket_last_rucss_job_added_time'
);

return $result;
}
Expand Down
11 changes: 8 additions & 3 deletions inc/Engine/Common/Database/Tables/AbstractTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ public function delete_old_rows() {
}

/**
* Filters the old RUCSS deletion interval
* Filters the old SaaS data deletion interval
*
* @param int $delete_interval Old RUCSS deletion interval in months
* @param int $delete_interval Old Saas data deletion interval in months
*/
$delete_interval = (int) apply_filters( 'rocket_saas_delete_interval', 1 );
$delete_interval = (int) rocket_apply_filter_and_deprecated(
'rocket_saas_delete_interval',
[ 1 ],
'3.16',
'rocket_rucss_delete_interval'
);

if ( $delete_interval <= 0 ) {
return false;
Expand Down
28 changes: 24 additions & 4 deletions inc/Engine/Common/JobManager/Cron/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ public function add_interval( $schedules ) {
*
* @param int $interval Interval in seconds.
*/
$interval = apply_filters( 'rocket_saas_pending_jobs_cron_interval', 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) );
$interval = rocket_apply_filter_and_deprecated(
'rocket_saas_pending_jobs_cron_interval',
[ 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) ],
'3.16',
'rocket_rucss_pending_jobs_cron_interval'
);

$schedules['rocket_saas_pending_jobs'] = [
'interval' => $interval,
Expand All @@ -186,7 +191,12 @@ public function add_interval( $schedules ) {
*
* @param int $interval Interval in seconds.
*/
$interval = apply_filters( 'rocket_remove_saas_failed_jobs_cron_interval', $default_interval );
$interval = rocket_apply_filter_and_deprecated(
'rocket_remove_saas_failed_jobs_cron_interval',
[ $default_interval ],
'3.16',
'rocket_remove_rucss_failed_jobs_cron_interval'
);
$interval = (bool) $interval ? $interval : $default_interval;

$schedules['rocket_remove_saas_failed_jobs'] = [
Expand All @@ -199,7 +209,12 @@ public function add_interval( $schedules ) {
*
* @param int $interval Interval in seconds.
*/
$interval = (int) apply_filters( 'rocket_remove_saas_on_submit_jobs_cron_interval', 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) );
$interval = (int) rocket_apply_filter_and_deprecated(
'rocket_remove_saas_on_submit_jobs_cron_interval',
[ 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) ],
'3.16',
'rocket_remove_rucss_on_submit_jobs_cron_interval'
);

$schedules['rocket_saas_on_submit_jobs'] = [
'interval' => $interval,
Expand Down Expand Up @@ -312,7 +327,12 @@ protected function is_deletion_enabled(): bool {
*
* @param bool $delete_saas_jobs True to enable deletion, false otherwise.
*/
return (bool) apply_filters( 'rocket_saas_deletion_enabled', true );
return (bool) rocket_apply_filter_and_deprecated(
'rocket_saas_deletion_enabled',
[ true ],
'3.16',
'rocket_rucss_deletion_enabled'
);
}

/**
Expand Down
Loading

0 comments on commit 8b623fe

Please sign in to comment.