function phptemplate_menu_local_tasks in Drupal for Facebook 5
Same name and namespace in other branches
- 5.2 themes/fb_fbml/template.php \phptemplate_menu_local_tasks()
File
- themes/
fb_fbml/ template.php, line 105
Code
function phptemplate_menu_local_tasks() {
global $fb;
if ($fb && $fb
->in_fb_canvas()) {
$local_tasks = menu_get_local_tasks();
$pid = menu_get_active_nontask_item();
$output = '';
if (count($local_tasks[$pid]['children'])) {
$output .= "<fb:tabs>\n";
foreach ($local_tasks[$pid]['children'] as $mid) {
$item = menu_get_item($mid);
$selected = menu_in_active_trail($mid) ? "true" : "false";
$output .= "<fb:tab-item href=\"" . url($item['path'], NULL, NULL, FALSE) . "\" title=\"" . $item['title'] . "\" selected=\"{$selected}\">" . $item['title'] . "</fb:tab-item>\n";
}
$output .= "</fb:tabs>\n";
}
// TODO secondary local tasks
}
else {
$output = theme_menu_local_tasks();
}
return $output;
}