function mmenu_display_access in Mobile sliding menu 7.3
Same name and namespace in other branches
- 8 mmenu.module \mmenu_display_access()
- 7.2 mmenu.module \mmenu_display_access()
To check if enables the mmenu.
First to check the value of enabled variable.
Second to check the enabled_callback only if the enabled is set to TRUE.
Parameters
array $mmenu: An associative array of the mmenu.
Return value
bool A boolean to determine to show or hide the mmenu.
1 call to mmenu_display_access()
- mmenu_page_build in ./
mmenu.module - Implements hook_page_build().
File
- ./
mmenu.module, line 1419 - Primarily Drupal hooks and global API functions to manipulate mmenus.
Code
function mmenu_display_access(array $mmenu) {
$flag = FALSE;
if (isset($mmenu['enabled'])) {
// The enabled flag will be higher priority then the enabled_callback flag.
if (!$mmenu['enabled']) {
return FALSE;
}
else {
if (isset($mmenu['enabled_callback'])) {
return mmenu_check_enabled_callback($mmenu['enabled_callback']);
}
else {
$flag = TRUE;
}
}
}
return $flag;
}