-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathclass.cf7-api.php
104 lines (91 loc) · 2.3 KB
/
class.cf7-api.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
99
100
101
102
103
104
<?php
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
class QS_CF7_atp_integration{
/**
* The plugin identifier.
*
* @since 1.0.0
* @access protected
* @var string $plugin_name unique plugin id.
*/
protected $plugin_name;
/**
* save the instance of the plugin for static actions.
*
* @since 1.0.0
* @access protected
* @var string $instance an instance of the class.
*/
public static $instance;
/**
* a reference to the admin class.
*
* @since 1.0.0
* @access protected
* @var object
*/
public $admin;
/**
* a reference to the plugin status .
*
* @since 1.0.0
* @access protected
* @var object $admin an instance of the admin class.
*/
private $woocommerce_is_active;
/**
* Define the plugin functionality.
*
* set plugin name and version , and load dependencies
*
* @since 1.0.0
*/
public function __construct() {
$this->plugin_name = 'wc-cf7-api-form';
$this->load_dependencies();
/**
* Create an instance of the admin class
* @var QS_CF7_api_admin
*/
$this->admin = new QS_CF7_api_admin();
$this->admin->plugin_name = $this->plugin_name;
/**
* save the instance for static actions
*
*/
self::$instance = $this;
}
public function init(){
}
/**
* Loads the required plugin files
* @return [type] [description]
*/
public function load_dependencies(){
/**
* General global plugin functions
*/
require_once QS_CF7_API_INCLUDES_PATH . 'class.cf7-helpers.php';
/**
* admin notices class
*/
require_once QS_CF7_API_INCLUDES_PATH . 'class.qs-admin-notices.php';
/**
* admin notices clclass
*/
require_once QS_CF7_API_INCLUDES_PATH . 'class-cf7-api-admin.php';
}
/**
* Get the current plugin instance
* @return [type] [description]
*/
public static function get_instance() {
if (self::$instance === null) {
self::$instance = new self();
}
return self::$instance;
}
}