| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* The Pro Integrations |
| 5 |
*/ |
| 6 |
class WeForms_Pro_Integrations { |
| 7 |
|
| 8 |
/** |
| 9 |
* Initialize |
| 10 |
*/ |
| 11 |
function __construct() { |
| 12 |
|
| 13 |
if ( class_exists( 'WeForms_Pro' ) ) { |
| 14 |
return; |
| 15 |
} |
| 16 |
|
| 17 |
add_filter( 'weforms_form_builder_integrations', array( $this, 'register_integrations' ) ); |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* Register the pro integrations |
| 22 |
* |
| 23 |
* @param array $integrations |
| 24 |
* |
| 25 |
* @return array |
| 26 |
*/ |
| 27 |
public function register_integrations( $integrations ) { |
| 28 |
$pro = array( |
| 29 |
'mailchimp' => array( |
| 30 |
'id' => 'mailchimp', |
| 31 |
'title' => __( 'MailChimp', 'textdomain' ), |
| 32 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-mailchimp.png', |
| 33 |
'pro' => true, |
| 34 |
'settings' => array( |
| 35 |
'enabled' => false, |
| 36 |
'list' => '', |
| 37 |
'double' => false, |
| 38 |
'fields' => array( |
| 39 |
'email' => '', |
| 40 |
'first_name' => '', |
| 41 |
'last_name' => '' |
| 42 |
) |
| 43 |
) |
| 44 |
), |
| 45 |
'campaign-monitor' => array( |
| 46 |
'id' => 'campaign-monitor', |
| 47 |
'title' => __( 'Campaign Monitor', 'weforms' ), |
| 48 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-campaign-monitor.png', |
| 49 |
'pro' => true |
| 50 |
), |
| 51 |
'constant-contact' => array( |
| 52 |
'id' => 'constant-contact', |
| 53 |
'title' => __( 'Constant Contact', 'weforms' ), |
| 54 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-constant-contact.png', |
| 55 |
'pro' => true |
| 56 |
), |
| 57 |
'mailpoet' => array( |
| 58 |
'id' => 'mailpoet', |
| 59 |
'title' => __( 'MailPoet', 'weforms' ), |
| 60 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-mailpoet.png', |
| 61 |
'pro' => true |
| 62 |
), |
| 63 |
'aweber' => array( |
| 64 |
'id' => 'aweber', |
| 65 |
'title' => __( 'AWeber', 'weforms' ), |
| 66 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-aweber.png', |
| 67 |
'pro' => true |
| 68 |
), |
| 69 |
'getresponse' => array( |
| 70 |
'id' => 'getresponse', |
| 71 |
'title' => __( 'Get Response', 'weforms' ), |
| 72 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-getresponse.png', |
| 73 |
'pro' => true |
| 74 |
), |
| 75 |
'convertkit' => array( |
| 76 |
'id' => 'convertkit', |
| 77 |
'title' => __( 'ConvertKit', 'weforms' ), |
| 78 |
'icon' => WEFORMS_ASSET_URI . '/images/icon-convertkit.png', |
| 79 |
'pro' => true |
| 80 |
), |
| 81 |
); |
| 82 |
|
| 83 |
return array_merge( $integrations, $pro ); |
| 84 |
} |
| 85 |
} |
| 86 |
|