So I've figured out how to create tabs/local tasks. But how do I hide them?

I tried the following

function module_menu_link_alter(&$item, $menu) {
  if($item['link_path'] == 'user/%/orders') {
    $item['hidden'] = 1;
  }
}

any help?

Comments

jaypan’s picture

What do you mean by 'hide them'? Remove them from the HTML? Hide them with CSS? Remove all the links or just your own?

The accuracy of the response to a problem is directly proportional to the quality of the explanation.

Contact me to contract me for D7 -> D10/11 migrations.