Commit f392d38e authored by catch's avatar catch

Issue #2096591 by mr.baileys, vijaycs85, Wim Leers: Remove drupal_add_css() from the theme system.

parent 35632544
......@@ -210,12 +210,18 @@ function _drupal_theme_initialize($theme, $base_theme = array()) {
}
}
// And now add the stylesheets properly
// And now add the stylesheets properly.
$css = array();
foreach ($final_stylesheets as $media => $stylesheets) {
foreach ($stylesheets as $stylesheet) {
drupal_add_css($stylesheet, array('group' => CSS_AGGREGATE_THEME, 'every_page' => TRUE, 'media' => $media));
$css['#attached']['css'][$stylesheet] = array(
'group' => CSS_AGGREGATE_THEME,
'every_page' => TRUE,
'media' => $media
);
}
}
drupal_render($css);
// Do basically the same as the above for scripts
$final_scripts = array();
......
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