You are here

function responsive_menus_mean_menu_style_settings in Responsive Menus 7

Form callback from hook_responsive_menus_style_info().

Return value

array Drupal FAPI formatted array.

1 string reference to 'responsive_menus_mean_menu_style_settings'
responsive_menus_responsive_menus_style_info in ./responsive_menus.module
Implements hook_responsive_menus_style_info().

File

./responsive_menus.module, line 565
Responsify menus in Drupal.

Code

function responsive_menus_mean_menu_style_settings() {
  $form['responsive_menus_mean_menu_css_selectors'] = array(
    '#type' => 'textfield',
    '#title' => t('CSS selectors for which menu to responsify'),
    '#default_value' => variable_get('responsive_menus_mean_menu_css_selectors', '#main-menu'),
    '#description' => t('Enter CSS/jQuery selector of menus to responsify.'),
  );
  $form['responsive_menus_mean_menu_container'] = array(
    '#type' => 'textfield',
    '#title' => t('CSS selector for where to attach the menu on the page'),
    '#default_value' => variable_get('responsive_menus_mean_menu_container', 'body'),
    '#description' => t('Enter CSS/jQuery selector of where MeanMenu gets attached.'),
  );
  $form['responsive_menus_mean_menu_trigger_txt'] = array(
    '#type' => 'textarea',
    '#title' => t('Text or HTML for trigger button'),
    '#default_value' => variable_get('responsive_menus_mean_menu_trigger_txt', '<span /><span /><span />'),
    '#description' => t('Default of 3 spans will show the triple bars (!bars).', array(
      '!bars' => '☰',
    )),
  );
  $form['responsive_menus_mean_menu_close_txt'] = array(
    '#type' => 'textarea',
    '#title' => t('Text or HTML for close button'),
    '#default_value' => variable_get('responsive_menus_mean_menu_close_txt', 'X'),
  );
  $form['responsive_menus_mean_menu_close_size'] = array(
    '#type' => 'textfield',
    '#title' => t('Size of close button'),
    '#size' => 5,
    '#default_value' => variable_get('responsive_menus_mean_menu_close_size', '18px'),
    '#description' => t('Size in px, em, %'),
  );
  $form['responsive_menus_mean_menu_position'] = array(
    '#type' => 'select',
    '#title' => t('Position of the open/close buttons'),
    '#options' => array(
      'right' => t('right'),
      'left' => t('left'),
      'center' => t('center'),
    ),
    '#default_value' => variable_get('responsive_menus_mean_menu_position', 'right'),
  );
  $form['responsive_menus_mean_menu_media_size'] = array(
    '#type' => 'textfield',
    '#title' => t('Screen width to respond to'),
    '#size' => 5,
    '#default_value' => variable_get('responsive_menus_mean_menu_media_size', 480),
    '#description' => t('Width in pixels when we swap out responsive menu e.g. 768'),
  );
  $form['responsive_menus_mean_menu_show_children'] = array(
    '#type' => 'select',
    '#title' => t('Allow multi-level menus'),
    '#options' => array(
      1 => t('Yes'),
      0 => t('No'),
    ),
    '#default_value' => variable_get('responsive_menus_mean_menu_show_children', 1),
  );
  $form['responsive_menus_mean_menu_expand_children'] = array(
    '#type' => 'select',
    '#title' => t('Ability to expand & collapse children'),
    '#options' => array(
      1 => t('Yes'),
      0 => t('No'),
    ),
    '#default_value' => variable_get('responsive_menus_mean_menu_expand_children', 1),
  );
  $form['responsive_menus_mean_menu_expand_txt'] = array(
    '#type' => 'textfield',
    '#title' => t('Text for the expand children button'),
    '#size' => 5,
    '#default_value' => variable_get('responsive_menus_mean_menu_expand_txt', '+'),
  );
  $form['responsive_menus_mean_menu_contract_txt'] = array(
    '#type' => 'textfield',
    '#title' => t('Text for the collapse children button'),
    '#size' => 5,
    '#default_value' => variable_get('responsive_menus_mean_menu_contract_txt', '-'),
  );
  $form['responsive_menus_mean_menu_remove_attrs'] = array(
    '#type' => 'select',
    '#title' => t('Temporarily remove other classes & IDs (Recommended)'),
    '#options' => array(
      1 => t('Yes'),
      0 => t('No'),
    ),
    '#default_value' => variable_get('responsive_menus_mean_menu_remove_attrs', 1),
    '#description' => t('This will help ensure the style of Mean Menus.'),
  );
  return $form;
}