This patch allows a themer to do post processing actions when a user saves the themes configuration. It allows a themer to add a hook, theme_engine_settings_process(&$values) or theme_name_settings_process(&$values), to theme-settings.php This allows you to perform actions during the submission of the form.

CommentFileSizeAuthor
theme_settings_post_process.patch4.26 KBredndahead

Comments

redndahead’s picture

Status: Active » Needs review
moshe weitzman’s picture

This is a bit like letting themes participate in the fapi submit callback system. If we want that, I think we should do it more generally than this patch proposes.

redndahead’s picture

A bit. Any idea of an approach to generalizing this? I'm new to core hacking, but it might be a good place to start. Can a theme add an element to a form anywhere else other than theme-settings.php?

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

effulgentsia’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs work » Active

For better or worse, themes can now implement all alter hooks, including hook_form_alter(). This will no doubt lead to trouble, so leaving this issue open for D8 to come up with safer ways for themes to do what they need.

effulgentsia’s picture

Status: Active » Needs work

Sorry. "needs work" is the correct status.

jhedstrom’s picture

Issue summary: View changes
Status: Needs work » Closed (works as designed)

Closing due to inactivity, and I think there are also other issues out there about how and what the theme should be able to do. Please re-open if I've missed something here.