I just want to remove a secondary menu local task from a preprocess function such as
function mymodule_preprocess_menu_local_tasks(&$vars, $hooks) {
$vars['secondary'] = '';
}
I'm using D7, sky theme for front-end and seven theme for admin. The above code works in seven but not in sky.
The sky theme page.tpl.php has a variable $secondary_local_tasks
which I might be able to remove from hook_preprocess_page()
. I also tried this :
function mymodule_preprocess_page(&$vars, $hooks) {
$vars['secondary_local_tasks'] = '';
unset($vars['tabs']['#secondary']);
}
My hook is invoked correctly, but the secondary local task is still rendered to the template. Where local tasks are prepared to be rendered after my hook ?