Skip to navigation
Remove type from the wordpress javasript tags
26.09.18
info: The “type” attribute is unnecessary for JavaScript resources. add this to your funtion.php file add_filter('style_loader_tag', 'codeless_remove_type_attr', 10, 2); add_filter('script_loader_tag', 'codeless_remove_type_attr', 10, 2); function codeless_remove_type_attr($tag, $handle) { return preg_replace( "/type=['\"]text\/(javascript|css)['\"]/", '', $tag ); }
https://codeless.co/remove-type-attribute-from-wordpress/
Reply
Anonymous
Information Epoch 1732653235
Avoid captive user interfaces.
Home
Notebook
Contact us