[Hummingbird] Removing "Type='text/css'" and "Type='text/javascript&a

Hi, it would be nice to have an option to remove the type tags from the script, link and style tags before printing the css, as according to w3 its not needed.

We currently use the following code to remove them it however does not apply to the inlen <style> elements

add_filter('style_loader_tag', 'myplugin_remove_type_attr', 99, 2);
add_filter('script_loader_tag', 'myplugin_remove_type_attr', 99, 2);

function myplugin_remove_type_attr($tag, $handle) {
return preg_replace( "/type=['"]text/(javascript|css)['"]/", '', $tag );

  • Rupok
    • Support Ninja

    Hi Bottle Post Media S.L.U.,

    Thanks a lot for your suggestion. I hope more people will vote for this because more people voting for this, more chances our developers will work on this and will include this feature in our future releases.

    Have a nice day. Cheers!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.