function themekey_set_debug_message in ThemeKey 7.2
Same name and namespace in other branches
- 6.4 themekey.module \themekey_set_debug_message()
- 6.2 themekey.module \themekey_set_debug_message()
- 6.3 themekey.module \themekey_set_debug_message()
- 7.3 themekey.module \themekey_set_debug_message()
- 7 themekey.module \themekey_set_debug_message()
Replacement for drupal_set_message() during ThemeKey's initialization. drupal_set_message() might inititialize the theme engine too early, which causes ThemeKey to not switch the theme.
themekey_set_debug_message() put the untranslated messages on a stack and hands them over to drupal_set_message() on demand.
This function simply wraps themekey_debug_set_debug_message() to avoid the need for module_exists('themekey_debug') calls all over the code.
Parameters
$msg: the message as string. If the message is 'flush' all messages stored on the stack will be printed using drupal_set_message()
$placeholder: associative array of string replacments for $msg @see t()
$translate: boolean, if set to TRUE $msg will be handled by t() when handed over to drupal_set_message()
10 calls to themekey_set_debug_message()
- themekey_check_theme_enabled in ./
themekey_base.inc - Checks if a theme is enabled and fires warning messages to the site's administrator
- themekey_compat_dummy2theme in ./
themekey_compat.module - This function implements the interface of a ThemeKey mapping function but doesn't set a ThemeKey property's value. It sets the Drupal static themekey_custom_theme which will cause ThemeKey to use this theme.
- themekey_custom_theme in ./
themekey.module - Implements hook_custom_theme().
- themekey_debug_form_node_form_alter in ./
themekey_debug.module - Implements hook_form_node_form_alter().
- themekey_debug_init in ./
themekey_debug.module - Implements hook_init().
File
- ./
themekey.module, line 244 - ThemeKey is designed as a generic theme-switching module.
Code
function themekey_set_debug_message($msg, $placeholder = array(), $translate = TRUE, $unshift = FALSE) {
if (module_exists('themekey_debug')) {
return themekey_debug_set_debug_message($msg, $placeholder, $translate, $unshift);
}
}