function revision_all_add_disabled_option_explanation in Revision All 7.2
Adds an description to a form element explaining why it has been disabled.
Parameters
array $form_element The form element to add the explanation to.:
string $disabled_type The type of block that is disabling the form.: Should be either 'Content Type' or 'Node'.
1 call to revision_all_add_disabled_option_explanation()
- revision_all_form_alter in ./
revision_all.module - Implements hook_form_alter().
File
- ./
revision_all.module, line 226 - Permits configuring content revision settings from a central location. Also makes alterations to existing forms based on user specified settings.
Code
function revision_all_add_disabled_option_explanation(&$form_element, $disabled_type = 'Content Type') {
if (!isset($form_element['#description'])) {
$form_element['#description'] = '';
}
$form_element['#description'] .= '<p>' . t('"Create new revision" option disabled
by the "Prevent @disabled_type Revisioning Overrides" setting of
!revision_all.', array(
'@disabled_type' => $disabled_type,
'!revision_all' => l(t('Revision All'), 'admin/config/content/revision-all'),
)) . '</p>';
}