PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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 trunk, at classes/views/frm-form-actions/default_actions.php

261 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 }
62 }
63
64 class FrmStripeLiteAction extends FrmFormAction {
65 public function __construct() {
66 $action_ops = array(
67 'classes' => 'frmfont frm_stripe_icon',
68 'color' => '#635bff',
69 );
70
71 parent::__construct( 'stripe', 'Stripe', $action_ops );
72 }
73 }
74
75 class FrmSquareAction extends FrmFormAction {
76 public function __construct() {
77 $action_ops = array(
78 'classes' => 'frmfont frm_square_icon',
79 'color' => '#000',
80 );
81
82 parent::__construct( 'square', 'Square', $action_ops );
83 }
84 }
85
86 /**
87 * Add quiz action.
88 */
89 class FrmDefQuizAction extends FrmFormAction {
90 public function __construct() {
91 $action_ops = FrmFormAction::default_action_opts( 'frm_quiz_icon frm_show_upgrade' );
92 $action_ops['plugin'] = 'quizzes';
93 $action_ops['color'] = '#f15a24';
94 parent::__construct( 'quiz', __( 'Scored Quiz', 'formidable' ), $action_ops );
95 }
96 }
97
98 /**
99 * Add quiz outcome action.
100 */
101 class FrmDefQuizOutcomeAction extends FrmFormAction {
102 public function __construct() {
103 $action_ops = FrmFormAction::default_action_opts( 'frm_quiz_outcome_icon frm_show_upgrade' );
104 $action_ops['plugin'] = 'quizzes';
105 $action_ops['color'] = '#8d35f5';
106 parent::__construct( 'quiz_outcome', __( 'Quiz Outcome', 'formidable' ), $action_ops );
107 }
108 }
109
110 /**
111 * Add aweber action.
112 */
113 class FrmDefAweberAction extends FrmFormAction {
114 public function __construct() {
115 $action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon frm_show_upgrade' );
116 $action_ops['color'] = '#246BE8';
117 parent::__construct( 'aweber', 'AWeber', $action_ops );
118 }
119 }
120
121 /**
122 * Add mailchimp action.
123 */
124 class FrmDefMlcmpAction extends FrmFormAction {
125 public function __construct() {
126 $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade' );
127 $action_ops['color'] = '#000';
128
129 parent::__construct( 'mailchimp', 'Mailchimp', $action_ops );
130 }
131 }
132
133 /**
134 * Add zapier action.
135 */
136 class FrmDefZapierAction extends FrmFormAction {
137 public function __construct() {
138 $action_ops = FrmFormAction::default_action_opts( 'frm_zapier_icon frm_show_upgrade' );
139 $action_ops['color'] = '#FF4A00';
140 parent::__construct( 'zapier', 'Zapier', $action_ops );
141 }
142 }
143
144 /**
145 * Add n8n action.
146 */
147 class FrmDefN8NAction extends FrmFormAction {
148 public function __construct() {
149 $action_ops = FrmFormAction::default_action_opts( 'frm_n8n_icon frm_show_upgrade' );
150 $action_ops['color'] = '#EA4B71';
151 $action_ops['is_new'] = true;
152 parent::__construct( 'n8n', 'n8n', $action_ops );
153 }
154 }
155
156 /**
157 * Add twilio action.
158 */
159 class FrmDefTwilioAction extends FrmFormAction {
160 public function __construct() {
161 $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' );
162 $action_ops['color'] = '#F12E45';
163 parent::__construct( 'twilio', __( 'Twilio SMS', 'formidable' ), $action_ops );
164 }
165 }
166
167 class FrmDefActiveCampaignAction extends FrmFormAction {
168 public function __construct() {
169 $action_ops = FrmFormAction::default_action_opts( 'frm_activecampaign_icon frm_show_upgrade' );
170 $action_ops['color'] = '#004CFF';
171 parent::__construct( 'activecampaign', 'ActiveCampaign', $action_ops );
172 }
173 }
174
175 class FrmDefSalesforceAction extends FrmFormAction {
176 public function __construct() {
177 $action_ops = FrmFormAction::default_action_opts( 'frm_salesforcealt_icon frm_show_upgrade' );
178 $action_ops['color'] = '#00A1E0';
179 parent::__construct( 'salesforce', 'Salesforce', $action_ops );
180 }
181 }
182
183 class FrmDefConstContactAction extends FrmFormAction {
184 public function __construct() {
185 $action_ops = FrmFormAction::default_action_opts( 'frm_constant_contact_icon frm_show_upgrade' );
186 $action_ops['color'] = '#1856ED';
187 parent::__construct( 'constantcontact', 'Constant Contact', $action_ops );
188 }
189 }
190
191 class FrmDefGetResponseAction extends FrmFormAction {
192 public function __construct() {
193 $action_ops = FrmFormAction::default_action_opts( 'frm_getresponse_icon frm_show_upgrade' );
194 $action_ops['color'] = '#00A2FF';
195 parent::__construct( 'getresponse', 'GetResponse', $action_ops );
196 }
197 }
198
199 class FrmDefHubspotAction extends FrmFormAction {
200 public function __construct() {
201 $action_ops = FrmFormAction::default_action_opts( 'frm_hubspot_icon frm_show_upgrade' );
202 $action_ops['color'] = '#FF7A59';
203
204 $action_ops['message'] = '';
205
206 if ( ! FrmAppHelper::pro_is_installed() ) {
207 $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/>';
208 }
209
210 $link = FrmAppHelper::admin_upgrade_link( 'add-action', 'go/hubspot-signup' );
211 $action_ops['message'] .= '<a href="' . esc_url( $link ) . '" target="_blank" rel="noopener" class="button button-secondary frm-button-secondary">Get Free HubSpot Account</a>';
212 parent::__construct( 'hubspot', 'Hubspot', $action_ops );
213 }
214 }
215
216 class FrmDefMailpoetAction extends FrmFormAction {
217 public function __construct() {
218 $action_ops = FrmFormAction::default_action_opts( 'frm_mailpoet_icon frm_show_upgrade' );
219 $action_ops['color'] = '#FE5301';
220 parent::__construct( 'mailpoet', 'MailPoet', $action_ops );
221 }
222 }
223
224 class FrmDefApiAction extends FrmFormAction {
225 public function __construct() {
226 $action_ops = FrmFormAction::default_action_opts( 'frm_feed_icon frm_show_upgrade' );
227 $action_ops['color'] = '#0193d7';
228 parent::__construct( 'api', __( 'Send API data', 'formidable' ), $action_ops );
229 }
230 }
231
232 /**
233 * Add google sheets.
234 */
235 class FrmDefGoogleSpreadsheetAction extends FrmFormAction {
236 public function __construct() {
237 $action_ops = FrmFormAction::default_action_opts( 'frm_googlesheets_icon frm_show_upgrade' );
238 $action_ops['color'] = '#0F9D58';
239 parent::__construct( 'googlespreadsheet', __( 'Google Sheets', 'formidable' ), $action_ops );
240 }
241 }
242
243 class FrmDefHrsAction extends FrmFormAction {
244 public function __construct() {
245 _deprecated_function( __METHOD__, '6.5' );
246
247 $action_ops = FrmFormAction::default_action_opts( 'frm_stripe_icon frm_credit_card_alt_icon frm_show_upgrade' );
248 $action_ops['color'] = 'var(--green)';
249 $action_ops['plugin'] = 'stripe';
250 parent::__construct( 'payment', __( 'eCommerce', 'formidable' ), $action_ops );
251 }
252 }
253
254 class FrmDefConvertKitAction extends FrmFormAction {
255 public function __construct() {
256 $action_ops = FrmFormAction::default_action_opts( 'frm_convertkit_icon frm_show_upgrade' );
257 $action_ops['color'] = '#1E1E1E';
258 parent::__construct( 'convertkit', 'Kit', $action_ops );
259 }
260 }
261