From 77a6690f184df3e30276a1b2df275dbf69d6df61 Mon Sep 17 00:00:00 2001
From: wonder95 <killshot91@gmail.com>
Date: Mon, 16 Jan 2012 17:02:36 -0800
Subject: [PATCH] Adding hook_drupal_alter() implementation to workflow_actions.module to allow user to assign node_publish action to each transition at admin/structure/trigger/workflow/%d.

---
 workflow_actions/workflow_actions.module |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/workflow_actions/workflow_actions.module b/workflow_actions/workflow_actions.module
index d0629c9..d8057cf 100644
--- a/workflow_actions/workflow_actions.module
+++ b/workflow_actions/workflow_actions.module
@@ -341,4 +341,16 @@ function workflow_actions_get_actions_by_tid($tid) {
     }
   }
   return $aids;
+}
+
+/**
+ * Implementation of hook_drupal_alter().
+ * Add the workflow transitions as a trigger to the
+ * publish_node action.
+ */
+function workflow_actions_action_info_alter(&$info) {
+  $transitions = workflow_actions_trigger_info();
+  foreach ($transitionss['workflow'] as $transition => $data) {
+    $info['node_publish_action']['triggers'][] = $transition;
+  }
 }
\ No newline at end of file
-- 
1.7.4.1

