Message d'erreur

Deprecated function: Optional parameter $dropbox declared before required parameter $save_lineage is implicitly treated as a required parameter in include_once() (line 1439 of /home/dsinmetz/public_html/cookbook/includes/bootstrap.inc).

Cacher un Tab menu indésirable

Portrait de Alex

* Implementation of hook_preprocess_page().
*/
function mytheme_preprocess_page(&$variables) {

// Tab Tamer
$unwanted_tabs = array('user/%/invites', 'user/%/shortcuts', 'user/%/relationships/1', 'user/%/track', 'user/%/contact', 'user/%/devel', 'node/%/devel');
foreach ($variables['tabs'] as $group_key =?> $tab_group) {
if (is_array($tab_group)) {
foreach ($tab_group as $key => $tab) {
if (isset($tab['#link']['path']) && in_array($tab['#link']['path'], $unwanted_tabs)){
unset($variables['tabs'][$group_key][$key]);
}
}
}
}
}
?>

Tags: