function blocktheme_form_block_add_block_form_alter in Block Theme 7
Same name and namespace in other branches
- 6 blocktheme.module \blocktheme_form_block_add_block_form_alter()
Form for adding a new block.
File
- ./
blocktheme.module, line 130 - Provides a configuration option to select custom themes for blocks
Code
function blocktheme_form_block_add_block_form_alter(&$form, &$form_state) {
$options = blocktheme_get_blockthemes();
$form['settings']['#weight'] = -2;
$form['regions']['#weight'] = -1;
$form['custom_block_theme'] = array(
'#type' => 'fieldset',
'#title' => t('Block Theme'),
'#weight' => 0,
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['custom_block_theme']['blocktheme'] = array(
'#type' => 'select',
'#title' => t('Custom theme'),
'#options' => $options,
);
$form['custom_block_theme']['blocktheme_vars'] = array(
'#type' => 'textarea',
'#default_value' => '',
'#title' => t('Custom block variables'),
'#description' => t('Enter one entry per line, in the format: <em>variable_name|variable_content</em>.'),
'#wysiwyg' => FALSE,
);
$form['#submit'][] = 'blocktheme_save';
}