function mmenu_get_default_options in Mobile sliding menu 7.2
Same name and namespace in other branches
- 8 mmenu.module \mmenu_get_default_options()
- 7.3 mmenu.module \mmenu_get_default_options()
- 7 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 579 - 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(
// A collection of space-separated classnames to add to both the menu
// and the HTML.
// You'll need this option when using the extensions.
'classes' => 'mm-basic',
// An array that contains effects classes.
'effects' => array(),
// A map of the "onClick" options.
'onClick' => array(
// Whether or not to block the user interface while loading the new page.
// The default value varies per link: false if the default behavior for
// the clicked link is prevented, true otherwise.
'blockUI' => FALSE,
// 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 buttonbars options.
'buttonbars' => array(),
// 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(),
// A map of the footer options.
'footer' => 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' => NULL,
// The text of the footer if the submenu has no footer text.
'title' => t('Copyright') . ' ©' . date('Y'),
// Whether or not to update the title with footer text from each submenu.
'update' => TRUE,
),
// A map of the header options.
'header' => array(
// Whether or not to automatically prepend a fixed header to the menu.
'add' => TRUE,
// The contents of the header.
// If omitted, the plugin will add a fully styled and functional header
// with a title, back- and next button.
'content' => NULL,
// The text above the mainmenu.
'title' => $site_name,
// Whether or not to automatically update the title, back- and
// next- button when opening submenus.
'update' => TRUE,
),
// A map of the "labels" options.
'labels' => array(
// Whether or not to collapse all subsequent list-items that have the
// class name specified in classNames.labels.collapsed
// in the configuration object.
'collapse' => FALSE,
),
// 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.
'modal' => FALSE,
// 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' => 'front',
),
// A map of the "search" options.
'searchfield' => array(
// Whether or not to automatically prepend a search field to the menu.
'add' => FALSE,
// Where to add the searchfield(s).
// Possible values: "menu", "panels" and a valid jQuery selector.
'addTo' => 'menu',
// Whether or not to automatically search when typing.
'search' => FALSE,
// 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 only show links (A elements) in the search results.
// If false, also SPAN elements will be shown.
// Defaults to true if the searchfield.addTo option is set to "menu",
// false otherwise.
'showLinksOnly' => TRUE,
),
// A map of the toggles options.
'toggles' => array(),
);
}