function disable_message_pre_render_debug_output in Disable Messages 7
Same name and namespace in other branches
- 8 disable_messages.module \disable_message_pre_render_debug_output()
Pre render function to render the debug output into the page footer.
A separate pre-render function is required because the messages wouldn't yet be processed by the time page_alter is called.
1 string reference to 'disable_message_pre_render_debug_output'
- disable_messages_page_alter in ./
disable_messages.module - Implements hook_page_alter().
File
- ./
disable_messages.module, line 269 - The disable_messages module file.
Code
function disable_message_pre_render_debug_output(&$elements) {
$style = '';
if (variable_get('disable_messages_debug_visible_div', '0') == '0') {
$style = 'style="display:none;"';
}
$elements['#children'] = ' <div id="disable_messages-debug-div" ' . $style . '>
<pre>' . check_plain(var_export(disable_messages_cache_messages(), TRUE)) . '</pre>
</div>';
return $elements;
}