Deferring Javascript causes plugin to fail
-
I installed your plugin today and noticed a problem with it not displaying if we have set Javascript files to defer loading.
We have this
if (!(is_admin() )) { function defer_parsing_of_js ( $url ) { if ( FALSE === strpos( $url, '.js' ) ) return $url; if ( strpos( $url, 'jquery.js' ) ) return $url; // return "$url' defer "; return "$url' defer onload='"; } add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 ); }
in our functions.php to help speed up load times and it seems.
The plugin doesn’t work on the front-end with this function installed. Removing it instantly fixes the issue.
We have tried several other plugins similar to yours, and they all work absolutely fine with or without the defer function in place.
Any ideas on a fix for this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Deferring Javascript causes plugin to fail’ is closed to new replies.