function context_reaction_theme::options_form in Context 6
Same name and namespace in other branches
- 6.3 plugins/context_reaction_theme.inc \context_reaction_theme::options_form()
- 7.3 plugins/context_reaction_theme.inc \context_reaction_theme::options_form()
Allow admins to provide a section title, section subtitle and section class.
Overrides context_reaction::options_form
1 call to context_reaction_theme::options_form()
- context_reaction_theme::editor_form in plugins/
context_reaction_theme.inc - Editor form.
File
- plugins/
context_reaction_theme.inc, line 30
Class
- context_reaction_theme
- Expose themes as context reactions.
Code
function options_form($context) {
$values = $this
->fetch_from_context($context);
$form = array(
'#tree' => TRUE,
'#title' => t('Theme variables'),
'title' => array(
'#title' => t('Section title'),
'#description' => t('Provides this text as a <strong>$section_title</strong> variable for display in page.tpl.php when this context is active.'),
'#type' => 'textfield',
'#maxlength' => 255,
'#default_value' => isset($values['title']) ? $values['title'] : '',
),
'subtitle' => array(
'#title' => t('Section subtitle'),
'#description' => t('Provides this text as a <strong>$section_subtitle</strong> variable for display in page.tpl.php when this context is active.'),
'#type' => 'textfield',
'#maxlength' => 255,
'#default_value' => isset($values['subtitle']) ? $values['subtitle'] : '',
),
'class' => array(
'#title' => t('Section class'),
'#description' => t('Provides this text as an additional body class (in <strong>$body_classes</strong> in page.tpl.php) when this section is active.'),
'#type' => 'textfield',
'#maxlength' => 64,
'#default_value' => isset($values['class']) ? $values['class'] : '',
),
);
return $form;
}