function webform_theme_registry_alter in Webform 8.5
Same name and namespace in other branches
- 6.x includes/webform.theme.inc \webform_theme_registry_alter()
Implements hook_theme_registry_alter().
File
- includes/
webform.theme.inc, line 222 - Theme hooks, preprocessor, and suggestions.
Code
function webform_theme_registry_alter(&$theme_registry) {
// Allow attributes to be defined for status messages so that #states
// can be added to messages.
// @see \Drupal\webform\Element\WebformMessage
if (!isset($theme_registry['status_messages']['variables']['attributes'])) {
$theme_registry['status_messages']['variables']['attributes'] = [];
}
}