Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/classes/db-versioning/v2-0-93.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 +
3 + namespace Blocksy\DbVersioning;
4 +
5 + class V2093 {
6 + public function migrate() {
7 + $this->migrate_color_mode_switch_and_wp_rocket();
8 + }
9 +
10 + public function migrate_color_mode_switch_and_wp_rocket() {
11 + if (
12 + ! class_exists('\Blocksy\Plugin')
13 + ||
14 + ! in_array('color-mode-switch', get_option('blocksy_active_extensions', []))
15 + ||
16 + ! function_exists('rocket_clean_domain')
17 + ) {
18 + return;
19 + }
20 +
21 + add_filter('rocket_cache_dynamic_cookies', function($cookies) {
22 + $cookies[] = 'blocksy_current_theme';
23 + return $cookies;
24 + });
25 +
26 + // Update the WP Rocket rules on the .htaccess file.
27 + flush_rocket_htaccess();
28 +
29 + // Regenerate the config file.
30 + rocket_generate_config_file();
31 +
32 + // Clear WP Rocket cache.
33 + rocket_clean_domain();
34 + }
35 + }
36 +
37 +