You are here

function mmenu_check_enabled_callback in Mobile sliding menu 8

Same name and namespace in other branches
  1. 7.3 mmenu.module \mmenu_check_enabled_callback()
  2. 7.2 mmenu.module \mmenu_check_enabled_callback()

To check if enables the mmenu by the enabled callback functions.

Parameters

array $enabled_callback: An associative array of the enabled callback.

Return value

bool A boolean to determine to show or hide the mmenu.

1 call to mmenu_check_enabled_callback()
mmenu_display_access in ./mmenu.module
To check if enables the mmenu.

File

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

Code

function mmenu_check_enabled_callback(array $enabled_callback) {
  $flag = TRUE;
  if (isset($enabled_callback['php']) && count($enabled_callback['php']) > 0) {
    foreach ($enabled_callback['php'] as $callback) {
      if (!(function_exists($callback) && call_user_func($callback))) {
        $flag = FALSE;
        break;
      }
    }
  }
  return $flag;
}