PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / frm-form-actions / default_actions.php

default_actions.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.32.1, at classes/views/frm-form-actions/default_actions.php

263 lines 8.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 /**
7 * Add post action.
8 */
9 class FrmDefPostAction extends FrmFormAction {
10 public function __construct() {
11 $action_ops = FrmFormAction::default_action_opts( 'frm_wordpress_icon frm_show_upgrade' );
12 $action_ops['color'] = '#3177C7';
13
14 parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops );
15 }
16 }
17
18 /**
19 * Add register action.
20 */
21 class FrmDefRegAction extends FrmFormAction {
22 public function __construct() {
23 $action_ops = FrmFormAction::default_action_opts( 'frm_register_icon frm_show_upgrade' );
24 $action_ops['plugin'] = 'registration';
25 $action_ops['color'] = '#e22a6e';
26 parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops );
27 }
28 }
29
30 /**
31 * Add paypal action.
32 */
33 class FrmPayPalLiteAction extends FrmFormAction {
34 public function __construct() {
35 $action_ops = array(
36 'classes' => 'frmfont frm_paypal_icon',
37 'color' => 'var(--primary-700)',
38 );
39
40 parent::__construct( 'paypal', 'PayPal', $action_ops );
41 }
42 }
43
44 /**
45 * Add paypal legacy action.
46 */
47 if ( class_exists( 'FrmPaymentAction' ) ) {
48 class FrmDefPayPalLegacyAction extends FrmPaymentAction {
49 public function __construct() {
50 parent::__construct();
51
52 $this->id_base = 'paypal-legacy';
53 $this->name = 'PayPal (Legacy)';
54
55 // FrmPaymentAction sets option_name to 'frm_paypal_action' using its 'paypal'
56 // id_base. Recompute it from the new id_base so this action does not share the
57 // POST data namespace with the PayPal add-on's 'paypal' action, which would make
58 // both action controls save the same submission and create a duplicate action.
59 $this->option_name = 'frm_' . $this->id_base . '_action';
60
61 $this->action_options['is_beta'] = false;
62 }
63 }
64 }
65
66 class FrmStripeLiteAction extends FrmFormAction {
67 public function __construct() {
68 $action_ops = array(
69 'classes' => 'frmfont frm_stripe_icon',
70 'color' => '#635bff',
71 );
72
73 parent::__construct( 'stripe', 'Stripe', $action_ops );
74 }
75 }
76
77 class FrmSquareAction extends FrmFormAction {
78 public function __construct() {
79 $action_ops = array(
80 'classes' => 'frmfont frm_square_icon',
81 'color' => '#000',
82 );
83
84 parent::__construct( 'square', 'Square', $action_ops );
85 }
86 }
87
88 /**
89 * Add quiz action.
90 */
91 class FrmDefQuizAction extends FrmFormAction {
92 public function __construct() {
93 $action_ops = FrmFormAction::default_action_opts( 'frm_quiz_icon frm_show_upgrade' );
94 $action_ops['plugin'] = 'quizzes';
95 $action_ops['color'] = '#f15a24';
96 parent::__construct( 'quiz', __( 'Scored Quiz', 'formidable' ), $action_ops );
97 }
98 }
99
100 /**
101 * Add quiz outcome action.
102 */
103 class FrmDefQuizOutcomeAction extends FrmFormAction {
104 public function __construct() {
105 $action_ops = FrmFormAction::default_action_opts( 'frm_quiz_outcome_icon frm_show_upgrade' );
106 $action_ops['plugin'] = 'quizzes';
107 $action_ops['color'] = '#8d35f5';
108 parent::__construct( 'quiz_outcome', __( 'Quiz Outcome', 'formidable' ), $action_ops );
109 }
110 }
111
112 /**
113 * Add aweber action.
114 */
115 class FrmDefAweberAction extends FrmFormAction {
116 public function __construct() {
117 $action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon frm_show_upgrade' );
118 $action_ops['color'] = '#246BE8';
119 parent::__construct( 'aweber', 'AWeber', $action_ops );
120 }
121 }
122
123 /**
124 * Add mailchimp action.
125 */
126 class FrmDefMlcmpAction extends FrmFormAction {
127 public function __construct() {
128 $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade' );
129 $action_ops['color'] = '#000';
130
131 parent::__construct( 'mailchimp', 'Mailchimp', $action_ops );
132 }
133 }
134
135 /**
136 * Add zapier action.
137 */
138 class FrmDefZapierAction extends FrmFormAction {
139 public function __construct() {
140 $action_ops = FrmFormAction::default_action_opts( 'frm_zapier_icon frm_show_upgrade' );
141 $action_ops['color'] = '#FF4A00';
142 parent::__construct( 'zapier', 'Zapier', $action_ops );
143 }
144 }
145
146 /**
147 * Add n8n action.
148 */
149 class FrmDefN8NAction extends FrmFormAction {
150 public function __construct() {
151 $action_ops = FrmFormAction::default_action_opts( 'frm_n8n_icon frm_show_upgrade' );
152 $action_ops['color'] = '#EA4B71';
153 $action_ops['is_new'] = true;
154 parent::__construct( 'n8n', 'n8n', $action_ops );
155 }
156 }
157
158 /**
159 * Add twilio action.
160 */
161 class FrmDefTwilioAction extends FrmFormAction {
162 public function __construct() {
163 $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' );
164 $action_ops['color'] = '#F12E45';
165 parent::__construct( 'twilio', __( 'Twilio SMS', 'formidable' ), $action_ops );
166 }
167 }
168
169 class FrmDefActiveCampaignAction extends FrmFormAction {
170 public function __construct() {
171 $action_ops = FrmFormAction::default_action_opts( 'frm_activecampaign_icon frm_show_upgrade' );
172 $action_ops['color'] = '#004CFF';
173 parent::__construct( 'activecampaign', 'ActiveCampaign', $action_ops );
174 }
175 }
176
177 class FrmDefSalesforceAction extends FrmFormAction {
178 public function __construct() {
179 $action_ops = FrmFormAction::default_action_opts( 'frm_salesforcealt_icon frm_show_upgrade' );
180 $action_ops['color'] = '#00A1E0';
181 parent::__construct( 'salesforce', 'Salesforce', $action_ops );
182 }
183 }
184
185 class FrmDefConstContactAction extends FrmFormAction {
186 public function __construct() {
187 $action_ops = FrmFormAction::default_action_opts( 'frm_constant_contact_icon frm_show_upgrade' );
188 $action_ops['color'] = '#1856ED';
189 parent::__construct( 'constantcontact', 'Constant Contact', $action_ops );
190 }
191 }
192
193 class FrmDefGetResponseAction extends FrmFormAction {
194 public function __construct() {
195 $action_ops = FrmFormAction::default_action_opts( 'frm_getresponse_icon frm_show_upgrade' );
196 $action_ops['color'] = '#00A2FF';
197 parent::__construct( 'getresponse', 'GetResponse', $action_ops );
198 }
199 }
200
201 class FrmDefHubspotAction extends FrmFormAction {
202 public function __construct() {
203 $action_ops = FrmFormAction::default_action_opts( 'frm_hubspot_icon frm_show_upgrade' );
204 $action_ops['color'] = '#FF7A59';
205
206 $action_ops['message'] = '';
207
208 if ( ! FrmAppHelper::pro_is_installed() ) {
209 $action_ops['message'] .= __( 'The HubSpot integration is not available on your plan. Did you know you can upgrade to unlock more awesome features?', 'formidable' ) . '<br/><br/>';
210 }
211
212 $link = FrmAppHelper::admin_upgrade_link( 'add-action', 'go/hubspot-signup' );
213 $action_ops['message'] .= '<a href="' . esc_url( $link ) . '" target="_blank" rel="noopener" class="button button-secondary frm-button-secondary">Get Free HubSpot Account</a>';
214 parent::__construct( 'hubspot', 'Hubspot', $action_ops );
215 }
216 }
217
218 class FrmDefMailpoetAction extends FrmFormAction {
219 public function __construct() {
220 $action_ops = FrmFormAction::default_action_opts( 'frm_mailpoet_icon frm_show_upgrade' );
221 $action_ops['color'] = '#FE5301';
222 parent::__construct( 'mailpoet', 'MailPoet', $action_ops );
223 }
224 }
225
226 class FrmDefApiAction extends FrmFormAction {
227 public function __construct() {
228 $action_ops = FrmFormAction::default_action_opts( 'frm_feed_icon frm_show_upgrade' );
229 $action_ops['color'] = '#0193d7';
230 parent::__construct( 'api', __( 'Send API data', 'formidable' ), $action_ops );
231 }
232 }
233
234 /**
235 * Add google sheets.
236 */
237 class FrmDefGoogleSpreadsheetAction extends FrmFormAction {
238 public function __construct() {
239 $action_ops = FrmFormAction::default_action_opts( 'frm_googlesheets_icon frm_show_upgrade' );
240 $action_ops['color'] = '#0F9D58';
241 parent::__construct( 'googlespreadsheet', __( 'Google Sheets', 'formidable' ), $action_ops );
242 }
243 }
244
245 class FrmDefHrsAction extends FrmFormAction {
246 public function __construct() {
247 _deprecated_function( __METHOD__, '6.5' );
248
249 $action_ops = FrmFormAction::default_action_opts( 'frm_stripe_icon frm_credit_card_alt_icon frm_show_upgrade' );
250 $action_ops['color'] = 'var(--green)';
251 $action_ops['plugin'] = 'stripe';
252 parent::__construct( 'payment', __( 'eCommerce', 'formidable' ), $action_ops );
253 }
254 }
255
256 class FrmDefConvertKitAction extends FrmFormAction {
257 public function __construct() {
258 $action_ops = FrmFormAction::default_action_opts( 'frm_convertkit_icon frm_show_upgrade' );
259 $action_ops['color'] = '#1E1E1E';
260 parent::__construct( 'convertkit', 'Kit', $action_ops );
261 }
262 }
263