• luxxlabs

    (@luxxlabs)


    Hello there,

    I wonder if you can help i love your plugin for BBpress but i have noticed since adding this code the functions the Text to Visual tabs have Broken where you switch from text to viusal in the editor and select image icon? If i remove the code it works fine but has an effect on my sites speed.

    What would i need to exlcude from defer in order to get it working again any idears please?

    Kind regards,

    Tony Harris

    // Defer Javascripts Speed up loading for external js files wait till page loads
    // Defer jQuery Parsing using the HTML5 defer property
    if (!(is_admin() )) {
        function defer_parsing_of_js ( $url ) {
            if ( FALSE === strpos( $url, '.js' ) ) return $url;
            if ( strpos( $url, 'jquery.js' ) || strpos( $url, 'jquery.c.js' ) || strpos( $url, 'wpfront-notification-bar.js' ) ) return $url;
            // return "$url' defer ";
            return "$url' defer onload='";
        }
        add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
    }
    • This topic was modified 8 years ago by luxxlabs.
Viewing 1 replies (of 1 total)
  • Hi there,
    I’m not sure off the top of my head which scripts shouldn’t be deferred. There’s a bunch of them related to the editor (which is part of WordPress and bbPress, not our plugin) – e.g. tinymce.min.js, plugin.min.js, editor.min.js, editor.js. Just a matter of trial and error to figure out which can be deferred and which can’t.

Viewing 1 replies (of 1 total)
  • The topic ‘Text to Visual Broken’ is closed to new replies.