function activity_menu in Activity 5
Same name and namespace in other branches
- 5.4 activity.module \activity_menu()
- 5.2 activity.module \activity_menu()
- 5.3 activity.module \activity_menu()
- 6.2 activity.module \activity_menu()
- 6 activity.module \activity_menu()
- 7 activity.module \activity_menu()
Implementation of hook_menu().
File
- ./
activity.module, line 18 - Activity module: Allow users to see their friends' activity on the site.
Code
function activity_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'activity',
'title' => t('activity'),
'callback' => 'activity_page',
'callback arguments' => array(
arg(1),
),
'access' => user_access('view activity'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'activity/feed',
'callback' => 'activity_feed',
'callback arguments' => array(
arg(2),
),
'access' => user_access('view activity'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/settings/activity',
'title' => t('Activity Settings'),
'description' => t('Customize what will display on your users activity page.'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'activity_admin_settings',
),
'access' => user_access('administer site configuration'),
);
$items[] = array(
'path' => 'admin/settings/activity/implements',
'title' => t('Choose modules'),
'callback' => 'activity_admin_settings',
'access' => user_access('administer site configuration'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/activity/tokens',
'title' => t('Choose tokens'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'activity_admin_settings',
),
'access' => user_access('administer site configuration'),
'type' => MENU_LOCAL_TASK,
);
}
return $items;
}