From 1fed2bf2600e75272d9cbc0090f4853459457966 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 15 Feb 2010 22:11:21 +0000 Subject: #713794 by Rob Loach: Fixed hook_ajax_render_alter() is undocumented. --- modules/system/system.api.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/system/system.api.php') diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 644f16b2a..5162b69c7 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -612,6 +612,18 @@ function hook_css_alter(&$css) { unset($css[drupal_get_path('module', 'system') . '/defaults.css']); } +/** + * Alter the commands that are sent to the user through the AJAX framework. + * + * @param $commands + * An array of all commands that will be sent to the user. + * @see ajax_render() + */ +function hook_ajax_render_alter($commands) { + // Inject any new status messages into the content area. + $commands[] = ajax_command_prepend('#block-system-main .content', theme('status_messages')); +} + /** * Add elements to a page before it is rendered. * -- cgit v1.2.3