Move style/script adding from _drupal_theme_initialize() to page rendering

Created on 3 January 2014, about 11 years ago
Updated 15 January 2025, 21 days ago

Follow-up from #2160589: Remove drupal_add_js() from theme.inc .

We currently add scripts and styles in _drupal_theme_initialize(). This part of the logic could be moved to a different function, and done as part of page rendering - only for the responses that needs scripts/styles added. We could either do this as a final step before rendering css/js, or attach the scripts to the $page array. Either way it'd make a full bootstrap lighter.

📌 Task
Status

Closed: outdated

Version

11.0 🔥

Component

theme system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024