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