function fb_social_menu in Facebook social plugins integration 6
Same name and namespace in other branches
- 6.2 fb_social.module \fb_social_menu()
- 7.2 fb_social.module \fb_social_menu()
Implementation of hook_menu
File
- ./
fb_social.module, line 22 - Common settings for all fb social plugins
Code
function fb_social_menu() {
$items = array();
$items['fb_social/channel'] = array(
'type' => MENU_CALLBACK,
'description' => 'Facebook Custom Channel URL',
'page callback' => 'fb_social_custom_channel_url',
'access callback' => TRUE,
);
$items['admin/settings/fb/social'] = array(
'type' => MENU_NORMAL_ITEM,
'title' => 'Facebook social',
'description' => 'Settings for facebook social plugins.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fb_social_settings_form',
),
'file' => 'fb_social.admin.inc',
'access callback' => 'user_access',
'access arguments' => array(
'administer site configuration',
),
);
$items['admin/settings/fb/social/settings'] = array(
'type' => MENU_DEFAULT_LOCAL_TASK,
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fb_social_settings_form',
),
'file' => 'fb_social.admin.inc',
'access callback' => 'user_access',
'access arguments' => array(
'administer site configuration',
),
'weight' => -10,
);
$extra_settings = array(
'recommendations',
'livestream',
'activityfeed',
'facepile',
);
foreach ($extra_settings as $extra) {
$items["admin/settings/fb/social/{$extra}"] = array(
'type' => MENU_LOCAL_TASK,
'title' => $extra,
'page callback' => 'drupal_get_form',
'page arguments' => array(
"fb_social_{$extra}_settings_form",
),
'file' => 'fb_social.widgets.inc',
'access callback' => 'user_access',
'access arguments' => array(
'administer site configuration',
),
'weight' => 1,
);
}
return $items;
}