function admin_menu_settings_process_components

nittany7 admin_menu.inc admin_menu_settings_process_components($element)
cis7 admin_menu.inc admin_menu_settings_process_components($element)
mooc7 admin_menu.inc admin_menu_settings_process_components($element)

#process callback for component plugin form element in admin_menu_theme_settings().

1 string reference to 'admin_menu_settings_process_components'
admin_menu_theme_settings in modules/contrib/admin_menu/admin_menu.inc
Form builder function for module settings.

File

modules/contrib/admin_menu/admin_menu.inc, line 730
Menu builder functions for Administration menu.

Code

function admin_menu_settings_process_components($element) {
  // Assign 'rel' attributes to all options to achieve a live preview.
  // Unfortunately, #states relies on wrapping .form-wrapper classes, so it
  // cannot be used here.
  foreach ($element['#options'] as $key => $label) {
    if (!isset($element[$key]['#attributes']['rel'])) {
      $id = preg_replace('/[^a-z]/', '-', $key);
      $element[$key]['#attributes']['rel'] = '#' . $id;
    }
  }
  return $element;
}