You are here

function _theme_disable_messages_status_messages in Disable Messages 7

Same name and namespace in other branches
  1. 6 disable_messages.module \_theme_disable_messages_status_messages()

Implementation of theme_status_messages().

Call a hook to override the core status message output.

1 string reference to '_theme_disable_messages_status_messages'
disable_messages_theme_registry_alter in ./disable_messages.module
Implements hook_theme_registry_alter().

File

./disable_messages.module, line 107
The disable_messages module file.

Code

function _theme_disable_messages_status_messages($variables) {
  $display = $variables['display'];

  // Retrieve messages.
  $messages = drupal_get_messages($display);

  // Filter messages if filtering is enabled.
  if (variable_get('disable_messages_enable', '1')) {
    $messages = disable_messages_apply_filters($messages);
  }

  // Return themed status messages.
  return theme('disable_messages_status_messages', array(
    'messages' => $messages,
  ));
}