| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: FormsCRM |
| 4 |
* Plugin URI: https://close.technology/wordpress-plugins/formscrm/ |
| 5 |
* Description: Connects Forms with CRM, ERP and Email Marketing. |
| 6 |
* Version: 4.0.4 |
| 7 |
* Author: CloseTechnology |
| 8 |
* Author URI: https://close.technology |
| 9 |
* Text Domain: formscrm |
| 10 |
* Domain Path: /languages |
| 11 |
* License: GPL-2.0+ |
| 12 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 13 |
* |
| 14 |
* @package WordPress |
| 15 |
* @author CloseTechnology |
| 16 |
* @copyright 2024 CloseTechnology |
| 17 |
* @license GPL-2.0+ |
| 18 |
* |
| 19 |
* @wordpress-plugin |
| 20 |
* |
| 21 |
* Prefix: fcrm |
| 22 |
*/ |
| 23 |
|
| 24 |
defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); |
| 25 |
|
| 26 |
define( 'FORMSCRM_VERSION', '4.0.4' ); |
| 27 |
define( 'FORMSCRM_PLUGIN', __FILE__ ); |
| 28 |
define( 'FORMSCRM_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); |
| 29 |
define( 'FORMSCRM_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); |
| 30 |
define( 'FORMSCRM_CRED_VARIABLES', array( 'url', 'username', 'password', 'apipassword', 'odoodb', 'apisales' ) ); |
| 31 |
|
| 32 |
add_filter( |
| 33 |
'formscrm_choices', |
| 34 |
function ( $choices ) { |
| 35 |
$choices[] = array( |
| 36 |
'label' => 'Holded', |
| 37 |
'value' => 'holded', |
| 38 |
); |
| 39 |
|
| 40 |
$choices[] = array( |
| 41 |
'label' => 'Clientify', |
| 42 |
'value' => 'clientify', |
| 43 |
); |
| 44 |
|
| 45 |
$choices[] = array( |
| 46 |
'label' => 'AcumbaMail', |
| 47 |
'value' => 'acumbamail', |
| 48 |
); |
| 49 |
|
| 50 |
$choices[] = array( |
| 51 |
'label' => 'Brevo', |
| 52 |
'value' => 'brevo', |
| 53 |
); |
| 54 |
|
| 55 |
$choices[] = array( |
| 56 |
'label' => 'MailerLite Classic', |
| 57 |
'value' => 'mailerlite', |
| 58 |
); |
| 59 |
|
| 60 |
return $choices; |
| 61 |
} |
| 62 |
); |
| 63 |
|
| 64 |
add_filter( |
| 65 |
'formscrm_dependency_apipassword', |
| 66 |
function ( $choices ) { |
| 67 |
|
| 68 |
$choices[] = 'clientify'; |
| 69 |
$choices[] = 'acumbamail'; |
| 70 |
$choices[] = 'holded'; |
| 71 |
$choices[] = 'mailerlite'; |
| 72 |
$choices[] = 'brevo'; |
| 73 |
|
| 74 |
return $choices; |
| 75 |
} |
| 76 |
); |
| 77 |
|
| 78 |
add_filter( |
| 79 |
'formscrm_crmlib_path', |
| 80 |
function ( $choices ) { |
| 81 |
|
| 82 |
$choices['holded'] = FORMSCRM_PLUGIN_PATH . 'includes/crm-library/class-crmlib-holded.php'; |
| 83 |
$choices['clientify'] = FORMSCRM_PLUGIN_PATH . 'includes/crm-library/class-crmlib-clientify.php'; |
| 84 |
$choices['acumbamail'] = FORMSCRM_PLUGIN_PATH . 'includes/crm-library/class-crmlib-acumbamail.php'; |
| 85 |
$choices['mailerlite'] = FORMSCRM_PLUGIN_PATH . 'includes/crm-library/class-crmlib-mailerlite.php'; |
| 86 |
$choices['brevo'] = FORMSCRM_PLUGIN_PATH . 'includes/crm-library/class-crmlib-brevo.php'; |
| 87 |
|
| 88 |
return $choices; |
| 89 |
} |
| 90 |
); |
| 91 |
|
| 92 |
// Include files. |
| 93 |
require_once FORMSCRM_PLUGIN_PATH . '/includes/admin/class-admin-options.php'; |
| 94 |
require_once FORMSCRM_PLUGIN_PATH . '/includes/admin/class-admin-updater.php'; |
| 95 |
require_once FORMSCRM_PLUGIN_PATH . '/includes/formscrm-library/loader.php'; |
| 96 |
|