You are here

function media_gallery_process_dropdown in Media Gallery 7.2

Same name and namespace in other branches
  1. 7 media_gallery.module \media_gallery_process_dropdown()

Form #process function for attaching dropdown-related classes and settings.

2 string references to 'media_gallery_process_dropdown'
media_gallery_form_media_gallery_node_form_alter in ./media_gallery.module
media_gallery_form_taxonomy_form_term_alter in ./media_gallery.module
Implements hook_form_FORM_ID_alter().

File

./media_gallery.module, line 1692

Code

function media_gallery_process_dropdown($element, &$form_state) {
  $element['#attributes']['class'][] = 'media-gallery-dropdown';
  $element['#attached']['js'][] = array(
    'type' => 'setting',
    'data' => array(
      'media_gallery_dropdown_options' => array(
        $element['#id'] => $element['#media_gallery_dropdown_options'],
      ),
    ),
  );
  return $element;
}