function theme_options

cis7 options_element.inc theme_options($variables)
cle7 options_element.inc theme_options($variables)
elmsmedia7 options_element.inc theme_options($variables)
icor7 options_element.inc theme_options($variables)
meedjum_blog7 options_element.inc theme_options($variables)
mooc7 options_element.inc theme_options($variables)

Theme an options element.

17 theme calls to theme_options()
l in includes/common.inc
Formats an internal or external URL link as an HTML anchor tag.
views_content_views_row_content_type_render in sites/all/modules/ulmus/ctools/views_content/plugins/content_types/views_row.inc
Render the node_terms content type.
views_data_export_plugin_style_export::render in sites/all/modules/local_contrib/views_data_export/plugins/views_data_export_plugin_style_export.inc
Render the display in this style.
views_data_export_plugin_style_export::render_body in sites/all/modules/local_contrib/views_data_export/plugins/views_data_export_plugin_style_export.inc
views_data_export_plugin_style_export::render_footer in sites/all/modules/local_contrib/views_data_export/plugins/views_data_export_plugin_style_export.inc

... See full list

385 string references to the theme hook from theme_options()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

accessibility_content_init in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.inc
accessibility_reporting_views_default_views in sites/all/modules/ulmus/accessibility/modules/accessibility_reporting/views/accessibility_reporting.views_default.inc
adaptivetheme_drush_command in sites/all/themes/ulmus/adaptivetheme/at_core/adaptivetheme.drush.inc
Implementation of hook_drush_command().
adaptivetheme_five_5x20_panels_layouts in sites/all/themes/ulmus/adaptivetheme/at_core/layouts/panels/five_5x20/five_5x20.inc
adaptivetheme_four_4x25_panels_layouts in sites/all/themes/ulmus/adaptivetheme/at_core/layouts/panels/four_4x25/four_4x25.inc
@file Implementation of hook_panels_layouts

... See full list

File

sites/all/modules/ulmus/options_element/options_element.inc, line 12
All logic for options_element form elements.

Code

function theme_options($variables) {
  $element = $variables['element'];

  element_set_attributes($element, array('id'));
  _form_set_class($element, array('form-options'));

  $classes = &$element['#attributes']['class'];
  $classes[] = 'options-key-type-' . $element['#key_type'];

  if ($element['#key_type_toggled']) {
    $classes[] = 'options-key-custom';
  }

  if (isset($element['#optgroups']) && $element['#optgroups']) {
    $classes[] = 'options-optgroups';
  }

  if (isset($element['#multiple']) && $element['#multiple']) {
    $classes[] = 'options-multiple';
  }

  // Replace the error class from wrapper div, which doesn't display well with
  // complex elements like Options Element.
  if ($key = array_search('error', $classes, TRUE)) {
    $classes[$key] = 'options-error';
  }

  $options = '';
  $options .= drupal_render($element['options_field']);
  if (isset($element['default_value_field'])) {
    $options .= drupal_render($element['default_value_field']);
  }
  if (isset($element['default_value_pattern'])) {
    $options .= drupal_render($element['default_value_pattern']);
  }

  $settings = '';
  if (isset($element['custom_keys'])) {
    $settings .= drupal_render($element['custom_keys']);
  }
  if (isset($element['multiple'])) {
    $settings .= drupal_render($element['multiple']);
  }
  if (isset($element['option_settings'])) {
    $settings .= drupal_render($element['option_settings']);
  }

  $output = '';
  $output .= '<div' . drupal_attributes($element['#attributes']) . '>';
  $output .= theme('container', array('element' => array(
    '#title' => t('Options'),
    '#collapsible' => FALSE,
    '#children' => $options,
    '#attributes' => array('class' => array('options')),
  )));

  if (!empty($settings)) {
    $output .= theme('fieldset', array('element' => array(
      '#title' => t('Option settings'),
      '#collapsible' => FALSE,
      '#children' => $settings,
      '#attributes' => array('class' => array('option-settings')),
    )));
  }
  $output .= '</div>';

  return $output;
}