You are here

function html5_tools_admin_settings_submit in HTML5 Tools 7

Handle submission of the html5_tools configuration page.

1 string reference to 'html5_tools_admin_settings_submit'
html5_tools_admin_settings in ./html5_tools.admin.inc
HTML5 Tools configuration page.

File

./html5_tools.admin.inc, line 118
Admin page callbacks for the html5_tools module.

Code

function html5_tools_admin_settings_submit($form, &$form_state) {
  if (!empty($form_state['values']['html5_tools_override_views_field_rewrite_elements'])) {
    variable_set('views_field_rewrite_elements', array(
      '' => t('- Use default -'),
      '0' => t('- None -'),
      'div' => t('DIV'),
      'span' => t('SPAN'),
      'h1' => t('H1'),
      'h2' => t('H2'),
      'h3' => t('H3'),
      'h4' => t('H4'),
      'h5' => t('H5'),
      'h6' => t('H6'),
      'p' => t('P'),
      'strong' => t('STRONG'),
      'em' => t('EM'),
      'article' => t('ARTICLE'),
      'aside' => t('ASIDE'),
      'figure' => t('FIGURE'),
      'figcaption' => t('FIGCAPTION'),
      'footer' => t('FOOTER'),
      'header' => t('HEADER'),
      'menu' => t('MENU'),
      'nav' => t('NAV'),
      'section' => t('SECTION'),
    ));
  }
  else {
    variable_del('views_field_rewrite_elements');
  }
  drupal_theme_rebuild();
}