function contextual_custom_formatters_form_alter_alter in Custom Formatters 7.2
Implements hook_custom_formatters_form_alter_alter().
File
- includes/
contextual.inc, line 11 - Contextual links module integration.
Code
function contextual_custom_formatters_form_alter_alter(&$form, $form_state, $form_id) {
if ($form_id == 'custom_formatters_settings_form') {
$settings = variable_get('custom_formatters_settings', array(
'contextual' => 1,
));
$form['settings']['contextual'] = array(
'#type' => 'radios',
'#title' => t('Contextual links integration'),
'#default_value' => isset($settings['contextual']) ? $settings['contextual'] : 1,
'#options' => array(
0 => t('Disabled'),
1 => t('Enabled on all Formatters except those listed'),
2 => t('Enabled on only the listed Formatters'),
),
);
$form['settings']['contextual_list'] = array(
'#type' => 'textarea',
'#default_value' => isset($settings['contextual_list']) ? $settings['contextual_list'] : '',
'#description' => t('Specify Formatters by using their machine names. Enter one machine name per line.'),
'#states' => array(
'invisible' => array(
':input[name="settings[contextual]"]' => array(
'value' => 0,
),
),
),
);
}
}