Skip to content
Snippets Groups Projects
Commit 1fed2bf2 authored by Angie Byron's avatar Angie Byron
Browse files

#713794 by Rob Loach: Fixed hook_ajax_render_alter() is undocumented.

parent e394441a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment