You are here

function popup_menu_block_form in Popup 6.x

Same name and namespace in other branches
  1. 8 modules/popup_menu/includes/popup_menu.util.inc \popup_menu_block_form()
  2. 7 modules/popup_menu/includes/popup_menu.util.inc \popup_menu_block_form()
  3. 7.x modules/popup_menu/includes/popup_menu.util.inc \popup_menu_block_form()
1 call to popup_menu_block_form()
popup_menu_block in modules/popup_menu/popup_menu.module
Implementation of hook_block

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 = $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);
  return array(
    'format' => array(
      '#default_value' => $settings['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/settings/popup/formats'),
      )),
      '#weight' => -2,
    ),
    'override-title' => array(
      '#default_value' => $settings['override-title'],
      '#title' => 'Override menu title',
      '#type' => 'textfield',
      '#description' => t('Enter a title to use for the popup instead of the menu title.'),
      '#weight' => -2,
    ),
  );
}