Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/wp-rocket/inc/3rd-party/plugins/mailchimp.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
defined( 'ABSPATH' ) || exit;
4
+
5
+
/**
6
+
* Conflict with MailChimp List Subscribe Form: Enqueue style without lack of performance, grrrr!!!
7
+
*
8
+
* @since 2.6
9
+
*/
10
+
function rocket_fix_mailchimp_main_css() {
11
+
if ( ! defined( 'MCSF_VER' ) || ! function_exists( 'mailchimpSF_main_css' ) ) {
12
+
return;
13
+
}
14
+
15
+
$blog_id = get_current_blog_id();
16
+
$cache_path = WP_ROCKET_MINIFY_CACHE_PATH . $blog_id . '/';
17
+
$cache_url = WP_ROCKET_MINIFY_CACHE_URL . $blog_id . '/';
18
+
$css_path = $cache_path . 'mailchimpSF_main_css.css';
19
+
20
+
if ( ! rocket_direct_filesystem()->is_dir( $cache_path ) ) {
21
+
rocket_mkdir_p( $cache_path );
22
+
}
23
+
24
+
if ( ! rocket_direct_filesystem()->exists( $css_path ) ) {
25
+
ob_start();
26
+
mailchimpSF_main_css();
27
+
$content = ob_get_contents();
28
+
ob_end_clean();
29
+
30
+
rocket_put_content( $css_path, $content );
31
+
}
32
+
33
+
wp_deregister_style( 'mailchimpSF_main_css' );
34
+
wp_register_style( 'mailchimpSF_main_css', $cache_url . 'mailchimpSF_main_css.css', null, MCSF_VER );
35
+
}
36
+
add_action( 'init', 'rocket_fix_mailchimp_main_css', PHP_INT_MAX );
37
+