PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 6.0.3
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v6.0.3
6.0.3 6.0.2 6.0.1 6.0.0 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.7.9.2 5.7.9.1 5.7.8 5.7.9 5.7.6 5.7.7 5.7.5 5.7.4 5.7.3 5.7.2 5.7.1 trunk 5.6.0 5.6.1 All 34 releases
automatorwp / classes / automation-type.php

automation-type.php in AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI 6.0.3, at classes/automation-type.php

87 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Automation Type
4 *
5 * @package AutomatorWP\Classes\Automation_Type
6 * @author AutomatorWP <[email protected]>, Ruben Garcia <[email protected]>
7 * @since 1.0.0
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 class AutomatorWP_Automation_Type {
13
14 /**
15 * Integration
16 *
17 * @since 1.0.0
18 *
19 * @var string $integration
20 */
21 public $integration = '';
22
23 /**
24 * Type
25 *
26 * @since 1.0.0
27 *
28 * @var string $type
29 */
30 public $type = '';
31
32 /**
33 * Type
34 *
35 * @since 1.0.0
36 *
37 * @var array $args
38 */
39 public $args = array(
40 'image' => AUTOMATORWP_URL . 'assets/img/automatorwp-logo.svg',
41 'label' => '',
42 'desc' => '',
43 );
44
45 public function __construct() {
46
47 $this->hooks();
48
49 }
50
51 public function hooks() {
52
53 if ( ! did_action( 'automatorwp_init' ) ) {
54 // Default hook to register
55 add_action('automatorwp_init', array( $this, 'register' ) );
56 } else {
57 // Hook for triggers registered from the theme's functions
58 add_action( 'after_setup_theme', array( $this, 'register' ) );
59 }
60
61 // Register type
62 add_filter('automatorwp_automation_types', array( $this, 'register_type' ) );
63
64 }
65
66 /**
67 * Register the automation type
68 *
69 * @since 1.0.0
70 */
71 public function register() {
72 // Override
73 }
74
75 /**
76 * Register the action
77 *
78 * @since 1.0.0
79 */
80 public function register_type( $types ) {
81
82 $types[$this->type] = $this->args;
83
84 return $types;
85 }
86
87 }