Running the W3C validator for https://cbdfactum.com generates +50 warnings like this:
The type attribute for the style element is not needed and should be omitted.
or
The type attribute is unnecessary for JavaScript resources.
<b><script type="text/javascript" data-cfasync="false"></b>
or
<b><script data-cfasync="false" data-pagespeed-no-defer type="text/javascript"></b>
See also the attached result of the validation.
I get rid of the warnings using this hook- so you won’t see currently it on the site.
add_action( 'template_redirect', function(){
ob_start( function( $buffer ){
$buffer = str_replace( [ 'type="text/javascript"', "type='text/javascript'", "type='text/css'", 'type="text/css"' ], '', $buffer );
return $buffer;
});
});I think, in one of the next updates the code could be modified so this hook is not needed and the theme generates out of the box a code without W3C warnings.
What do you think?
Thx
Attachments:
You must be
logged in to view attached files.