array( 'type' => 'comment', 'label' => t('Unpublish comment'), 'configurable' => FALSE, 'behavior' => array('changes_property'), 'triggers' => array('comment_presave', 'comment_insert', 'comment_update'), ), 'comment_unpublish_by_keyword_action' => array( 'type' => 'comment', 'label' => t('Unpublish comment containing keyword(s)'), 'configurable' => TRUE, 'behavior' => array('changes_property'), 'triggers' => array('comment_presave', 'comment_insert', 'comment_update'), ), 'comment_save_action' => array( 'type' => 'comment', 'label' => t('Save comment'), 'configurable' => FALSE, 'triggers' => array('comment_insert', 'comment_update'), ), ); } /** * Alters the actions declared by another module. * * Called by action_list() to allow modules to alter the return values from * implementations of hook_action_info(). * * @ingroup actions */ function hook_action_info_alter(&$actions) { $actions['node_unpublish_action']['label'] = t('Unpublish and remove from public view.'); } /** * Executes code after an action is deleted. * * @param $aid * The action ID. * * @ingroup actions */ function hook_action_delete($aid) { db_delete('actions_assignments') ->condition('aid', $aid) ->execute(); }