You are here

function image_menu in Image 5.2

Same name and namespace in other branches
  1. 5 image.module \image_menu()
  2. 6 image.module \image_menu()

Implementation of hook_menu

File

./image.module, line 265

Code

function image_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'node/add/image',
      'title' => t('Image'),
      'access' => user_access('create images'),
    );
    $items[] = array(
      'path' => 'image/view',
      'title' => t('image'),
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
      'callback' => 'image_fetch',
    );
    $items[] = array(
      'path' => 'admin/settings/image',
      'title' => t('Images'),
      'description' => t('Configure the location of image files and image sizes. Also, if enabled, configure image attachments and options for image galleries.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'image_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/settings/image/nodes',
      'title' => t('Files and sizes'),
      'description' => t('Configure the location of image files and image sizes.'),
      'access' => user_access('administer site configuration'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => '-10',
    );
  }
  return $items;
}