Last active
March 23, 2016 09:20
-
-
Save aristath/276df8415ee96b4aa13b to your computer and use it in GitHub Desktop.
Add async in scripts. See https://developers.google.com/speed/docs/insights/BlockingJS for details
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
<?php | |
add_filter( 'script_loader_tag', function ( $tag, $handle ) { | |
return preg_replace( "/(><\/[a-zA-Z][^0-9](.*)>)$/", " async $1 ", $tag ); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment