function floating_block_admin in Floating block 7
Same name and namespace in other branches
- 6 floating_block.admin.inc \floating_block_admin()
Form to config floating block settings.
1 string reference to 'floating_block_admin'
- floating_block_menu in ./
floating_block.module - Implements hook_menu().
File
- ./
floating_block.admin.inc, line 11 - Admin page callbacks for the floating_block module.
Code
function floating_block_admin() {
$form = array();
$form['floating_blocks'] = array(
'#type' => 'textarea',
'#title' => t('Floating block settings'),
'#default_value' => _floating_block_admin_convert_array_to_text(variable_get('floating_blocks', array())),
'#description' => t('Floating block configurations, one per line in the formation <code>[css selector]|[extra settings]</code>.'),
);
$form['floating_block_min_width'] = array(
'#type' => 'textfield',
'#title' => t('Disable floating blocks for screens under this width'),
'#description' => t('Use any value that could be used in a !code min-width query, for example, %example. Set to 0 to leave floating blocks enabled for all screen sizes.', array(
'!code' => '<code>window.mediaMatch</code>',
'%example' => '850px',
)),
'#default_value' => variable_get('floating_block_min_width', 0),
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}