Skip to content
Snippets Groups Projects
Commit a0152d5c authored by catch's avatar catch
Browse files

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

parent 52eb9366
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment