fetch_from_context($context); $form = array( 'class' => array( '#title' => t('Section class'), '#description' => t('Provides this text as an additional body class (in $classes in html.tpl.php) when this section is active.'), '#type' => 'textfield', '#maxlength' => 64, '#default_value' => isset($values['class']) ? $values['class'] : '', ), ); return $form; } /** * Set additional classes onto the 'body_classes'. */ function execute(&$vars) { $classes = array(); foreach ($this->get_contexts() as $k => $v) { if (!empty($v->reactions[$this->plugin]['class'])) { $vars['classes_array'][] = $v->reactions[$this->plugin]['class']; } } } }