menu_execute_active_handler

Definition

menu_execute_active_handler($path = NULL)
includes/menu.inc, line 385

Description

Execute the page callback associated with the current path

Related topics

Namesort iconDescription
Menu systemDefine the navigation menus, and route page requests to code based on URLs.

Code

<?php
function menu_execute_active_handler($path = NULL) {
  if (_menu_site_is_offline()) {
    return MENU_SITE_OFFLINE;
  }
  if (variable_get('menu_rebuild_needed', FALSE)) {
    menu_rebuild();
  }
  if ($router_item = menu_get_item($path)) {
    registry_load_path_files();
    if ($router_item['access']) {
      if (drupal_function_exists($router_item['page_callback'])) {
        return call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);
      }
    }
    else {
      return MENU_ACCESS_DENIED;
    }
  }
  return MENU_NOT_FOUND;
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.