function private_message_preprocess_field__private_message_thread__private_messages in Private Message 8
Same name and namespace in other branches
- 8.2 private_message.module \private_message_preprocess_field__private_message_thread__private_messages()
Implements hook_preprocess_field().
Adds a custom class to the field that can be targeted, as the default classes may be altered in themes/templates, and therefore should not be depended upon.
File
- ./
private_message.module, line 584 - Contains hooks for the private message module.
Code
function private_message_preprocess_field__private_message_thread__private_messages(&$vars) {
foreach (array_keys($vars['items']) as $index) {
$vars['items'][$index]['attributes']
->setAttribute('class', 'private-message-wrapper');
}
}