Last active
December 16, 2017 07:36
-
-
Save kamalinfo/006c1d1dbb2e6015b5f11eb048c3224f 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 | |
add_filter('style_loader_tag', 'themeName_remove_type_attr', 10, 2); | |
add_filter('script_loader_tag', 'themeName_remove_type_attr', 10, 2); | |
function themeName_remove_type_attr($tag, $handle) { | |
return preg_replace( "/type=['\"]text\/(javascript|css)['\"]/", '', $tag ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment