View source
<?php
function paranoia_form_alter($form_id, &$form) {
switch ($form_id) {
case 'user_admin_perm':
unset($form['permission']['use PHP for block visibility']);
unset($form['permission']['execute php code']);
foreach (element_children($form['checkboxes']) as $rid) {
unset($form['checkboxes'][$rid]['use PHP for block visibility']);
unset($form['checkboxes'][$rid]['#options']['use PHP for block visibility']);
unset($form['checkboxes'][$rid]['execute php code']);
unset($form['checkboxes'][$rid]['#options']['execute php code']);
}
break;
case 'filter_admin_format_form':
unset($form['filters']['filter/1']);
break;
case 'system_modules':
unset($form['name']['paranoia'], $form['version']['paranoia'], $form['description']['paranoia'], $form['throttle']['paranoia'], $form['throttle']['#options']['paranoia']);
$form['status']['paranoia'] = array(
'#type' => 'hidden',
'#value' => 1,
);
break;
case 'user_edit':
if (arg(1) == 1) {
unset($form['delete'], $form['account']['mail'], $form['account']['pass'], $form['account']['status']);
}
break;
case 'block_admin_configure':
unset($form['page_vis_settings']['visibility']['#options'][2]);
$form['page_vis_settings']['pages']['#description'] = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are <em>blog</em> for the blog page and <em>blog/*</em> for every personal blog. <em><front></em> is the front page.");
break;
}
}