diff --git a/includes/common.inc b/includes/common.inc index ebc8c1c07abd0de2e7b289ee6763fe4741a3d3c5..fdd5f64d61d8dffdf1e77a2f0bb86aaf6dd38835 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2275,10 +2275,9 @@ function l($text, $path, array $options = array()) { * sends the content to the browser in the needed format. The default delivery * callback is drupal_deliver_html_page() which delivers the content as an HTML * page, complete with blocks in addition to the content. This default can be - * overridden on a per menu item basis by setting 'delivery callback' in - * hook_menu(), hook_menu_alter(). - * Additionally, modules may use hook_page_delivery_callback_alter() to specify - * a different delivery callback to use for the page request. + * overridden on a per menu router item basis by setting 'delivery callback' in + * hook_menu() or hook_menu_alter(), and can also be overridden on a per request + * basis in hook_page_delivery_callback_alter(). * * For example, the same page callback function can be used for an HTML * version of the page and an AJAX version of the page. The page callback @@ -2300,8 +2299,7 @@ function l($text, $path, array $options = array()) { * (Optional) If given, it is the name of a delivery function most likely * to be appropriate for the page request as determined by the calling * function (e.g., menu_execute_active_handler()). If not given, it is - * determined from the menu router information of the current page. In either - * case, modules have a final chance to alter which function is called. + * determined from the menu router information of the current page. * * @see menu_execute_active_handler() * @see hook_menu() @@ -2310,14 +2308,11 @@ function l($text, $path, array $options = array()) { */ function drupal_deliver_page($page_callback_result, $default_delivery_callback = NULL) { if (!isset($default_delivery_callback) && ($router_item = menu_get_item())) { - drupal_alter('menu_active_handler', $router_item); $default_delivery_callback = $router_item['delivery_callback']; } $delivery_callback = !empty($default_delivery_callback) ? $default_delivery_callback : 'drupal_deliver_html_page'; - // Give modules a final chance to alter the delivery callback used. This is - // for modules that need to decide which delivery callback to use based on - // information made available during page callback execution and for pages - // without router items. + // Give modules a chance to alter the delivery callback used, based on + // request-time context (e.g., HTTP request headers). drupal_alter('page_delivery_callback', $delivery_callback); if (function_exists($delivery_callback)) { $delivery_callback($page_callback_result); diff --git a/includes/menu.inc b/includes/menu.inc index 0c17e595322caea211c6ac7a49a915a48272a427..83cff5f4e5b7ec909f909e32707b7d2c3a02f51c 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -457,8 +457,6 @@ function menu_execute_active_handler($path = NULL, $deliver = TRUE) { menu_rebuild(); } if ($router_item = menu_get_item($path)) { - // hook_menu_alter() lets modules control menu router information that - // doesn't depend on the details of a particular page request. if ($router_item['access']) { if ($router_item['include_file']) { require_once DRUPAL_ROOT . '/' . $router_item['include_file']; diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 467d37fbef73e35148c51d7746cb5d65378c90b7..adbc224b94756daca230360e37b97d1cd80366a6 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -3524,8 +3524,7 @@ function hook_date_formats_alter(&$formats) { * information unrelated to the path of the page accessed. For example, * it can be used to set the delivery callback based on a HTTP request * header (as shown in the code sample). To specify a delivery callback - * based on path information, use hook_menu(), hook_menu_alter() or - * hook_page_delivery_callback_alter(). + * based on path information, use hook_menu() or hook_menu_alter(). * * This hook can also be used as an API function that can be used to explicitly * set the delivery callback from some other function. For example, for a module