Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.