function _emogrifier_available in Emogrifier 7.2
Same name and namespace in other branches
- 8 emogrifier.module \_emogrifier_available()
- 6 emogrifier.module \_emogrifier_available()
- 7 emogrifier.module \_emogrifier_available()
Returns TRUE if the Emogrifier class is available.
2 calls to _emogrifier_available()
- emogrifier_requirements in ./
emogrifier.install - Implements hook_requirements().
- _emogrifier_process in ./
emogrifier.module - Implements hook_filter_FILTER_process().
File
- ./
emogrifier.module, line 157 - This module uses the emogrifier class library as an input filter to convert stylesheet rules to inline style attributes. This ensures proper display on email and mobile device readers that lack stylesheet support.
Code
function _emogrifier_available() {
// Maybe something loaded the class without telling libraries API.
if (class_exists('\\Pelago\\Emogrifier')) {
return TRUE;
}
@(include_once libraries_get_path('emogrifier') . '/Classes/Emogrifier.php');
return class_exists('\\Pelago\\Emogrifier');
}