You are here

function theme_imagepicker_user_menu in Image Picker 5.2

Same name and namespace in other branches
  1. 5 imagepicker.module \theme_imagepicker_user_menu()
1 call to theme_imagepicker_user_menu()
imagepicker_user_page in ./imagepicker.module
Account functions

File

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

Code

function theme_imagepicker_user_menu($mode = 'browse') {
  global $user;
  $path = "user/" . $user->uid . "/imagepicker";
  $items = array(
    l(t('Upload'), $path),
    $mode == 'browse' ? l(t('List'), "{$path}/images/browseadmin") : l(t('Browse'), "{$path}/images/browse"),
    l(t('Groups'), "{$path}/groups/browse"),
    l(t('Stats'), "{$path}/stats"),
  );
  if (user_access('use public imagepicker') && variable_get('imagepicker_public_enabled', 1)) {
    $items[] = l(t('Browse Public'), "{$path}/images/browse_public");
  }
  $content .= theme_item_list($items, NULL, 'ul', $attributes = array(
    'class' => 'tabs secondary',
  ));
  return $content;
}