function hook_mandrill_valid_attachment_types_alter in Mandrill 7.2
Same name and namespace in other branches
- 8 mandrill.api.php \hook_mandrill_valid_attachment_types_alter()
- 7 mandrill.api.php \hook_mandrill_valid_attachment_types_alter()
Allows other modules to alter the allowed attachment file types.
@array $types An array of file types indexed numerically.
1 function implements hook_mandrill_valid_attachment_types_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- mandrill_test_mandrill_valid_attachment_types_alter in modules/
mandrill_test/ mandrill_test.module - Implements hook_mandrill_valid_attachment_types_alter().
2 invocations of hook_mandrill_valid_attachment_types_alter()
- MandrillHooksTestCase::testValidAttachmentTypesAlterHook in tests/
mandrill_hooks.test - Tests implementing hook_mandrill_valid_attachment_types_alter().
- MandrillMailSystem::isValidContentType in lib/
mandrill.mail.inc - Helper to determine if an attachment is valid.
File
- ./
mandrill.api.php, line 31 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_mandrill_valid_attachment_types_alter(&$types) {
// Example, allow word docs:
$types[] = 'application/msword';
// Allow openoffice docs:
$types[] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
}