-
Private Messages – Moving “Delete” button into “Actions” select list
By default the “Delete” operations will show as a buttonĀ on Privatemsg‘s message listing page. There is an “Actions” dropdown that includes actions to “mark as read” or “mark as unread” so why not include “delete” there?
Luckily the module developers included a hook to easily override the options. If you set the “button” property of the “delete” operation to FALSE it’ll render in the select list instead of as a button.
123456789/*** Implements hook_privatemsg_thread_operations_alter().*/function mymodule_privatemsg_thread_operations_alter(&$operations, $type) {// This will remove the delete button and will instead include "Delete" in the "Actions" dropdownif (isset($operations['delete'])) {$operations['delete']['button'] = FALSE;}}