You are here

function olark_suppress in Olark Chat 6

Implementation of hook_suppress()

Allows other modules to suppress display of Olark

This function should be called from within another module's page callback (preferably using module_invoke()) when the menu should not be displayed. This is useful for modules that implement popup pages or other special pages where the chat would be distracting or break the layout.

Parameters

$set: Defaults to TRUE. If called before hook_footer(), the chat will not be displayed. If FALSE is passed, the suppression state is returned.

1 call to olark_suppress()
olark_footer in ./olark.module
Implements hook_footer().

File

./olark.module, line 231
Integrates Olark Chat in a Drupal site.

Code

function olark_suppress($set = TRUE) {
  static $suppress = FALSE;
  if (!empty($set) && $suppress === FALSE) {
    $suppress = TRUE;
  }
  return $suppress;
}