Created
March 7, 2016 11:37
-
-
Save tomhemsley/58387b44303a7214cbd5 to your computer and use it in GitHub Desktop.
Meta Slider Rocket Loader (TEST)
This file contains hidden or 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
add_filter( 'script_loader_tag', 'disable_async_for_rocket_loader', 11, 2 ); | |
function disable_async_for_rocket_loader( $tag, $handle ) { | |
if ( strpos( $handle, 'metaslider' ) !== FALSE ) { | |
$tag = str_replace( "<script type='text/javascript'", "<script data-cfasync='false'", $tag ); | |
} | |
return $tag; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment