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

8.0.x
Nathaniel Catchpole 2014-01-03 17:22:34 +00:00
parent 52eb9366e4
commit a0152d5ccf
1 changed files with 7 additions and 1 deletions

View File

@ -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;