Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraeld committed Feb 25, 2025
1 parent e7af27b commit 628d48e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions inc/Engine/Admin/Settings/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function get_subscribed_events() {
'wp_ajax_rocket_enable_mobile_cache' => 'enable_mobile_cache',
'wp_rocket_upgrade' => [
[ 'enable_separate_cache_files_mobile', 9, 2 ],
[ 'maybe_enable_auto_preload_fonts', 9 ],
[ 'maybe_enable_auto_preload_fonts', 9, 2 ],
],
'admin_notices' => 'display_update_notice',
];
Expand Down Expand Up @@ -295,11 +295,16 @@ public function enable_separate_cache_files_mobile( $new_version, $old_version )
* If it contains a non-empty value, it updates the `auto_preload_fonts` option to `true`.
* This is useful for ensuring that automatic font preloading is enabled based on legacy settings.
*
* @param string $new_version New plugin version.
* @param string $old_version Previous plugin version.
*
* @return void
*/
public function maybe_enable_auto_preload_fonts(): void {
$this->page->maybe_enable_auto_preload_fonts();
}
public function maybe_enable_auto_preload_fonts( $new_version, $old_version ): void {

Check warning on line 303 in inc/Engine/Admin/Settings/Subscriber.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

inc/Engine/Admin/Settings/Subscriber.php#L303

Avoid unused parameters such as '$new_version'.
if ( version_compare( $old_version, '3.19', '>' ) ) {
return;
}
$this->page->maybe_enable_auto_preload_fonts(); }

/**
* Display the update notice.
Expand Down

0 comments on commit 628d48e

Please sign in to comment.