Skip to content

Commit

Permalink
Publish theme_edit_form and theme_edit_form_completed events so that …
Browse files Browse the repository at this point in the history
…themes can piggyback on the regular Admin > Appearance > Theme Options page.
  • Loading branch information
bharat committed Nov 29, 2009
1 parent 3d4672b commit 01bad46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/gallery/controllers/admin_theme_options.php
Expand Up @@ -58,6 +58,8 @@ public function save() {
module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value);
module::set_var("gallery", "show_credits", $form->edit_theme->show_credits->value);

module::event("theme_edit_form_completed", $form);

message::success(t("Updated theme details"));
url::redirect("admin/theme_options");
} else {
Expand Down
4 changes: 4 additions & 0 deletions modules/gallery/helpers/theme.php
Expand Up @@ -85,6 +85,10 @@ static function get_edit_form_admin() {
->value(module::get_var("gallery", "footer_text"));
$group->checkbox("show_credits")->label(t("Show site credits"))->id("g-footer-text")
->checked(module::get_var("gallery", "show_credits"));

module::event("theme_edit_form", $form);

$group = $form->group("buttons");
$group->submit("")->value(t("Save"));
return $form;
}
Expand Down

0 comments on commit 01bad46

Please sign in to comment.