| @@ -2,88 +2,165 @@ | ||
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 3 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -// add post action | |
| 6 | +/** | |
| 7 | + * Add post action. | |
| 8 | + */ | |
| 7 | 9 | class FrmDefPostAction extends FrmFormAction { |
| 8 | 10 | public function __construct() { |
| 9 | - $action_ops = FrmFormAction::default_action_opts( 'frm_wordpress_icon frm-inverse frm_show_upgrade' ); | |
| 10 | - $action_ops['color'] = 'rgb(0,160,210)'; | |
| 11 | + $action_ops = FrmFormAction::default_action_opts( 'frm_wordpress_icon frm_show_upgrade' ); | |
| 12 | + $action_ops['color'] = '#3177C7'; | |
| 11 | 13 | |
| 12 | 14 | parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops ); |
| 13 | 15 | } |
| 14 | 16 | } |
| 15 | 17 | |
| 16 | -// add register action | |
| 18 | +/** | |
| 19 | + * Add register action. | |
| 20 | + */ | |
| 17 | 21 | class FrmDefRegAction extends FrmFormAction { |
| 18 | 22 | public function __construct() { |
| 19 | 23 | $action_ops = FrmFormAction::default_action_opts( 'frm_register_icon frm_show_upgrade' ); |
| 20 | 24 | $action_ops['plugin'] = 'registration'; |
| 21 | - $action_ops['color'] = 'var(--pink)'; | |
| 25 | + $action_ops['color'] = '#e22a6e'; | |
| 22 | 26 | parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops ); |
| 23 | 27 | } |
| 24 | 28 | } |
| 25 | 29 | |
| 26 | -// add paypal action | |
| 27 | -class FrmDefPayPalAction extends FrmFormAction { | |
| 30 | +/** | |
| 31 | + * Add paypal action. | |
| 32 | + */ | |
| 33 | +class FrmPayPalLiteAction extends FrmFormAction { | |
| 28 | 34 | public function __construct() { |
| 29 | - $action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon frm-inverse frm_show_upgrade' ); | |
| 30 | - $action_ops['color'] = 'var(--primary-700)'; | |
| 35 | + $action_ops = array( | |
| 36 | + 'classes' => 'frmfont frm_paypal_icon', | |
| 37 | + 'color' => 'var(--primary-700)', | |
| 38 | + ); | |
| 31 | 39 | |
| 32 | 40 | parent::__construct( 'paypal', 'PayPal', $action_ops ); |
| 33 | 41 | } |
| 34 | 42 | } |
| 35 | 43 | |
| 36 | -// add quiz action | |
| 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 | + */ | |
| 37 | 89 | class FrmDefQuizAction extends FrmFormAction { |
| 38 | 90 | public function __construct() { |
| 39 | - $action_ops = FrmFormAction::default_action_opts( 'frm_percent_icon frm_quiz_icon frm_show_upgrade' ); | |
| 91 | + $action_ops = FrmFormAction::default_action_opts( 'frm_quiz_icon frm_show_upgrade' ); | |
| 40 | 92 | $action_ops['plugin'] = 'quizzes'; |
| 93 | + $action_ops['color'] = '#f15a24'; | |
| 41 | 94 | parent::__construct( 'quiz', __( 'Scored Quiz', 'formidable' ), $action_ops ); |
| 42 | 95 | } |
| 43 | 96 | } |
| 44 | 97 | |
| 45 | -// add quiz outcome action | |
| 98 | +/** | |
| 99 | + * Add quiz outcome action. | |
| 100 | + */ | |
| 46 | 101 | class FrmDefQuizOutcomeAction extends FrmFormAction { |
| 47 | 102 | public function __construct() { |
| 48 | - $action_ops = FrmFormAction::default_action_opts( 'frm_check1_icon frm_quiz_icon frm_show_upgrade' ); | |
| 103 | + $action_ops = FrmFormAction::default_action_opts( 'frm_quiz_outcome_icon frm_show_upgrade' ); | |
| 49 | 104 | $action_ops['plugin'] = 'quizzes'; |
| 105 | + $action_ops['color'] = '#8d35f5'; | |
| 50 | 106 | parent::__construct( 'quiz_outcome', __( 'Quiz Outcome', 'formidable' ), $action_ops ); |
| 51 | 107 | } |
| 52 | 108 | } |
| 53 | 109 | |
| 54 | -// add aweber action | |
| 110 | +/** | |
| 111 | + * Add aweber action. | |
| 112 | + */ | |
| 55 | 113 | class FrmDefAweberAction extends FrmFormAction { |
| 56 | 114 | public function __construct() { |
| 57 | 115 | $action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon frm_show_upgrade' ); |
| 58 | - $action_ops['color'] = 'var(--green)'; | |
| 116 | + $action_ops['color'] = '#246BE8'; | |
| 59 | 117 | parent::__construct( 'aweber', 'AWeber', $action_ops ); |
| 60 | 118 | } |
| 61 | 119 | } |
| 62 | 120 | |
| 63 | -// add mailchimp action | |
| 121 | +/** | |
| 122 | + * Add mailchimp action. | |
| 123 | + */ | |
| 64 | 124 | class FrmDefMlcmpAction extends FrmFormAction { |
| 65 | 125 | public function __construct() { |
| 66 | - $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade frm-inverse' ); | |
| 67 | - $action_ops['color'] = 'var(--grey-700)'; | |
| 126 | + $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade' ); | |
| 127 | + $action_ops['color'] = '#000'; | |
| 68 | 128 | |
| 69 | 129 | parent::__construct( 'mailchimp', 'Mailchimp', $action_ops ); |
| 70 | 130 | } |
| 71 | 131 | } |
| 72 | 132 | |
| 73 | -// add zapier action | |
| 133 | +/** | |
| 134 | + * Add zapier action. | |
| 135 | + */ | |
| 74 | 136 | class FrmDefZapierAction extends FrmFormAction { |
| 75 | 137 | public function __construct() { |
| 76 | 138 | $action_ops = FrmFormAction::default_action_opts( 'frm_zapier_icon frm_show_upgrade' ); |
| 77 | - $action_ops['color'] = 'var(--orange)'; | |
| 139 | + $action_ops['color'] = '#FF4A00'; | |
| 78 | 140 | parent::__construct( 'zapier', 'Zapier', $action_ops ); |
| 79 | 141 | } |
| 80 | 142 | } |
| 81 | 143 | |
| 82 | -// add twilio action | |
| 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 | + */ | |
| 83 | 159 | class FrmDefTwilioAction extends FrmFormAction { |
| 84 | 160 | public function __construct() { |
| 85 | - $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' ); | |
| 161 | + $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' ); | |
| 162 | + $action_ops['color'] = '#F12E45'; | |
| 86 | 163 | parent::__construct( 'twilio', __( 'Twilio SMS', 'formidable' ), $action_ops ); |
| 87 | 164 | } |
| 88 | 165 | } |
| 89 | 166 | |
| @@ -89,9 +166,9 @@ | ||
| 89 | 166 | |
| 90 | 167 | class FrmDefActiveCampaignAction extends FrmFormAction { |
| 91 | 168 | public function __construct() { |
| 92 | 169 | $action_ops = FrmFormAction::default_action_opts( 'frm_activecampaign_icon frm_show_upgrade' ); |
| 93 | - $action_ops['color'] = 'var(--primary-700)'; | |
| 170 | + $action_ops['color'] = '#004CFF'; | |
| 94 | 171 | parent::__construct( 'activecampaign', 'ActiveCampaign', $action_ops ); |
| 95 | 172 | } |
| 96 | 173 | } |
| 97 | 174 | |
| @@ -96,10 +173,10 @@ | ||
| 96 | 173 | } |
| 97 | 174 | |
| 98 | 175 | class FrmDefSalesforceAction extends FrmFormAction { |
| 99 | 176 | public function __construct() { |
| 100 | - $action_ops = FrmFormAction::default_action_opts( 'frm_salesforce_icon frm-inverse frm_show_upgrade' ); | |
| 101 | - $action_ops['color'] = 'var(--primary-500)'; | |
| 177 | + $action_ops = FrmFormAction::default_action_opts( 'frm_salesforcealt_icon frm_show_upgrade' ); | |
| 178 | + $action_ops['color'] = '#00A1E0'; | |
| 102 | 179 | parent::__construct( 'salesforce', 'Salesforce', $action_ops ); |
| 103 | 180 | } |
| 104 | 181 | } |
| 105 | 182 | |
| @@ -105,9 +182,9 @@ | ||
| 105 | 182 | |
| 106 | 183 | class FrmDefConstContactAction extends FrmFormAction { |
| 107 | 184 | public function __construct() { |
| 108 | 185 | $action_ops = FrmFormAction::default_action_opts( 'frm_constant_contact_icon frm_show_upgrade' ); |
| 109 | - $action_ops['color'] = 'rgb(0,160,210)'; | |
| 186 | + $action_ops['color'] = '#1856ED'; | |
| 110 | 187 | parent::__construct( 'constantcontact', 'Constant Contact', $action_ops ); |
| 111 | 188 | } |
| 112 | 189 | } |
| 113 | 190 | |
| @@ -113,9 +190,9 @@ | ||
| 113 | 190 | |
| 114 | 191 | class FrmDefGetResponseAction extends FrmFormAction { |
| 115 | 192 | public function __construct() { |
| 116 | 193 | $action_ops = FrmFormAction::default_action_opts( 'frm_getresponse_icon frm_show_upgrade' ); |
| 117 | - $action_ops['color'] = '#00baff'; | |
| 194 | + $action_ops['color'] = '#00A2FF'; | |
| 118 | 195 | parent::__construct( 'getresponse', 'GetResponse', $action_ops ); |
| 119 | 196 | } |
| 120 | 197 | } |
| 121 | 198 | |
| @@ -121,32 +198,26 @@ | ||
| 121 | 198 | |
| 122 | 199 | class FrmDefHubspotAction extends FrmFormAction { |
| 123 | 200 | public function __construct() { |
| 124 | 201 | $action_ops = FrmFormAction::default_action_opts( 'frm_hubspot_icon frm_show_upgrade' ); |
| 125 | - $action_ops['color'] = 'var(--orange)'; | |
| 202 | + $action_ops['color'] = '#FF7A59'; | |
| 126 | 203 | |
| 127 | 204 | $action_ops['message'] = ''; |
| 205 | + | |
| 128 | 206 | if ( ! FrmAppHelper::pro_is_installed() ) { |
| 129 | 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/>'; |
| 130 | 208 | } |
| 131 | - $link = FrmAppHelper::admin_upgrade_link( 'add-action', 'knowledgebase/hubspot-forms/' ); | |
| 209 | + | |
| 210 | + $link = FrmAppHelper::admin_upgrade_link( 'add-action', 'go/hubspot-signup' ); | |
| 132 | 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>'; |
| 133 | 212 | parent::__construct( 'hubspot', 'Hubspot', $action_ops ); |
| 134 | 213 | } |
| 135 | 214 | } |
| 136 | 215 | |
| 137 | -class FrmDefHighriseAction extends FrmFormAction { | |
| 138 | - public function __construct() { | |
| 139 | - $action_ops = FrmFormAction::default_action_opts( 'frm_building_icon frm_show_upgrade' ); | |
| 140 | - $action_ops['color'] = 'var(--purple)'; | |
| 141 | - parent::__construct( 'highrise', 'Highrise', $action_ops ); | |
| 142 | - } | |
| 143 | -} | |
| 144 | - | |
| 145 | 216 | class FrmDefMailpoetAction extends FrmFormAction { |
| 146 | 217 | public function __construct() { |
| 147 | 218 | $action_ops = FrmFormAction::default_action_opts( 'frm_mailpoet_icon frm_show_upgrade' ); |
| 148 | - $action_ops['color'] = 'var(--orange)'; | |
| 219 | + $action_ops['color'] = '#FE5301'; | |
| 149 | 220 | parent::__construct( 'mailpoet', 'MailPoet', $action_ops ); |
| 150 | 221 | } |
| 151 | 222 | } |
| 152 | 223 | |
| @@ -152,18 +223,20 @@ | ||
| 152 | 223 | |
| 153 | 224 | class FrmDefApiAction extends FrmFormAction { |
| 154 | 225 | public function __construct() { |
| 155 | 226 | $action_ops = FrmFormAction::default_action_opts( 'frm_feed_icon frm_show_upgrade' ); |
| 156 | - $action_ops['color'] = 'var(--purple)'; | |
| 227 | + $action_ops['color'] = '#0193d7'; | |
| 157 | 228 | parent::__construct( 'api', __( 'Send API data', 'formidable' ), $action_ops ); |
| 158 | 229 | } |
| 159 | 230 | } |
| 160 | 231 | |
| 161 | -// add google sheets | |
| 232 | +/** | |
| 233 | + * Add google sheets. | |
| 234 | + */ | |
| 162 | 235 | class FrmDefGoogleSpreadsheetAction extends FrmFormAction { |
| 163 | 236 | public function __construct() { |
| 164 | 237 | $action_ops = FrmFormAction::default_action_opts( 'frm_googlesheets_icon frm_show_upgrade' ); |
| 165 | - $action_ops['color'] = 'var(--green)'; | |
| 238 | + $action_ops['color'] = '#0F9D58'; | |
| 166 | 239 | parent::__construct( 'googlespreadsheet', __( 'Google Sheets', 'formidable' ), $action_ops ); |
| 167 | 240 | } |
| 168 | 241 | } |
| 169 | 242 | |
| @@ -168,12 +241,20 @@ | ||
| 168 | 241 | } |
| 169 | 242 | |
| 170 | 243 | class FrmDefHrsAction extends FrmFormAction { |
| 171 | 244 | public function __construct() { |
| 172 | - _deprecated_function( __METHOD__, 'x.x' ); | |
| 245 | + _deprecated_function( __METHOD__, '6.5' ); | |
| 173 | 246 | |
| 174 | 247 | $action_ops = FrmFormAction::default_action_opts( 'frm_stripe_icon frm_credit_card_alt_icon frm_show_upgrade' ); |
| 175 | 248 | $action_ops['color'] = 'var(--green)'; |
| 176 | 249 | $action_ops['plugin'] = 'stripe'; |
| 177 | 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 ); | |
| 178 | 259 | } |
| 179 | 260 | } |