Support » Fixing WordPress » Post editor blank page after adding Defer Parsing Javascript

  • tldr;

    I’m using this code to defer parsing js

    function defer_parsing_of_js ( $url ) {
      if ( FALSE === strpos( $url, '.js' ) ) return $url;
      if ( strpos( $url, 'jquery.js' ) ) return $url;
      if ( strpos( $url, 'jquery.min.js' ) ) return $url;
        return "$url' defer ";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );

    site working properly, but when I go to post editor, it just completely blank, white blank. Try to remove that defer, and the post editor works as before. Why is this happening ? Is there something wrong with the code ? Or I’m missing something ? FYI, I’m not a coder, I got that code from some site (forgot what’s the site). Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post editor blank page after adding Defer Parsing Javascript’ is closed to new replies.