鑄雲舖專案經理 -- kun
如果想要在Drupal的個人頁中移除不相關的控制標籤,可以修改下面的程式碼,並寫入版型資料夾的template.php檔案中,並修改function mytheme_為自已的版型名稱:
參考資料來源:https://drupal.org/node/1007226
<?php
/**
* 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]);
}
}
}
}
}
?>