Fix the type attribute for the style element Error and Remove W3 Validator Warning

// FIX The type attribute for the style element is not needed and should be omitted error.
add_action(
    'after_setup_theme',
    function() {
        add_theme_support( 'html5', [ 'script', 'style' ] );
    }
);
// Remove W3 Validator Warning 
add_action( 'template_redirect', function(){
    ob_start( function( $buffer ){
        $buffer = str_replace( array( 'type="text/javascript"', "type='text/javascript'" ), '', $buffer );        
        return $buffer;
    });
});

Contact me.

I would love to hear from you, send me a message using the form below.

    ×