function xbbcode_menu in Extensible BBCode 5
Same name and namespace in other branches
- 8 xbbcode.module \xbbcode_menu()
- 6 xbbcode.module \xbbcode_menu()
- 7 xbbcode.module \xbbcode_menu()
File
- ./
xbbcode.module, line 8
Code
function xbbcode_menu($maycache) {
$items = array();
$cache[] = array(
'path' => 'admin/settings/xbbcode',
'type' => MENU_NORMAL_ITEM,
'title' => t('XBBCode'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'xbbcode_settings_handlers',
),
);
$cache[] = array(
'path' => 'admin/settings/xbbcode/handlers',
'type' => MENU_DEFAULT_LOCAL_TASK,
'title' => t('Tag Settings'),
);
$cache[] = array(
'path' => 'admin/settings/xbbcode/handlers/-1',
'type' => MENU_DEFAULT_LOCAL_TASK,
'title' => t('Global'),
'weight' => -1,
);
foreach (_xbbcode_list_formats() as $key => $format) {
$items[] = array(
'path' => 'admin/settings/xbbcode/handlers/' . $key,
'title' => t('!key', array(
'!key' => $format,
)),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'xbbcode_settings_handlers',
),
'type' => MENU_LOCAL_TASK,
);
}
$cache[] = array(
'path' => 'admin/settings/xbbcode/tags',
'type' => MENU_LOCAL_TASK,
'title' => t('Custom Tags'),
'weight' => 1,
'callback' => 'drupal_get_form',
'callback arguments' => array(
'xbbcode_custom_tags',
),
);
return $maycache ? $cache : $items;
}