function popup_menu_block_form in Popup 8
Same name and namespace in other branches
- 7 modules/popup_menu/includes/popup_menu.util.inc \popup_menu_block_form()
- 7.x modules/popup_menu/includes/popup_menu.util.inc \popup_menu_block_form()
- 6.x modules/popup_menu/includes/popup_menu.util.inc \popup_menu_block_form()
1 call to popup_menu_block_form()
- popup_menu_block_configure in modules/
popup_menu/ popup_menu.module - Implementation of hook_block_configure
File
- modules/
popup_menu/ includes/ popup_menu.util.inc, line 9
Code
function popup_menu_block_form($delta) {
module_load_include('inc', 'popup_ui', 'includes/popup_ui.admin');
$settings = _popup_menu_settings();
$settings = isset($settings[$delta]) ? $settings[$delta] : _popup_menu_default_settings();
$format_options = array_keys(_popup_ui_formatter_settings());
array_unshift($format_options, 'Default');
$display_format_options = array_combine($format_options, $format_options);
$format = isset($settings['format']) ? $settings['format'] : 'Default';
$title_override = isset($settings['override-title']) ? $settings['override-title'] : '';
return array(
'popup-format' => array(
'#default_value' => $format,
'#title' => 'Display format',
'#type' => 'select',
'#options' => $display_format_options,
'#description' => t('Select the format in which to display popups. You may manage popup formats !here.', array(
'!here' => l('here', 'admin/config/user-interface/popup/formats'),
)),
'#weight' => -2,
),
'popup-override-title' => array(
'#default_value' => $title_override,
'#title' => 'Override menu title',
'#type' => 'textfield',
'#description' => t('Enter a title to use for the popup instead of the menu title.'),
'#weight' => -2,
),
);
}