function purr_messages_status in Purr Messages 6.2
Same name and namespace in other branches
- 8.2 purr_messages.module \purr_messages_status()
- 6 purr_messages.module \purr_messages_status()
- 7.2 purr_messages.module \purr_messages_status()
- 7 purr_messages.module \purr_messages_status()
Checks to see whether the custom files exist.
Makes a check to the current theme's folder to see whether the purrcss folder and purr.css file exists. Also returns the correct path depending on where the function has been called from.
Parameters
$themelayer: (optional) Boolean determines where function has been called from.
Return value
A string containing the path to the custom css.
2 calls to purr_messages_status()
- purr_messages_settings in ./
purr_messages.admin.inc - Configuration settings page.
- purr_messages_status_messages in ./
purr_messages.module - Checks options and determines which type of message to return to the theme layer.
File
- ./
purr_messages.module, line 279 - Purr Messages A jQuery based override of Drupal's core message system
Code
function purr_messages_status($themelayer = FALSE) {
if ($themelayer == TRUE) {
// Called from theme function so path_to_theme returns incorrect result.
global $theme;
$custom_css = drupal_get_path('theme', $theme) . '/purrcss/purr.css';
}
else {
// Called from non theme function (admin).
$custom_css = path_to_theme() . '/purrcss/purr.css';
}
if (!is_file($custom_css)) {
return FALSE;
}
return $custom_css;
}