You are here

function token_custom_permission in Custom Tokens 7

Same name and namespace in other branches
  1. 7.2 token_custom.module \token_custom_permission()

Implementation of hook_permission().

File

./token_custom.module, line 32
It gives the user the ability to create custom tokens using PHP code for specific replacements that can improve other modules relying on the token Drupal 7 core API.

Code

function token_custom_permission() {
  return array(
    'administer custom tokens' => array(
      'title' => t('Manage custom tokens using PHP.'),
      'description' => t('Create/edit/delete custom tokens using markup or PHP.'),
      'restrict access' => TRUE,
    ),
    'list custom tokens' => array(
      'title' => t('Access the custom token\'s administration page.'),
      'description' => t('Create/edit/delete custom tokens using markup or PHP.'),
    ),
  );
}