function _fb_fbml_menu_hack in Drupal for Facebook 6.2
1 call to _fb_fbml_menu_hack()
- fb_fbml_preprocess_page in themes/
fb_fbml/ template.php - Theme engine calls this preprocess "hook" before rendering a page.
File
- themes/
fb_fbml/ template.php, line 97 - Logic needed for FBML theme.
Code
function _fb_fbml_menu_hack() {
// 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;
}