function themekey_debug_page_alter in ThemeKey 7.2
Same name and namespace in other branches
- 7.3 themekey_debug.module \themekey_debug_page_alter()
- 7 themekey_debug.module \themekey_debug_page_alter()
Implements hook_page_alter().
Prints out debug messages at the end of the page.
Return value
string
File
- ./
themekey_debug.module, line 168 - Provides a debug mode for module ThemeKey.
Code
function themekey_debug_page_alter(&$page) {
if ($messages = themekey_set_debug_message('flush')) {
$page['page_bottom']['themekey'] = array(
'#type' => 'markup',
'#markup' => $messages,
);
// Avoid caching of pages containing debug info in internal page cache
drupal_page_is_cacheable(FALSE);
// ... and external caches like varnish, boost, ...
drupal_add_http_header('Status', '503 Service unavailable');
}
}