function metatag_config_access in Metatag 7
Access callback for meta tag configuration instances.
3 calls to metatag_config_access()
- metatag_config_delete_form in ./
metatag.admin.inc - Form API callback for deleting a default configuration.
- metatag_config_delete_form_submit in ./
metatag.admin.inc - Form API submission callback for metatag_config_delete_form().
- metatag_config_overview in ./
metatag.admin.inc - Menu callback for the main Metatag configuration page.
1 string reference to 'metatag_config_access'
- metatag_menu in ./
metatag.module - Implements hook_menu().
File
- ./
metatag.module, line 2530 - Primary hook implementations for Metatag.
Code
function metatag_config_access($op, $config = NULL) {
if (!user_access('administer meta tags')) {
return FALSE;
}
if ($op == 'enable') {
return !empty($config->disabled);
}
elseif ($op == 'disable') {
return empty($config->disabled);
}
elseif ($op == 'delete') {
return $config->export_type & EXPORT_IN_DATABASE && !($config->export_type & EXPORT_IN_CODE);
}
elseif ($op == 'revert') {
return $config->export_type & EXPORT_IN_DATABASE && $config->export_type & EXPORT_IN_CODE;
}
return FALSE;
}