| 1 |
<?php |
| 2 |
/** |
| 3 |
* Workflow Triggers |
| 4 |
* |
| 5 |
* @package WPbot_Automator |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace WPbot_Automator\Triggers; |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
exit; |
| 12 |
} |
| 13 |
|
| 14 |
/** |
| 15 |
* Class Workflow_Triggers |
| 16 |
*/ |
| 17 |
class Workflow_Triggers extends Trigger { |
| 18 |
|
| 19 |
/** |
| 20 |
* Constructor |
| 21 |
*/ |
| 22 |
public function __construct() { |
| 23 |
$this->id = 'workflow'; |
| 24 |
$this->group = __( 'Workflows', 'wpbot-automator' ); |
| 25 |
} |
| 26 |
|
| 27 |
/** |
| 28 |
* Get available sub-triggers |
| 29 |
*/ |
| 30 |
public static function get_sub_triggers() { |
| 31 |
return array( |
| 32 |
'sub_workflow_trigger' => array( |
| 33 |
'title' => __( 'Sub-Workflow Trigger', 'wpbot-automator' ), |
| 34 |
'description' => __( 'Triggered when called from another workflow.', 'wpbot-automator' ), |
| 35 |
), |
| 36 |
); |
| 37 |
} |
| 38 |
|
| 39 |
/** |
| 40 |
* Register the triggers |
| 41 |
*/ |
| 42 |
public function register() { |
| 43 |
// No direct registration needed as it's called manually by Call_Sub_Workflow action. |
| 44 |
} |
| 45 |
} |
| 46 |
|