You are here

function img_assist_popup in Image Assist 6.2

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

Related topics

1 string reference to 'img_assist_popup'
img_assist_menu in ./img_assist.module
Implementation of hook_menu().

File

./img_assist.module, line 1550
Image Assist module

Code

function img_assist_popup() {
  $nid = arg(2);
  if (is_numeric($nid) && ($node = node_load($nid)) && $node->type == 'image' && node_access('view', $node)) {
    drupal_set_title(check_plain($node->title));
    $size = variable_get('img_assist_popup_label', IMAGE_PREVIEW);
    $size = array(
      'key' => $size,
    );
    $content = img_assist_display($node, $size);
    $attributes = array(
      'id' => 'img_assist_popup',
    );
    echo theme('img_assist_popup', $content, $attributes);
    exit;
  }
  else {
    return drupal_access_denied();
  }
}