Unlike the author of https://stackoverflow.com/questions/3530756/how-to-hide-edit-view-tabs I'd like to totally replace node tabs with what users see on their user profile pages.
Users on this website won't be able to edit their nodes and admins can just type
node/%/edit or be provided with a link on special block, so node tabs are useless for this project, but user tabs are essential as there are no community nodes, users are locked to their accounts and need to see all their nodes under user accounts.
I tried to use the hook_menu_local_tasks_alter, it correctly adds new tab items, but I don't know how to get rid of the existing ones. I tried to hide them with Tabtamer module, but unfortunately it gives:
Notice: Undefined index: count in menu_primary_local_tasks() (line 2240 of ../includes/menu.inc).
Thus the existing items must exists, so instead of adding new individual items with hook_menu_local_tasks_alter, I would like to just check
if arg(0) == 'node' then replace the node tabs totally with what users usually see on their profile pages.
How could I totally replace node tabs with user tabs on node pages?