How to show and hide menu tabs in module I have created tabs in module for different functions. As per code shown below, all the tabs are shown simultaneouly when I login to the module. But, I want to show specific modules depending on the play formats, how can I do that? I tried hook for menu_alter and created custom module but all hides specific menu directly and not condition wise.

Play URLs

$items['abc/play'] = array(
    'title' =&gt; t('Welcome Player'),
    'access arguments' =&gt; array('administer users'),
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('score_entry_table'),
    'access callback' =&gt; TRUE,
    'file' =&gt; 'scoreentry.inc',
);

$items['abc/play/cricket_score'] = array(
    'title'         =&gt; t('Cricket Scoreboard'),
    'page callback' =&gt; 'cricket_score_table',
    'page arguments' =&gt; array(1),
    'access arguments' =&gt; array('administer users'),
    'access callback' =&gt; TRUE,  
    'type' =&gt; MENU_LOCAL_TASK,
    'file' =&gt; 'cricketscore.inc',
    'weight' =&gt; 2   
);  
$items['abc/play/soccer_score'] = array(
    'title'         =&gt; t('Soccer Scoreboard'),
    'page callback' =&gt; 'soccer_score_table',
    'page arguments' =&gt; array(1),
    'access arguments' =&gt; array('administer users'),
    'access callback' =&gt; TRUE,  
    'type' =&gt; MENU_LOCAL_TASK,
    'file' =&gt; 'soccerscore.inc',
    'weight' =&gt; 1   
);


Now it shows both tabs after login, I want to show only one tab as per format. I go to scoreentry page, where I get the format code and I want to hide the tab based on that format.
Have a look at the Tab Tamer Module.