Created
March 4, 2012 14:30
-
-
Save cecilemuller/1973253 to your computer and use it in GitHub Desktop.
Add a shortcut to "Create Node" at /admin in Drupal 6
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(). | |
* | |
* Add a shortcut to "create node" in the Admin page for users | |
* that have the permission to create at least one type, in Drupal 6. | |
*/ | |
function MODULENAME_menu(){ | |
return array( | |
'admin/content/create' => array( | |
'title' => 'Create', | |
'description' => 'Create Nodes', | |
'access callback' => 'menu_valid_path', | |
'access arguments' => array( | |
array('link_path' => 'node/add') | |
), | |
'page callback' => 'drupal_goto', | |
'page arguments' => array('node/add'), | |
) | |
); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment