Last active
April 20, 2017 10:37
-
-
Save markonikolic985/5450956c338f50c849e5b20821e99966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do NOT use opening tag! | |
add_action( 'init', '__deactivate_rocket_cdn_for_logged_in_users_2911' ); | |
function __deactivate_rocket_cdn_for_logged_in_users_2911() { | |
if ( ! is_user_logged_in() ) { | |
return; | |
} | |
remove_filter( 'template_directory_uri' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'wp_get_attachment_url' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'smilies_src' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'stylesheet_uri' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'wp_minify_css_url' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'wp_minify_js_url' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'bwp_get_minify_src' , 'rocket_cdn_file', PHP_INT_MAX ); | |
remove_filter( 'wp_get_attachment_image_src' , 'rocket_cdn_attachment_image_src', PHP_INT_MAX ); | |
remove_filter( 'wp_calculate_image_srcset' , 'rocket_add_cdn_on_srcset', PHP_INT_MAX ); | |
remove_filter( 'the_content' , 'rocket_cdn_images', PHP_INT_MAX ); | |
remove_filter( 'widget_text' , 'rocket_cdn_images', PHP_INT_MAX ); | |
remove_filter( 'rocket_buffer' , 'rocket_cdn_images', PHP_INT_MAX ); | |
remove_filter( 'rocket_buffer' , 'rocket_cdn_inline_styles', PHP_INT_MAX ); | |
remove_filter( 'rocket_buffer' , 'rocket_cdn_custom_files', 12 ); | |
remove_filter( 'style_loader_src' , 'rocket_cdn_enqueue', PHP_INT_MAX - 1 ); | |
remove_filter( 'script_loader_src' , 'rocket_cdn_enqueue', PHP_INT_MAX - 1 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment