Full ELMS Learning Network documentation
function theme_status_messages
×
Error message
User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).cis7 theme.inc | theme_status_messages($variables) |
cle7 theme.inc | theme_status_messages($variables) |
elmsmedia7 theme.inc | theme_status_messages($variables) |
icor7 theme.inc | theme_status_messages($variables) |
meedjum_blog7 theme.inc | theme_status_messages($variables) |
mooc7 theme.inc | theme_status_messages($variables) |
Returns HTML for status and/or error messages, grouped by type.
An invisible heading identifies the messages for assistive technology. Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html for info.
Parameters
$variables: An associative array containing:
- display: (optional) Set to 'status' or 'error' to display only messages of that type.
Related topics
18 theme calls to theme_status_messages()
- ajax_prepare_response in includes/
ajax.inc - Converts the return value of a page callback into an Ajax commands array.
- boxes_footer in sites/
all/ modules/ ulmus/ boxes/ boxes.module - Implements hook_footer().
- ctools_modal_form_render in sites/
all/ modules/ ulmus/ ctools/ includes/ modal.inc - Render a form into an AJAX display.
- ctools_page_messages_content_type_render in sites/
all/ modules/ ulmus/ ctools/ plugins/ content_types/ page/ page_messages.inc - Output function for the 'page_messages' content type.
- ds_ajax_add_field in sites/
all/ modules/ ulmus/ ds/ modules/ ds_ui/ includes/ ds.fields.inc - Handles ctools modal Add field
20 string references to the theme hook from theme_status_messages()
Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.
- ajax_prepare_response in includes/
ajax.inc - Converts the return value of a page callback into an Ajax commands array.
- boxes_footer in sites/
all/ modules/ ulmus/ boxes/ boxes.module - Implements hook_footer().
- ctools_modal_form_render in sites/
all/ modules/ ulmus/ ctools/ includes/ modal.inc - Render a form into an AJAX display.
- ctools_page_messages_content_type_render in sites/
all/ modules/ ulmus/ ctools/ plugins/ content_types/ page/ page_messages.inc - Output function for the 'page_messages' content type.
- drupal_common_theme in includes/
common.inc - Provides theme registration for themes across .inc files.
File
- includes/
theme.inc, line 1598 - The theme system, which controls the output of Drupal.
Code
function theme_status_messages($variables) {
$display = $variables['display'];
$output = '';
$status_heading = array(
'status' => t('Status message'),
'error' => t('Error message'),
'warning' => t('Warning message'),
);
foreach (drupal_get_messages($display) as $type => $messages) {
$output .= "<div class=\"messages $type\">\n";
if (!empty($status_heading[$type])) {
$output .= '<h2 class="element-invisible">' . $status_heading[$type] . "</h2>\n";
}
if (count($messages) > 1) {
$output .= " <ul>\n";
foreach ($messages as $message) {
$output .= ' <li>' . $message . "</li>\n";
}
$output .= " </ul>\n";
}
else {
$output .= $messages[0];
}
$output .= "</div>\n";
}
return $output;
}