1 | <?php namespace EmailLog\Core; |
||
11 | class EmailLog { |
||
12 | |||
13 | /** |
||
14 | * Plugin Version number. |
||
15 | * |
||
16 | * @since Genesis |
||
17 | * @var string |
||
18 | */ |
||
19 | const VERSION = '2.0.2'; |
||
20 | |||
21 | /** |
||
22 | * Email Log Store URL. |
||
23 | */ |
||
24 | const STORE_URL = 'https://wpemaillog.com'; |
||
25 | |||
26 | /** |
||
27 | * Flag to track if the plugin is loaded. |
||
28 | * |
||
29 | * @since 2.0 |
||
30 | * @access private |
||
31 | * @var bool |
||
32 | */ |
||
33 | private $loaded = false; |
||
34 | |||
35 | /** |
||
36 | * Plugin file path. |
||
37 | * |
||
38 | * @since 2.0 |
||
39 | * @access private |
||
40 | * @var string |
||
41 | */ |
||
42 | private $plugin_file; |
||
43 | |||
44 | /** |
||
45 | * Filesystem directory path where translations are stored. |
||
46 | * |
||
47 | * @since 2.0 |
||
48 | * @var string |
||
49 | */ |
||
50 | public $translations_path; |
||
51 | |||
52 | /** |
||
53 | * Auto loader. |
||
54 | * |
||
55 | * @var \EmailLog\EmailLogAutoloader |
||
56 | */ |
||
57 | public $loader; |
||
58 | |||
59 | /** |
||
60 | * Database Table Manager. |
||
61 | * |
||
62 | * @since 2.0 |
||
63 | * @var \EmailLog\Core\DB\TableManager |
||
64 | */ |
||
65 | public $table_manager; |
||
66 | |||
67 | /** |
||
68 | * Email Log Plugins Setting. |
||
69 | * |
||
70 | * @since 2.1.0 |
||
71 | * @var \EmailLog\Core\UI\Setting\Setting |
||
72 | */ |
||
73 | public $setting; |
||
74 | |||
75 | /** |
||
76 | * Add-on Licenser. |
||
77 | * |
||
78 | * @since 2.0 |
||
79 | * @var \EmailLog\Addon\License\Licenser |
||
80 | */ |
||
81 | private $licenser; |
||
82 | |||
83 | /** |
||
84 | * List of loadies. |
||
85 | * |
||
86 | * @var Loadie[] |
||
87 | */ |
||
88 | private $loadies = array(); |
||
89 | |||
90 | /** |
||
91 | * Initialize the plugin. |
||
92 | * |
||
93 | * @param string $file Plugin file. |
||
94 | * @param EmailLogAutoloader $loader EmailLog Autoloader. |
||
95 | * @param TableManager $table_manager Table Manager. |
||
96 | */ |
||
97 | 1 | public function __construct( $file, $loader, $table_manager ) { |
|
106 | |||
107 | /** |
||
108 | * Set Licenser. |
||
109 | * |
||
110 | * @param \EmailLog\Addon\License\Licenser $licenser Add-on Licenser. |
||
111 | */ |
||
112 | public function set_licenser( $licenser ) { |
||
117 | |||
118 | /** |
||
119 | * Get Licenser. |
||
120 | * |
||
121 | * @return \EmailLog\Addon\License\Licenser |
||
122 | */ |
||
123 | public function get_licenser() { |
||
126 | |||
127 | /** |
||
128 | * Add an Email Log Loadie. |
||
129 | * The `load()` method of the Loadies will be called when Email Log is loaded. |
||
130 | * |
||
131 | * @param \EmailLog\Core\Loadie $loadie Loadie to be loaded. |
||
132 | * |
||
133 | * @return bool False if Email Log is already loaded or if $loadie is not of `Loadie` type. True otherwise. |
||
134 | */ |
||
135 | 1 | public function add_loadie( $loadie ) { |
|
148 | |||
149 | /** |
||
150 | * Load the plugin. |
||
151 | */ |
||
152 | 1 | public function load() { |
|
181 | |||
182 | /** |
||
183 | * Return Email Log version. |
||
184 | * |
||
185 | * @return string Email Log Version. |
||
186 | */ |
||
187 | public function get_version() { |
||
190 | |||
191 | /** |
||
192 | * Return the Email Log plugin directory path. |
||
193 | * |
||
194 | * @return string Plugin directory path. |
||
195 | */ |
||
196 | public function get_plugin_path() { |
||
199 | |||
200 | /** |
||
201 | * Return the Email Log plugin file. |
||
202 | * |
||
203 | * @since 2.0.0 |
||
204 | * |
||
205 | * @return string Plugin directory path. |
||
206 | */ |
||
207 | public function get_plugin_file() { |
||
210 | |||
211 | /** |
||
212 | * Get Email Log Store URL. |
||
213 | * |
||
214 | * @since 2.0.0 |
||
215 | * |
||
216 | * @return string Store URL |
||
217 | */ |
||
218 | public function get_store_url() { |
||
221 | |||
222 | /** |
||
223 | * Shows the Email Log only to allowed User roles set in the Plugin's settings page. |
||
224 | */ |
||
225 | public function remove_email_log_menu_by_user_role() { |
||
230 | } |
||
231 |