| 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-inverse frm_show_upgrade' ); |
| 12 |
$action_ops['color'] = 'rgb(0,160,210)'; |
| 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'] = 'var(--pink)'; |
| 26 |
parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops ); |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* Add paypal action. |
| 32 |
*/ |
| 33 |
class FrmDefPayPalAction extends FrmFormAction { |
| 34 |
public function __construct() { |
| 35 |
$action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon frm-inverse frm_show_upgrade' ); |
| 36 |
$action_ops['color'] = 'var(--primary-700)'; |
| 37 |
|
| 38 |
parent::__construct( 'paypal', 'PayPal', $action_ops ); |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* Add quiz action. |
| 44 |
*/ |
| 45 |
class FrmDefQuizAction extends FrmFormAction { |
| 46 |
public function __construct() { |
| 47 |
$action_ops = FrmFormAction::default_action_opts( 'frm_percent_icon frm_quiz_icon frm_show_upgrade' ); |
| 48 |
$action_ops['plugin'] = 'quizzes'; |
| 49 |
parent::__construct( 'quiz', __( 'Scored Quiz', 'formidable' ), $action_ops ); |
| 50 |
} |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* Add quiz outcome action. |
| 55 |
*/ |
| 56 |
class FrmDefQuizOutcomeAction extends FrmFormAction { |
| 57 |
public function __construct() { |
| 58 |
$action_ops = FrmFormAction::default_action_opts( 'frm_check1_icon frm_quiz_icon frm_show_upgrade' ); |
| 59 |
$action_ops['plugin'] = 'quizzes'; |
| 60 |
parent::__construct( 'quiz_outcome', __( 'Quiz Outcome', 'formidable' ), $action_ops ); |
| 61 |
} |
| 62 |
} |
| 63 |
|
| 64 |
/** |
| 65 |
* Add aweber action. |
| 66 |
*/ |
| 67 |
class FrmDefAweberAction extends FrmFormAction { |
| 68 |
public function __construct() { |
| 69 |
$action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon frm_show_upgrade' ); |
| 70 |
$action_ops['color'] = 'var(--green)'; |
| 71 |
parent::__construct( 'aweber', 'AWeber', $action_ops ); |
| 72 |
} |
| 73 |
} |
| 74 |
|
| 75 |
/** |
| 76 |
* Add mailchimp action. |
| 77 |
*/ |
| 78 |
class FrmDefMlcmpAction extends FrmFormAction { |
| 79 |
public function __construct() { |
| 80 |
$action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade frm-inverse' ); |
| 81 |
$action_ops['color'] = 'var(--grey-700)'; |
| 82 |
|
| 83 |
parent::__construct( 'mailchimp', 'Mailchimp', $action_ops ); |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
/** |
| 88 |
* Add zapier action. |
| 89 |
*/ |
| 90 |
class FrmDefZapierAction extends FrmFormAction { |
| 91 |
public function __construct() { |
| 92 |
$action_ops = FrmFormAction::default_action_opts( 'frm_zapier_icon frm_show_upgrade' ); |
| 93 |
$action_ops['color'] = 'var(--orange)'; |
| 94 |
parent::__construct( 'zapier', 'Zapier', $action_ops ); |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
/** |
| 99 |
* Add twilio action. |
| 100 |
*/ |
| 101 |
class FrmDefTwilioAction extends FrmFormAction { |
| 102 |
public function __construct() { |
| 103 |
$action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' ); |
| 104 |
parent::__construct( 'twilio', __( 'Twilio SMS', 'formidable' ), $action_ops ); |
| 105 |
} |
| 106 |
} |
| 107 |
|
| 108 |
class FrmDefActiveCampaignAction extends FrmFormAction { |
| 109 |
public function __construct() { |
| 110 |
$action_ops = FrmFormAction::default_action_opts( 'frm_activecampaign_icon frm_show_upgrade' ); |
| 111 |
$action_ops['color'] = 'var(--primary-700)'; |
| 112 |
parent::__construct( 'activecampaign', 'ActiveCampaign', $action_ops ); |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
class FrmDefSalesforceAction extends FrmFormAction { |
| 117 |
public function __construct() { |
| 118 |
$action_ops = FrmFormAction::default_action_opts( 'frm_salesforce_icon frm-inverse frm_show_upgrade' ); |
| 119 |
$action_ops['color'] = 'var(--primary-500)'; |
| 120 |
parent::__construct( 'salesforce', 'Salesforce', $action_ops ); |
| 121 |
} |
| 122 |
} |
| 123 |
|
| 124 |
class FrmDefConstContactAction extends FrmFormAction { |
| 125 |
public function __construct() { |
| 126 |
$action_ops = FrmFormAction::default_action_opts( 'frm_constant_contact_icon frm_show_upgrade' ); |
| 127 |
$action_ops['color'] = 'rgb(0,160,210)'; |
| 128 |
parent::__construct( 'constantcontact', 'Constant Contact', $action_ops ); |
| 129 |
} |
| 130 |
} |
| 131 |
|
| 132 |
class FrmDefGetResponseAction extends FrmFormAction { |
| 133 |
public function __construct() { |
| 134 |
$action_ops = FrmFormAction::default_action_opts( 'frm_getresponse_icon frm_show_upgrade' ); |
| 135 |
$action_ops['color'] = '#00baff'; |
| 136 |
parent::__construct( 'getresponse', 'GetResponse', $action_ops ); |
| 137 |
} |
| 138 |
} |
| 139 |
|
| 140 |
class FrmDefHubspotAction extends FrmFormAction { |
| 141 |
public function __construct() { |
| 142 |
$action_ops = FrmFormAction::default_action_opts( 'frm_hubspot_icon frm_show_upgrade' ); |
| 143 |
$action_ops['color'] = 'var(--orange)'; |
| 144 |
|
| 145 |
$action_ops['message'] = ''; |
| 146 |
if ( ! FrmAppHelper::pro_is_installed() ) { |
| 147 |
$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/>'; |
| 148 |
} |
| 149 |
$link = FrmAppHelper::admin_upgrade_link( 'add-action', 'knowledgebase/hubspot-forms/' ); |
| 150 |
$action_ops['message'] .= '<a href="' . esc_url( $link ) . '" target="_blank" rel="noopener" class="button button-secondary frm-button-secondary">Get Free HubSpot Account</a>'; |
| 151 |
parent::__construct( 'hubspot', 'Hubspot', $action_ops ); |
| 152 |
} |
| 153 |
} |
| 154 |
|
| 155 |
class FrmDefMailpoetAction extends FrmFormAction { |
| 156 |
public function __construct() { |
| 157 |
$action_ops = FrmFormAction::default_action_opts( 'frm_mailpoet_icon frm_show_upgrade' ); |
| 158 |
$action_ops['color'] = 'var(--orange)'; |
| 159 |
parent::__construct( 'mailpoet', 'MailPoet', $action_ops ); |
| 160 |
} |
| 161 |
} |
| 162 |
|
| 163 |
class FrmDefApiAction extends FrmFormAction { |
| 164 |
public function __construct() { |
| 165 |
$action_ops = FrmFormAction::default_action_opts( 'frm_feed_icon frm_show_upgrade' ); |
| 166 |
$action_ops['color'] = 'var(--purple)'; |
| 167 |
parent::__construct( 'api', __( 'Send API data', 'formidable' ), $action_ops ); |
| 168 |
} |
| 169 |
} |
| 170 |
|
| 171 |
/** |
| 172 |
* Add google sheets. |
| 173 |
*/ |
| 174 |
class FrmDefGoogleSpreadsheetAction extends FrmFormAction { |
| 175 |
public function __construct() { |
| 176 |
$action_ops = FrmFormAction::default_action_opts( 'frm_googlesheets_icon frm_show_upgrade' ); |
| 177 |
$action_ops['color'] = 'var(--green)'; |
| 178 |
parent::__construct( 'googlespreadsheet', __( 'Google Sheets', 'formidable' ), $action_ops ); |
| 179 |
} |
| 180 |
} |
| 181 |
|
| 182 |
class FrmDefHrsAction extends FrmFormAction { |
| 183 |
public function __construct() { |
| 184 |
_deprecated_function( __METHOD__, '6.5' ); |
| 185 |
|
| 186 |
$action_ops = FrmFormAction::default_action_opts( 'frm_stripe_icon frm_credit_card_alt_icon frm_show_upgrade' ); |
| 187 |
$action_ops['color'] = 'var(--green)'; |
| 188 |
$action_ops['plugin'] = 'stripe'; |
| 189 |
parent::__construct( 'payment', __( 'eCommerce', 'formidable' ), $action_ops ); |
| 190 |
} |
| 191 |
} |
| 192 |
|
| 193 |
class FrmDefConvertKitAction extends FrmFormAction { |
| 194 |
public function __construct() { |
| 195 |
$action_ops = FrmFormAction::default_action_opts( 'frm_convertkit_icon frm-inverse frm_show_upgrade' ); |
| 196 |
$action_ops['color'] = 'rgb(68 177 255)'; |
| 197 |
parent::__construct( 'convertkit', 'Kit', $action_ops ); |
| 198 |
} |
| 199 |
} |
| 200 |
|