You are here

linkit_permissions.module in Linkit 7

Same filename and directory in other branches
  1. 6 plugins/linkit_permissions/linkit_permissions.module

Extend Linkit with permissions.

File

plugins/linkit_permissions/linkit_permissions.module
View source
<?php

/**
 * @file
 * Extend Linkit with permissions.
 */

/**
 * Implements hook_perm().
 */
function linkit_permissions_permission() {
  $perms = array(
    'use all linkit plugins' => array(
      'title' => t('Use all Linkit plguins'),
    ),
  );
  foreach (module_invoke_all('linkit_info_plugins') as $plugin) {
    $perms['use linkit ' . check_plain($plugin['type']) . ' plugin'] = array(
      'title' => t('Use Linkit %type plugin', array(
        '%type' => $plugin['type'],
      )),
    );
  }
  return $perms;
}

Functions

Namesort descending Description
linkit_permissions_permission Implements hook_perm().