function commerce_message_filter_process_format in Commerce Message 7
Process callback for form elements that have a text format selector attached.
This callback runs after filter_process_format() and performs additional modifications to the form element.
Disable the Commerce Order Message format for all entity types other than message_type type.
See also
1 string reference to 'commerce_message_filter_process_format'
File
- ./
commerce_message.module, line 145
Code
function commerce_message_filter_process_format($element) {
if (isset($element['#entity_type']) && $element['#entity_type'] != 'message_type') {
$element['format']['format']['#options'] = array_diff_key($element['format']['format']['#options'], array(
'commerce_order_message' => 'commerce_order_message',
));
}
return $element;
}