id; } /** * Get Trigger Title */ public function get_title() { return $this->title; } /** * Get Trigger Group */ public function get_group() { return $this->group; } /** * Register the trigger (hooks) */ abstract public function register(); /** * Process the trigger execution * * @param array $data Data passed from the hook. */ protected function run( $data = array() ) { // This will call the Workflow Engine to find and run matching workflows. $full_trigger_id = $this->id; if ( isset( $data['sub_id'] ) ) { $full_trigger_id .= ':' . $data['sub_id']; } \WPbot_Automator\Engine\Workflow_Runner::run_workflows_for_trigger( $full_trigger_id, $data['data'] ); } }