How to Remove unwanted tabs in Drupal 6



In Drupal 6, you can remove unwanted tabs by using following function in template.php:


<?php
function yourthemename_preprocess_page(&$vars) {
  
// Remove undesired local task tabs.
  // This first example removes the Users tab from the Search page.
  
yourthemename_removetab('Users'$vars);
}
?>


<?php
// Remove undesired local task tabs.
// Related to yourthemename_removetab() in yourthemename_preprocess_page().
function yourthemename_removetab($label, &$vars) {
  
$tabs explode("\n"$vars['tabs']);
  
$vars['tabs'] = '';

  foreach (
$tabs as $tab) {
    if (
strpos($tab'>' $label '<') === FALSE) {
      
$vars['tabs'] .= $tab "\n";
    }
  }
}
?>