Permalink
Browse files

Merge pull request #1 from waitxd/patch-2

fix issue with roots_print_scripts when $wp_scripts is NULL
  • Loading branch information...
2 parents e4cb2d8 + cda3a57 commit bd0f8d01363f4e3e0668b0541990d256849d82e0 @rakeshtembhurne rakeshtembhurne committed Feb 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 inc/roots-scripts.php
@@ -9,12 +9,13 @@ function roots_scripts() {
add_action('wp_enqueue_scripts', 'roots_scripts');
-if (basename($_SERVER['PHP_SELF']) != 'wp-login.php' && !is_admin()) {
+if (!is_admin()) {
add_action('wp_print_scripts', 'roots_print_scripts');
}
function roots_print_scripts() {
global $wp_scripts;
+ if (! isset($wp_scripts)) return;
$wp_scripts->all_deps($wp_scripts->queue);
$scripts = $locales = array();

0 comments on commit bd0f8d0

Please sign in to comment.