Skip to content

Commit 802ec9f

Browse files
Merge pull request #397 from contactashish13/issue-315
don't async/defer in admin area
2 parents 810da3d + cc4cee2 commit 802ec9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

classes/Visualizer/Module/Frontend.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ public function __construct( Visualizer_Plugin $plugin ) {
7777
* Adds the async attribute to certain scripts.
7878
*/
7979
function script_loader_tag( $tag, $handle, $src ) {
80+
if ( is_admin() ) {
81+
return $tag;
82+
}
83+
8084
$scripts = array( 'google-jsapi-new', 'google-jsapi-old', 'visualizer-render-google-lib', 'visualizer-render-google' );
8185

8286
foreach ( $scripts as $async ) {

0 commit comments

Comments
 (0)