Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,
    In order for your code to work you should do this:

    add_action( 'init', 'custom_buffer_start', 1 );
    function custom_buffer_start() {
        ob_start( 'remove_type_from_script_tags' );
    }
    function remove_type_from_script_tags() {
        return str_replace( array( 'type="text/javascript"', "type='text/javascript'" ), '', $tag );
    }

    You beat me to the answer ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove type=”text/javascript”’ is closed to new replies.