You are here

function imce_process_url_element in IMCE 8

Same name and namespace in other branches
  1. 8.2 imce.module \imce_process_url_element()

Integrates Imce into an URL element.

2 calls to imce_process_url_element()
imce_form_editor_image_dialog_alter in ./imce.module
Implements hook_form_FORM_ID_alter() for editor_image_dialog form.
imce_form_editor_link_dialog_alter in ./imce.module
Implements hook_form_FORM_ID_alter() for editor_link_dialog form.

File

./imce.module, line 111
Defines Drupal hooks for imce module.

Code

function imce_process_url_element(&$element, $type = 'link') {
  if ($element && Imce::access()) {
    $element['#attributes']['class'][] = 'imce-url-input';
    $element['#attributes']['data-imce-type'] = $type;
    $element['#attached']['library'][] = 'imce/drupal.imce.input';
  }
}