diff --git a/inc/roots-scripts.php b/inc/roots-scripts.php index 1522b75..706d0c9 100644 --- a/inc/roots-scripts.php +++ b/inc/roots-scripts.php @@ -14,8 +14,16 @@ if (!is_admin()) { } function roots_print_scripts() { + if (!is_admin()) { + return; + } + global $wp_scripts; + if (!is_a($wp_scripts, 'WP_Scripts')) { + return; + } + $wp_scripts->all_deps($wp_scripts->queue); $scripts = $locales = array(); $queue = $wp_scripts->queue;