Commit a0152d5c authored by catch's avatar catch

Issue #2160589 by vijaycs85: Remove drupal_add_js() from theme.inc.

parent 52eb9366
......@@ -237,9 +237,15 @@ function _drupal_theme_initialize($theme, $base_theme = array()) {
}
// Add scripts used by this theme.
$js = array();
foreach ($final_scripts as $script) {
drupal_add_js($script, array('group' => JS_THEME, 'every_page' => TRUE));
$js['#attached']['js'][] = array(
'data' => $script,
'group' => JS_THEME,
'every_page' => TRUE,
);
}
drupal_render($js);
$theme_engine = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment