You are here

function _popup_ui_form_options in Popup 7

Same name and namespace in other branches
  1. 8 modules/popup_ui/includes/popup_ui.admin.inc \_popup_ui_form_options()
1 call to _popup_ui_form_options()
popup_ui_form_formatters in modules/popup_ui/includes/popup_ui.admin.inc

File

modules/popup_ui/includes/popup_ui.admin.inc, line 50

Code

function _popup_ui_form_options() {
  module_load_include('inc', 'popup', 'includes/popup.util');
  $effects = _popup_effects();
  $pop = array_pop($effects);
  $effect_names = array_keys($pop);
  $effect_options = array_combine($effect_names, array_map('_popup_key_to_title', $effect_names));
  $style_names = array_keys(_popup_styles());
  $style_options = array_combine($style_names, array_map('_popup_key_to_title', $style_names));
  array_unshift($style_options, t('Default'));
  $widths = range(100, 500, 50);
  return array(
    'position' => array(
      'top-left' => t('Top left'),
      'top-right' => t('Top right'),
      'bottom-right' => t('Bottom right'),
      'bottom-left' => t('Bottom left'),
    ),
    'effect' => $effect_options,
    'style' => $style_options,
    'opacity' => array(
      '1.0' => '1.0',
      '0.9' => 0.9,
      '0.8' => 0.8,
      '0.7' => 0.7,
      '0.6' => 0.6,
      '0.5' => 0.5,
      '0.4' => 0.4,
      '0.3' => 0.3,
      '0.2' => 0.2,
      '0.1' => 0.1,
    ),
    'width' => array_combine($widths, $widths),
  );
}