function livechat_preprocess_html in LiveChat 7
Implements hook_preprocess_HOOK().
File
- ./
livechat.module, line 80 - LiveChat module.
Code
function livechat_preprocess_html(&$vars) {
// Don't do anything if LiveChat is not enabled.
if (!variable_get('livechat_enabled', TRUE)) {
return;
}
// Add the LiveChat script if the user has permission to use LiveChat, and
// LiveChat is configured to be visible on the current page.
if (user_access('use livechat', $GLOBALS['user']) && livechat_check_visibility()) {
livechat_add_js();
}
}