function devel_form_user_admin_permissions_alter in Devel 7
Same name and namespace in other branches
- 8.3 devel.module \devel_form_user_admin_permissions_alter()
- 8 devel.module \devel_form_user_admin_permissions_alter()
- 8.2 devel.module \devel_form_user_admin_permissions_alter()
- 4.x devel.module \devel_form_user_admin_permissions_alter()
Implements hook_form_alter().
Adds mouse-over hints on the Permissions page to display language-independent machine names and module base names.
File
- ./
devel.module, line 2262 - This module holds functions useful for Drupal development.
Code
function devel_form_user_admin_permissions_alter(&$form, &$form_state) {
if (user_access('access devel information') && variable_get('devel_raw_names', FALSE)) {
foreach ($form['permission'] as $perm => $data) {
if (is_numeric($perm)) {
$form['permission'][$perm]['#markup'] = '<span title="' . $form['permission'][$perm]['#id'] . '">' . $form['permission'][$perm]['#markup'] . '</span>';
}
else {
$form['permission'][$perm]['#markup'] = '<span title="' . check_plain($perm) . '">' . $form['permission'][$perm]['#markup'] . '</span>';
}
}
}
}