function _shortcode_settings_form in Shortcode 7
Same name and namespace in other branches
- 6 shortcode.module \_shortcode_settings_form()
- 7.2 shortcode.module \_shortcode_settings_form()
Base form elements of the all shortcode options
1 call to _shortcode_settings_form()
- shortcode_filter in ./
shortcode.module - Implementation of hook_filter().
File
- ./
shortcode.module, line 144
Code
function _shortcode_settings_form($format) {
$form['shortcodes_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Shortcodes'),
'#collapsible' => TRUE,
);
$shortcodes = shortcode_list_all();
foreach ($shortcodes as $name => $item) {
$n = 'shortcode_enabled_' . $name . '_in_' . $format;
$form['shortcodes_settings'][$n] = array(
'#type' => 'checkbox',
'#title' => t('Enable %name shortcode', array(
'%name' => $name,
)),
'#default_value' => variable_get($n, 1),
'#description' => 'Enable or disable this shortcode in this input format',
);
}
return $form;
}