Automator_Functions::get_trigger_data( $recipe_id, $trigger_id )
Added this function to directly fetch trigger data instead of looping thru recipe and it’s triggers for parsing. Specially needed for multi-trigger parsing
Contents
Parameters Parameters
- $recipe_id
(Required)
- $trigger_id
(Required)
Return Return
(array|mixed)
Source Source
File: src/core/lib/class-automator-functions.php
public function get_trigger_data( $recipe_id = 0, $trigger_id = 0 ) { $recipe_data = $this->get_recipe_data( 'uo-trigger', $recipe_id ); if ( ! $recipe_data ) { return array(); } foreach ( $recipe_data as $trigger_data ) { if ( absint( $trigger_id ) !== absint( $trigger_data['ID'] ) ) { continue; } return $trigger_data; } return array(); }
Expand full source code Collapse full source code View on Github
Changelog Changelog
Version | Description |
---|---|
2.9 | Introduced. |