You are here

function nicemessages_preprocess_page in Nice messages 7

Same name and namespace in other branches
  1. 8.2 nicemessages.module \nicemessages_preprocess_page()
  2. 7.2 nicemessages.module \nicemessages_preprocess_page()

Implements hook_preprocess_page().

File

./nicemessages.module, line 80
Nicemessages module

Code

function nicemessages_preprocess_page(&$vars) {
  if (nicemessages_are_enabled()) {
    if (nicemessages_pages_visibility() == FALSE) {
      return;
    }

    // Do not display messages in standard way,
    $vars['show_messages'] = false;

    // display them with jGrowl
    nicemessages_set_messages();
  }
}