From 5ec10a529635a01c6a5e859f419677a8597da1c4 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Mon, 13 Feb 2012 17:28:14 -0700 Subject: [PATCH] Fix #279 - Output enqueued scripts in proper order --- inc/roots-scripts.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/roots-scripts.php b/inc/roots-scripts.php index 95747f3..7c73013 100644 --- a/inc/roots-scripts.php +++ b/inc/roots-scripts.php @@ -16,10 +16,13 @@ if (!is_admin()) { function roots_print_scripts() { global $wp_scripts; + $wp_scripts->all_deps($wp_scripts->queue); $scripts = $locales = array(); + $queue = $wp_scripts->queue; + $wp_scripts->all_deps($queue); - foreach ($wp_scripts->queue as $key => $handle) { + foreach ($wp_scripts->to_do as $key => $handle) { $skip_scripts = array('jquery', 'roots_script', 'roots_plugins'); $src = $wp_scripts->registered[$handle]->src;