Create Theme UI API

Created on 12 April 2012, over 13 years ago
Updated 13 August 2025, 2 months ago

I know there's a huge amount of discussion currently about the whole render API and actual output of themes, but I think this is also another topic at hand that should be discussed.

Problem:
Modules or themes that wish to add theme enhancements in the appearance admin area currently have to hook_form_alter the theme_settings_form to inject their Form APIs and tack on submit handlers to save their custom settings. This has been apparent in even the Color module since D6. Granted for themes, you can use the theme-settings.php file, but that seems like a rather half-@**ed way to attempt to incorporate configurable settings in your theme.

Solution:
Create a Theme UI API that allows modules and themes (natively, no weird hook_form_alters and submit handlers) the ability to specify additional settings to be shown for that theme. This would be extremely helpful in implementing: #445990: [META] Refactor color module β†’ .

Possible contrib modules/themes that could also benefit from this new API:
@font-your-face
Skinr
Style Guide
CSS3PIE
Nice Menus
Omega
Fusion
AdaptiveTheme

Food for thought:
Sweaver is an interesting module that provides a theme GUI overlay, so to speak, on every page. I really haven't used it at all, but it seems rather quite interesting and a great proof of concept. I would like to see maybe incorporating something like this into core, giving the user the ability to "select" the element they'd like to style and allowing the contrib modules/themes to provide the available configurable options they can choose from (ie: Skinr, @font-your-face, Color, rounded corners). In a way, it would almost be like providing a type of ThemeRoller from jQuery UI.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

theme system

Created by

πŸ‡ΊπŸ‡ΈUnited States markhalliwell

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024