You are here

function cmf_menu in Content Management Filter 5

Same name and namespace in other branches
  1. 6.2 cmf.module \cmf_menu()
  2. 6 cmf.module \cmf_menu()
  3. 7 cmf.module \cmf_menu()

Implementation of hook_menu().

File

./cmf.module, line 36
@brief Content management filter module file

Code

function cmf_menu($may_cache) {
  $items = array();
  $manage_access = user_access('filter and manage site content');
  $view_access = user_access('view user content list');
  $access_profiles = user_access('access user profiles');

  //  if ($may_cache) {
  $items[] = array(
    'path' => 'admin/content/filter',
    'title' => t('Content Management Filter'),
    'description' => t('All-in-one advanced filter and management of your site content.'),
    'callback' => 'cmf_admin_content_page',
    'access' => $manage_access,
  );
  if (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) > 0) {
    $items[] = array(
      'path' => 'user/' . arg(1) . '/cmf',
      'title' => t('CMF'),
      'description' => t('User-specific content management filter'),
      'callback' => 'cmf_admin_content_page',
      'access' => $access_profiles || $view_access,
      'type' => MENU_LOCAL_TASK,
    );
  }
  $items[] = array(
    'path' => 'cmf/userauto',
    'title' => 'User autocomplete',
    'callback' => '_cmf_user_autocomplete',
    'access' => $manage_access || $view_access || $access_profiles,
    'type' => MENU_CALLBACK,
  );

  //  }
  return $items;
}