You are here

function mmenu_get_default_options in Mobile sliding menu 7.3

Same name and namespace in other branches
  1. 8 mmenu.module \mmenu_get_default_options()
  2. 7 mmenu.module \mmenu_get_default_options()
  3. 7.2 mmenu.module \mmenu_get_default_options()

Gets default options of the mmenu.

Return value

array Default mmenu options.

1 call to mmenu_get_default_options()
mmenu_list in ./mmenu.module
Gets a list of available mmenus.

File

./mmenu.module, line 769
Primarily Drupal hooks and global API functions to manipulate mmenus.

Code

function mmenu_get_default_options() {

  // $logo = theme_get_setting('logo');
  $site_name = variable_get('site_name', t('Drupal'));
  return array(
    // Most of the extensions need to be enabled for the menu.
    // To enable an extension, add its name to the extensions option.
    'extensions' => array(
      'theme-dark',
      'effect-menu-slide',
    ),
    'effects' => array(
      'options' => array(
        'effect-menu-slide',
      ),
    ),
    // A map of the "navbar" options.
    'navbar' => array(
      // Whether or not to add a navbar above the panels.
      'add' => TRUE,
      // The title above the main panel.
      'title' => $site_name,
      // The type of link to set for the title.
      // Possible values: "parent", "anchor" or "none".
      'titlelink' => 'parent',
    ),
    // A map of the "onClick" options.
    'onClick' => array(
      // Whether or not the menu should close after clicking a link inside it.
      // The default value varies per link: true if the default behavior for
      // the clicked link is prevented, false otherwise.
      'close' => FALSE,
      // Whether or not to prevent the default behavior for the clicked link.
      // The default value varies per link: true if its href is equal to
      // or starts with a hash (#), false otherwise.
      'preventDefault' => FALSE,
      // Whether or not the clicked link should be visibly "selected".
      'setSelected' => TRUE,
    ),
    // Whether or not the submenus should come sliding in from the right.
    // If false, the submenus expand below their parent.
    'slidingSubmenus' => TRUE,
    // A map of the "counters" options.
    'counters' => array(
      // Whether or not to automatically append a counter
      // to each menu item that has a submenu.
      'add' => TRUE,
      // Whether or not to automatically count the number of items
      // in the submenu, updates when typing in the search field.
      'update' => TRUE,
    ),
    // A map of the "dragOpen" options.
    'dragOpen' => array(
      // Whether or not the menu should open when dragging the page.
      'open' => TRUE,
      // The node on which the user can drag to open the menu.
      // If omitted, the entire page is used.
      'pageNode' => "body",
      // The minimum amount of pixels to drag before actually opening the menu,
      // less than 50 is not advised.
      'threshold' => 100,
      // The maximum x-position to start dragging the page.For a menu with a
      // position set to "top" or "bottom", the default value is 50.
      'maxStartPos' => 50,
    ),
    // A map of the fixedElements options.
    'fixedElements' => array(),
    'navbars' => array(
      // A map of the footer options.
      array(
        // Whether or not to automatically append a fixed footer to the menu.
        'add' => TRUE,
        // The contents of the footer.
        // If omitted, the "title" option is used.
        'content' => array(
          '<div class="mm-title">' . t('Copyright') . ' ©' . date('Y') . '</div>',
        ),
        // The size of the navbar, will be multiplied by 40px.
        'height' => 1,
        // The position for the navbar. Possible values: "top" and "bottom".
        'position' => 'bottom',
      ),
    ),
    // Sets the default header and fooder navbar elements.
    'navbarElements' => array(
      'header' => array(
        // Whether or not to automatically append a fixed footer to the menu.
        'add' => 'yes',
        // The contents of the footer.
        // If omitted, the "title" option is used.
        'title' => $site_name,
        // The size of the navbar, will be multiplied by 40px.
        'height' => 1,
      ),
      'footer' => array(
        // Whether or not to automatically append a fixed footer to the menu.
        'add' => 'yes',
        // The contents of the footer.
        // If omitted, the "title" option is used.
        'title' => t('Copyright') . ' ©' . date('Y'),
        // The size of the navbar, will be multiplied by 40px.
        'height' => 1,
      ),
    ),
    // A map of the offCanvas options.
    'offCanvas' => array(
      // Whether or not to
      // Sets to false will disable the (default) offCanvas add-on and
      // results in an on-canvas menu.
      'enabled' => TRUE,
      // Whether or not the menu should be opened as a "modal".
      // Basically, this means the user has no default way of closing the menu.
      // You'll have to provide a close-button yourself.
      'blockUI' => TRUE,
      // Whether or not the page should inherit the background of the body
      // when the menu opens.
      'moveBackground' => TRUE,
      // The position of the menu relative to the page.
      // Possible values: "top", "right", "bottom" or "left".
      // Note: As of version 4.2 the values "top" and "bottom" will only
      // work in combination with zposition: "front".
      'position' => NULL,
      // The z-position of the menu relative to the page.
      // Possible values: "back", "front" or "next".
      'zposition' => 'back',
    ),
    // A map of the "search" options.
    'searchfield' => array(
      // Whether or not to automatically prepend a search field to the menu.
      'add' => TRUE,
      // Where to add the searchfield(s).
      // Possible values: "menu", "panels" and a valid jQuery selector.
      'addTo' => 'panels',
      // Whether or not to automatically search when typing.
      'search' => TRUE,
      // The placeholder text in the search field.
      'placeholder' => t('Search'),
      // The text to show when no results are found.
      // If false no message will be shown.
      'noResults' => t('No results found.'),
      // Whether or not to show its sub-panels if a list item matches the search.
      'showSubPanels' => TRUE,
      // Whether or not to show list items without an anchor (an A element) in
      // the results.
      // If true, list items with a SPAN elements will also be shown.
      'showTextItems' => FALSE,
    ),
    // A map of the toggles options.
    'toggles' => array(),
  );
}