Created
January 25, 2017 10:15
-
-
Save martsie/869dc26daf030753d0abb10c80cbeeee to your computer and use it in GitHub Desktop.
Example implementation of Drupal 7 hook_permission
This file contains hidden or 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 | |
/** | |
* Implements hook_permission(). | |
* | |
* Defines a new permission called 'my custom permission'. | |
*/ | |
function my_custom_module_permission() { | |
return array( | |
'my custom permission' => array( | |
'title' => t('My custom permission'), | |
'description' => t('Allows users to perform a task in my module.'), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment