You are here

function img_assist_textarea in Image Assist 5

Same name and namespace in other branches
  1. 5.3 img_assist.module \img_assist_textarea()
  2. 5.2 img_assist.module \img_assist_textarea()
  3. 6.2 img_assist.module \img_assist_textarea()
  4. 6 img_assist.module \img_assist_textarea()

Add image link underneath textareas.

File

./img_assist.module, line 134
Image Assist module

Code

function img_assist_textarea($element) {
  $link = variable_get('img_assist_link', 'icon');
  if ($link == 'icon' || $link == 'text') {
    if (_img_assist_textarea_match($element['#id']) && _img_assist_page_match() && !strstr($_GET['q'], 'img_assist')) {
      if (user_access('access img_assist')) {
        $output = theme('img_assist_textarea_link', $element, $link);
        $element['#suffix'] = isset($element['#suffix']) ? $element['#suffix'] . $output : $output;
      }
    }
  }
  return $element;
}