function _fb_canvas_menu_hack in Drupal for Facebook 6.2
Build tabs in facebook-aware theme.
1 call to _fb_canvas_menu_hack()
- fb_canvas_fb in ./
fb_canvas.module - Implementation of hook_fb().
File
- ./
fb_canvas.module, line 929 - This module provides support for Canvas page applications. Use Drupal to power traditional Facebook Apps.
Code
function _fb_canvas_menu_hack() {
if (fb_canvas_is_fbml()) {
// We have to go out of our way here to theme the tabs.
// The code in menu.inc that themes them is complex,
// incomprehensible, and tangles the theme layer with the logic
// layer. It doesn't help that the same theme functions are called
// for tabs as are called for all other menus. So we use a global
// to keep track of what we're doing.
global $_fb_canvas_state;
$_fb_canvas_state = 'tabs';
// Why does a call to menu_tab_root_path theme the tabs? I have no
// idea, but it does and caches the result.
menu_tab_root_path();
$_fb_canvas_state = NULL;
}
}