Created
November 29, 2019 11:50
-
-
Save vanaf1979/adce872603f73b22cb629db6e4ec4827 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 | |
function optimize_style_tags( $html , $handle , $href , $media ) { | |
return str_replace( "type='text/css'" , "" , $html ); | |
} | |
add_filter('style_loader_tag', 'optimize_style_tags', 10, 4); | |
function optimize_script_tags( $tag , $handle , $src ) { | |
return str_replace( "type='text/javascript'" , "" , $html ); | |
} | |
add_filter('script_loader_tag', 'optimize_script_tags', 10, 3); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment