Created
October 8, 2012 03:13
-
-
Save danreb/3850525 to your computer and use it in GitHub Desktop.
Remove Login Tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will just remove log-in tab for customizing in theme, use this together with the code found in https://gist.github.com/3850448 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = My Custom Module | |
description = Remove tabs on Log-in / Create Account / Request Password pages. | |
core = 7.x | |
package = Custom | |
files[] = mymodule.module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_menu_alter(). | |
* Remember to clear the menu cache after adding/editing this function. | |
*/ | |
function mymodule_menu_alter(&$items) { | |
/* | |
* Removing user log-in tabs, note the pages themselves are still available to link to | |
* Set these tabs to MENU_CALLBACK, so they still register the path, but just don't show the tab: | |
*/ | |
$items['user']['type'] = MENU_CALLBACK; | |
$items['user/password']['type'] = MENU_CALLBACK; | |
$items['user/register']['type'] = MENU_CALLBACK; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment