code in functions.php stops refreshing the page when cache is emptied
-
Hey I am using w3 total cache and cloudflare together. I have the following code in my child thems functions.php
function my_deregister_styles() { wp_dequeue_style( 'contact-form-7'); wp_dequeue_style( 'font-awesome'); wp_dequeue_style( 'main-styles'); wp_dequeue_style( 'magnific'); wp_dequeue_style( 'responsive'); wp_dequeue_style( 'select2-css'); wp_deregister_style( 'redux-google-fonts-'); wp_deregister_style( 'skin-ascend'); wp_deregister_style( 'js_composer_front'); wp_deregister_style('rgs'); wp_deregister_style('font-awesome'); wp_deregister_style("main-styles"); wp_deregister_style("responsive"); wp_deregister_style("select2"); wp_deregister_style("skin-ascend"); } add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); function disable_wp_emojicons() { // all actions related to emojis remove_action( 'admin_print_styles', 'print_emoji_styles' ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); // filter to remove TinyMCE emojis add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' ); } add_action( 'init', 'disable_wp_emojicons' ); function disable_emojicons_tinymce( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } else { return array(); } } ?>If the cosde is not present w3 toal cache refreshes the page without any problems. The cahce itself is flushed though. Do you have an idea what setting I would have to change to actually get the page to refresh again. At the moment it just gets stuck and the screen remains white.
Thank you very much!All the best
Tino
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘code in functions.php stops refreshing the page when cache is emptied’ is closed to new replies.