You are here

function theme_imagepicker in Image Picker 5

Same name and namespace in other branches
  1. 5.2 imagepicker.module \theme_imagepicker()
5 theme calls to theme_imagepicker()
imagepicker_browse in ./imagepicker.module
imagepicker_groups in ./imagepicker.module
imagepicker_image_edit in ./imagepicker.module
Menu callback; fetches the image edit form for imagepicker
imagepicker_image_select in ./imagepicker.module
imagepicker_upload in ./imagepicker.module
Menu callback; presents the upload form for imagepicker

File

./imagepicker.module, line 712
Enables permitted roles to upload images for insertion into configured nodes.

Code

function theme_imagepicker(&$content) {
  $head_title = drupal_get_title() ? strip_tags(drupal_get_title()) : variable_get('site_name', 'Drupal');
  $path = drupal_get_path('module', 'imagepicker');
  drupal_add_css($path . '/imagepicker.css');
  $styles = drupal_get_css();
  $scripts = drupal_get_js();
  $tabs = theme('menu_local_tasks');
  $messages = imagepicker_strip_messages(theme('status_messages'));
  $template = 'imagepicker.tpl.php';
  $defaulttemplate = variable_get('theme_default', '');
  if ($defaulttemplate) {
    $templatepath = drupal_get_path('theme', $defaulttemplate);
    if (file_exists($templatepath . '/' . $template)) {
      $template = $templatepath . '/' . $template;
    }
  }
  include $template;
  drupal_page_footer();
  exit;
}