function feeds_tamper_permission in Feeds Tamper 7
Implements hook_permission().
File
- ./
feeds_tamper.module, line 111 - Feeds Tamper - basic API functions and hook implementations.
Code
function feeds_tamper_permission() {
$perms = array(
'administer feeds_tamper' => array(
'title' => t('Administer Feeds Tamper'),
'description' => t('Create, edit and delete plugins for any importer.'),
),
);
// For whatever reason, this gets called withtout the Feeds module being
// loaded in certain odd circumstances.
if (function_exists('feeds_importer_load_all')) {
foreach (feeds_importer_load_all() as $importer) {
$name = array(
'%name' => $importer->config['name'],
);
$perms['tamper ' . $importer->id] = array(
'title' => t('Tamper %name feeds', $name),
'description' => t('Create, edit and delete plugins for %name feeds.', $name),
);
}
}
return $perms;
}