You are here

function notifications_user_menu in Notifications 7

Implementation of hook_menu()

File

notifications_user/notifications_user.module, line 11
Notifications module - User subscriptions tabs

Code

function notifications_user_menu() {
  $items = array();

  // User pages for each subscription type, will be disabled by default
  foreach (array(
    'user_content',
  ) as $type) {
    if (notifications_subscription_type_enabled($type)) {
      $items['user/%user/notifications/' . $type] = array(
        'type' => MENU_LOCAL_TASK,
        'access callback' => 'notifications_user_account_access',
        'access arguments' => array(
          1,
          $type,
        ),
        'title' => notifications_subscription_type($type, 'title'),
        'page callback' => 'notifications_account_subscription_list_page',
        'page arguments' => array(
          $type,
          1,
        ),
        'weight' => 10,
      );
    }
  }
  return $items;
}