Created
December 28, 2017 16:09
-
-
Save markonikolic985/7c133ff85cd637aa02f646b5fe29705d 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
/* Disable WP Rocket option 'async_css'. */ | |
add_action( 'wp', function () { | |
// Stop here if WPR is not active. | |
if ( ! function_exists( 'get_rocket_option' ) ) { | |
return false; | |
} | |
// Only on front-end. | |
if ( ! is_admin() ) { | |
// Pass 0 as value to WPR option 'async_css'. | |
add_filter( | |
'pre_get_rocket_option_async_css', | |
'__return_zero' | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment