PluginProbe ʕ •ᴥ•ʔ
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor / 3.7.9
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor v3.7.9
3.9.5 3.9.6 3.9.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.3.1 2.3.1.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.4.0 2.5.0 2.5.1 2.5.10 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.2 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.6.0 3.6.1 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.8.1 3.8.2 3.9.0 3.9.1 3.9.2 trunk 1.2.6 1.2.7 1.2.9 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.0.9.1 2.0.9.2 2.0.9.3
elementskit-lite / plugin.php
elementskit-lite Last commit date
compatibility 4 months ago config 4 months ago core 4 months ago helpers 4 months ago languages 4 months ago libs 4 months ago modules 4 months ago traits 4 years ago widgets 4 months ago autoloader.php 4 years ago elementskit-lite.php 4 months ago plugin.php 4 months ago readme.txt 3 months ago wpml-config.xml 1 year ago
plugin.php
508 lines
1 <?php
2 namespace ElementsKit_Lite;
3
4 defined( 'ABSPATH' ) || exit;
5
6
7 /**
8 * ElementsKit - the God class.
9 * Initiate all necessary classes, hooks, configs.
10 *
11 * @since 1.0.0
12 */
13 class Plugin {
14
15
16 /**
17 * The plugin instance.
18 *
19 * @since 1.0.0
20 * @access public
21 * @static
22 *
23 * @var Plugin
24 */
25 public static $instance = null;
26
27 /**
28 * Construct the plugin object.
29 *
30 * @since 1.0.0
31 * @access public
32 */
33 public function __construct() {
34
35 // check on-boarding status
36 Libs\Framework\Classes\Onboard_Status::instance()->onboard();
37
38 // Enqueue frontend scripts.
39 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend' ) );
40
41 // migrate old settings db to new format.
42 new Compatibility\Data_Migration\Settings_Db();
43
44 // compatibility for element manager.
45 new Compatibility\Element_Manager\Init();
46
47 // Enqueue admin scripts.
48 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin' ) );
49
50 // Enqueue inline scripts
51 Core\Build_Inline_Scripts::instance();
52
53 // Register plugin settings pages
54 Libs\Framework\Attr::instance();
55
56 // Register default widgets
57 Core\Build_Widgets::instance();
58
59 // Register default modules
60 Core\Build_Modules::instance();
61
62 // register plugin activation actions
63 ( new Core\Activation_Actions() )->init();
64
65 add_action( 'wp_head', array( $this, 'add_meta_for_search_excluded' ) );
66
67 // Register ElementsKit supported widgets to Elementor from 3rd party plugins.
68 add_action( 'elementor/widgets/register', array( $this, 'register_widgets' ), 1050 );
69
70 // Register wpml compatibility
71 Compatibility\Wpml\Init::instance();
72
73 // Compatibility issues
74 Compatibility\Conflicts\Init::instance();
75
76 // Show forms sub menu page
77 \Wpmet\Libs\Forms::instance();
78
79 $is_pro_active = in_array( 'elementskit/elementskit.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
80
81 if ( is_admin() && Libs\Framework\Classes\Utils::instance()->get_settings( 'ekit_user_consent_for_banner', 'yes' ) == 'yes' ) {
82 $filter_string = \ElementsKit_Lite::active_plugins();
83 /**
84 * Show WPMET stories widget in dashboard
85 */
86 \Wpmet\Libs\Stories::instance( 'elementskit-lite' )
87 // ->is_test(true)
88 ->set_filter( $filter_string )
89 ->set_plugin( 'ElementsKit', 'https://wpmet.com/plugin/elementskit/' )
90 ->set_api_url( 'https://api.wpmet.com/public/stories/' )
91 ->call();
92
93 /**
94 * Show WPMET banner (codename: jhanda)
95 */
96 \Wpmet\Libs\Banner::instance( 'elementskit-lite' )
97 // ->is_test(true)
98 ->set_filter( ltrim( $filter_string, ',' ) )
99 ->set_api_url( 'https://api.wpmet.com/public/jhanda' )
100 ->set_plugin_screens( 'edit-elementskit_template' )
101 ->set_plugin_screens( 'toplevel_page_elementskit' )
102 ->call();
103
104 /**
105 * Ask for rating
106 * A rating notice will appear depends on
107 * @set_first_appear_day methods
108 */
109 \Wpmet\Libs\Rating::instance( 'elementskit-lite' )
110 ->set_plugin( 'ElementsKit', 'https://wpmet.com/wordpress.org/rating/elementskit' )
111 ->set_plugin_logo( 'https://ps.w.org/elementskit-lite/assets/icon-128x128.gif', 'width:150px !important' )
112 ->set_allowed_screens( 'edit-elementskit_template' )
113 ->set_allowed_screens( 'toplevel_page_elementskit' )
114 ->set_allowed_screens( 'elementskit_page_elementskit-lite_get_help' )
115 ->set_priority( 10 )
116 ->set_first_appear_day( 7 )
117 ->set_condition( true )
118 ->call();
119
120 }
121
122 /**
123 * Show go Premium menu
124 */
125 $pro_awareness = \Wpmet\Libs\Pro_Awareness::instance('elementskit-lite');
126
127 if(version_compare($pro_awareness->get_version(), '1.2.0') >= 0) {
128 $pro_awareness
129 ->set_parent_menu_slug( 'elementskit' )
130 ->set_plugin_file( 'elementskit-lite/elementskit-lite.php' )
131 ->set_pro_link(
132 ( ( \ElementsKit_Lite::package_type() != 'free' ) ? '' : 'https://wpmet.com/elementskit-pricing' )
133 )
134 ->set_default_grid_thumbnail( \ElementsKit_Lite::lib_url() . 'pro-awareness/assets/support.png' )
135 ->set_page_grid(
136 array(
137 'url' => 'https://wpmet.com/fb-group',
138 'title' => 'Join the Community',
139 'thumbnail' => \ElementsKit_Lite::lib_url() . 'pro-awareness/assets/community.png',
140 'description' => 'Join our Facebook group to get 20% discount coupon on premium products. Follow us to get more exciting offers.'
141 )
142 )
143 ->set_page_grid(
144 array(
145 'url' => 'https://www.youtube.com/playlist?list=PL3t2OjZ6gY8MVnyA4OLB6qXb77-roJOuY',
146 'title' => 'Video Tutorials',
147 'thumbnail' => \ElementsKit_Lite::lib_url() . 'pro-awareness/assets/videos.png',
148 'description' => 'Learn the step by step process for developing your site easily from video tutorials.'
149 )
150 )
151 ->set_page_grid(
152 array(
153 'url' => 'https://wpmet.com/plugin/elementskit/roadmaps#ideas',
154 'title' => 'Request a feature',
155 'thumbnail' => \ElementsKit_Lite::lib_url() . 'pro-awareness/assets/request.png',
156 'description' => 'Have any special feature in mind? Let us know through the feature request.'
157 )
158 )
159 ->set_page_grid(
160 array(
161 'url' => 'https://wpmet.com/doc/elementskit/',
162 'title' => 'Documentation',
163 'thumbnail' => \ElementsKit_Lite::lib_url() . 'pro-awareness/assets/documentation.png',
164 'description' => 'Detailed documentation to help you understand the functionality of each feature.'
165 )
166 )
167 ->set_page_grid(
168 array(
169 'url' => 'https://wpmet.com/plugin/elementskit/roadmaps/',
170 'title' => 'Public Roadmap',
171 'thumbnail' => \ElementsKit_Lite::lib_url() . 'pro-awareness/assets/roadmaps.png',
172 'description' => 'Check our upcoming new features, detailed development stories and tasks'
173 )
174 )
175 ->set_plugin_row_meta( 'Documentation', 'https://wpmet.com/elementskit-docs', array( 'target' => '_blank' ) )
176 ->set_plugin_row_meta( 'Facebook Community', 'https://wpmet.com/fb-group', array( 'target' => '_blank' ) )
177 ->set_plugin_row_meta( 'Rate the plugin �
178
179
180
181
182 ', 'https://wordpress.org/support/plugin/elementskit-lite/reviews/#new-post', array( 'target' => '_blank' ) )
183 ->set_plugin_action_link( 'Settings', admin_url() . 'admin.php?page=elementskit' )
184 ->set_plugin_action_link(
185 ( $is_pro_active ? '' : 'Go Premium' ),
186 'https://wpmet.com/elementskit-pricing',
187 array(
188 'target' => '_blank',
189 'style' => 'color: #FCB214; font-weight: bold;',
190 )
191 )
192 ->call();
193 }
194
195 // Adding pro lebel
196 if ( \ElementsKit_Lite::package_type() == 'free' ) {
197 new Libs\Pro_Label\Init();
198 }
199
200 /**
201 * Show our plugins menu for others wpmet plugins
202 */
203 \Wpmet\Libs\Our_Plugins::instance()->init('elementskit-lite') # @text_domain
204 ->set_parent_menu_slug('elementskit') # @plugin_slug
205 ->set_submenu_name(
206 esc_html__('Our Plugins', 'elementskit-lite')
207 ) # @submenu_name (optional- default: Our Plugins)
208 ->set_section_title(
209 esc_html__('Take Your WordPress Website To Next Level!', 'elementskit-lite')
210 ) # @section_title (optional)
211 ->set_section_description(
212 esc_html__('Our diverse range of plugins has every solution for WordPress, Gutenberg, Elementor, and WooCommerce.', 'elementskit-lite')
213 ) # @section_description (optional)
214 ->set_items_per_row(4) # @items_per_row (optional- default: 6)
215 ->set_plugins(
216 [
217 'getgenie/getgenie.php' => [
218 'name' => esc_html__('GetGenie AI', 'elementskit-lite'),
219 'url' => 'https://wordpress.org/plugins/getgenie/',
220 'icon' => 'https://ps.w.org/getgenie/assets/icon-256x256.gif?rev=2798355',
221 'desc' => esc_html__('Your personal AI assistant for content and SEO. Write content that ranks on Google with NLP keywords and SERP analysis data.', 'elementskit-lite'),
222 'docs' => 'https://getgenie.ai/docs/',
223 ],
224 'shopengine/shopengine.php' => [
225 'name' => esc_html__('ShopEngine', 'elementskit-lite'),
226 'url' => 'https://wordpress.org/plugins/shopengine/',
227 'icon' => 'https://ps.w.org/shopengine/assets/icon-256x256.gif?rev=2505061',
228 'desc' => esc_html__('Complete WooCommerce solution for Elementor to fully customize any pages including cart, checkout, shop page, and so on.', 'elementskit-lite'),
229 'docs' => 'https://wpmet.com/doc/shopengine/',
230 ],
231 'metform/metform.php' => [
232 'name' => esc_html__('MetForm', 'elementskit-lite'),
233 'url' => 'https://wordpress.org/plugins/genie-image-ai/',
234 'icon' => 'https://ps.w.org/metform/assets/icon-256x256.png?rev=2544152',
235 'desc' => esc_html__('Drag & drop form builder for Elementor to create contact forms, multi-step forms, and more — smoother, faster, and better!', 'elementskit-lite'),
236 'docs' => 'https://wpmet.com/doc/metform/',
237 ],
238 'emailkit/EmailKit.php' => [
239 'name' => esc_html__('EmailKit', 'elementskit-lite'),
240 'url' => 'https://wordpress.org/plugins/genie-image-ai/',
241 'icon' => 'https://ps.w.org/emailkit/assets/icon-256x256.png?rev=3003571',
242 'desc' => esc_html__('Advanced email customizer for WooCommerce and WordPress. Build, customize, and send emails from WordPress to boost your sales!', 'elementskit-lite'),
243 'docs' => 'https://wpmet.com/doc/emailkit/',
244 ],
245 'gutenkit-blocks-addon/gutenkit-blocks-addon.php' => [
246 'name' => esc_html__('GutenKit', 'elementskit-lite'),
247 'url' => 'https://wordpress.org/plugins/gutenkit-blocks-addon/',
248 'icon' => 'https://ps.w.org/gutenkit-blocks-addon/assets/icon-256x256.gif?rev=3044956',
249 'desc' => esc_html__('Gutenberg blocks, patterns, and templates that extend the page-building experience using the WordPress block editor.', 'elementskit-lite'),
250 'docs' => 'https://wpmet.com/docs/gutenkit/',
251 ],
252 'popup-builder-block/popup-builder-block.php' => [
253 'name' => esc_html__('PopupKit', 'elementskit-lite'),
254 'url' => 'https://wordpress.org/plugins/popup-builder-block/',
255 'icon' => 'https://ps.w.org/popup-builder-block/assets/icon-256x256.png?rev=3316844',
256 'desc' => esc_html__('Design popups that convert, right in your WordPress dashboard.', 'elementskit-lite'),
257 'docs' => 'https://wpmet.com/docs/gutenkit/',
258 ],
259 'table-builder-block/table-builder-block.php' => [
260 'name' => esc_html__('TableKit', 'elementskit-lite'),
261 'url' => 'https://wordpress.org/plugins/table-builder-block/',
262 'icon' => 'https://ps.w.org/table-builder-block/assets/icon-256x256.jpg?rev=3168211',
263 'desc' => esc_html__('Fully Customizable. Multi-Media Integration. Synch Any Data Files. All Within Block Editor.', 'elementskit-lite'),
264 'docs' => 'https://wpmet.com/docs/gutenkit/',
265 ],
266 'wp-social/wp-social.php' => [
267 'name' => esc_html__('WP Social', 'elementskit-lite'),
268 'url' => 'https://wordpress.org/plugins/wp-social/',
269 'icon' => 'https://ps.w.org/wp-social/assets/icon-256x256.png?rev=2544214',
270 'desc' => esc_html__('Add social share, login, and engagement counter — unified solution for all social media with tons of different styles for your website.', 'elementskit-lite'),
271 'docs' => 'https://wpmet.com/doc/wp-social/',
272 ],
273 'wp-ultimate-review/wp-ultimate-review.php' => [
274 'name' => esc_html__('WP Ultimate Review', 'elementskit-lite'),
275 'url' => 'https://wordpress.org/plugins/wp-ultimate-review/',
276 'icon' => 'https://ps.w.org/wp-ultimate-review/assets/icon-256x256.png?rev=2544187',
277 'desc' => esc_html__('Collect and showcase reviews on your website to build brand credibility and social proof with the easiest solution.', 'elementskit-lite'),
278 'docs' => 'https://wpmet.com/doc/wp-ultimate-review/',
279 ],
280 'wp-fundraising-donation/wp-fundraising.php' => [
281 'name' => esc_html__('FundEngine', 'elementskit-lite'),
282 'url' => 'https://wordpress.org/plugins/wp-fundraising-donation/',
283 'icon' => 'https://ps.w.org/wp-fundraising-donation/assets/icon-256x256.png?rev=2544150',
284 'desc' => esc_html__('Create fundraising, crowdfunding, and donation websites with PayPal and Stripe payment gateway integration.', 'elementskit-lite'),
285 'docs' => 'https://wpmet.com/doc/fundengine/',
286 ],
287 'blocks-for-shopengine/shopengine-gutenberg-addon.php' => [
288 'name' => esc_html__('Blocks for ShopEngine', 'elementskit-lite'),
289 'url' => 'https://wordpress.org/plugins/blocks-for-shopengine/',
290 'icon' => 'https://ps.w.org/blocks-for-shopengine/assets/icon-256x256.gif?rev=2702483',
291 'desc' => esc_html__('All in one WooCommerce solution for Gutenberg! Build your WooCommerce pages in a block editor with full customization.', 'elementskit-lite'),
292 'docs' => 'https://wpmet.com/doc/shopengine/shopengine-gutenberg/',
293 ],
294 'genie-image-ai/genie-image-ai.php' => [
295 'name' => esc_html__('Genie Image', 'elementskit-lite'),
296 'url' => 'https://wordpress.org/plugins/genie-image-ai/',
297 'icon' => 'https://ps.w.org/genie-image-ai/assets/icon-256x256.png?rev=2977297',
298 'desc' => esc_html__('AI-powered text-to-image generator for WordPress with OpenAI’s DALL-E 2 technology to generate high-quality images in one click.', 'elementskit-lite'),
299 'docs' => 'https://getgenie.ai/docs/',
300 ],
301 ]
302 ) # @plugins
303 ->call();
304
305 $user_consent = Libs\Framework\Classes\Utils::instance()->get_settings('ekit_user_consent_for_banner', 'yes') == 'yes';
306
307 /**
308 * EmailKit Global Class initialization
309 *
310 */
311 if (
312 class_exists('WooCommerce')
313 && !class_exists('EmailKit')
314 && !did_action('edit_with_emailkit_loaded')
315 && class_exists('\Wpmet\Libs\Emailkit')
316 && $user_consent
317 ) {
318 new \Wpmet\Libs\Emailkit();
319 }
320
321 /**
322 * Initializes the Template Library of the Gutenkit plugin
323 *
324 * This code block checks if certain conditions are met and then initializes the Template Library of the Gutenkit plugin.
325 *
326 * Conditions:
327 * - The action 'edit_with_gutenkit_loaded' has not been performed yet.
328 * - The class '\ElementsKit_Lite\Libs\Template_Library\Init' exists.
329 * - The setting 'ekit_user_consent_for_banner' in the Utils class is set to 'yes'.
330 * - The plugin 'gutenkit-blocks-addon' is not active or install.
331 *
332 * If any of the above conditions are met, the Template Library is initialized by creating a new instance of
333 * the class '\ElementsKit_Lite\Libs\Template_Library\Init'.
334 *
335 * @since 3.1.4
336 */
337 if ($user_consent && class_exists('\ElementsKit_Lite\Libs\Template_Library\Init') && !did_action('gutenkit/init')) {
338 new \ElementsKit_Lite\Libs\Template_Library\Init();
339 }
340 }
341
342 /**
343 * Check the admin screen and show the rating notice if eligible
344 *
345 * @access private
346 * @return boolean
347 */
348 private function should_show_rating_notice() {
349
350 if ( \ElementsKit_Lite::package_type() == 'free' ) {
351 return true;
352 }
353
354 if ( ! function_exists( 'get_current_screen' ) ) {
355 return false;
356 }
357
358 $current_screen = ( get_current_screen() )->base;
359 $current_post_type = ( get_current_screen() )->post_type;
360 $eligible_post_type = array( 'elementskit_template' );
361 $eligible_screens = array( 'plugins', 'dashboard', 'elementskit', 'themes' );
362
363 if ( in_array( $current_post_type, $eligible_post_type ) ) {
364 return true;
365 }
366
367 if ( in_array( $current_screen, $eligible_screens ) ) {
368 return true;
369 }
370
371 return false;
372 }
373
374 /**
375 * Enqueue scripts
376 *
377 * Enqueue js and css to frontend.
378 *
379 * @since 1.0.0
380 * @access public
381 */
382 public function enqueue_frontend() {
383 wp_enqueue_script( 'elementskit-framework-js-frontend', \ElementsKit_Lite::lib_url() . 'framework/assets/js/frontend-script.js', array( 'jquery' ), \ElementsKit_Lite::version(), true );
384 }
385
386 /**
387 * Enqueue scripts
388 *
389 * Enqueue js and css to admin.
390 *
391 * @since 1.0.0
392 * @access public
393 */
394 public function enqueue_admin() {
395 $screen = get_current_screen();
396
397 if ( ! in_array( $screen->id, array( 'nav-menus', 'toplevel_page_elementskit', 'edit-elementskit_template', 'elementskit_page_elementskit-license', 'elementskit_page_elementskit-lite_get_help' ) ) ) {
398 return;
399 }
400
401 wp_register_style( 'fontawesome', \ElementsKit_Lite::widget_url() . 'init/assets/css/font-awesome.min.css', false, \ElementsKit_Lite::version() );
402 wp_register_style( 'elementskit-font-css-admin', \ElementsKit_Lite::module_url() . 'elementskit-icon-pack/assets/css/ekiticons.css', false, \ElementsKit_Lite::version() );
403 wp_register_style( 'elementskit-init-css-admin', \ElementsKit_Lite::lib_url() . 'framework/assets/css/admin-style.css', false, \ElementsKit_Lite::version() );
404
405 wp_enqueue_style( 'fontawesome' );
406 wp_enqueue_style( 'elementskit-font-css-admin' );
407 wp_enqueue_style( 'elementskit-init-css-admin' );
408
409 wp_enqueue_script( 'ekit-admin-core', \ElementsKit_Lite::lib_url() . 'framework/assets/js/ekit-admin-core.js', array( 'jquery' ), \ElementsKit_Lite::version(), true );
410
411 $data['rest_url'] = get_rest_url();
412 $data['nonce'] = wp_create_nonce( 'wp_rest' );
413
414 wp_localize_script( 'ekit-admin-core', 'rest_config', $data );
415
416 wp_localize_script(
417 'ekit-admin-core',
418 'ekit_ajax_var',
419 array(
420 'nonce' => wp_create_nonce( 'ajax-nonce' ),
421 )
422 );
423 }
424
425 /**
426 * Control registrar.
427 *
428 * Register the custom controls for Elementor
429 * using `elementskit/widgets/widgets_registered` action.
430 *
431 * @since 1.0.0
432 * @access public
433 */
434 public function register_control( $widgets_manager ) {
435 do_action( 'elementskit/widgets/widgets_registered', $widgets_manager );
436 }
437
438
439 /**
440 * Widget registrar.
441 *
442 * Retrieve all the registered widgets
443 * using `elementor/widgets/register` action.
444 *
445 * @since 1.0.0
446 * @access public
447 */
448 public function register_widgets( $widgets_manager ) {
449 do_action( 'elementskit/widgets/widgets_registered', $widgets_manager );
450 }
451
452 /**
453 * Excluding ElementsKit template and megamenu content from search engine.
454 * See - https://wordpress.org/support/topic/google-is-indexing-elementskit-content-as-separate-pages/
455 *
456 * @since 1.4.5
457 * @access public
458 */
459 public function add_meta_for_search_excluded() {
460 if ( in_array(
461 get_post_type(),
462 array( 'elementskit_widget', 'elementskit_template', 'elementskit_content' )
463 )
464 ) {
465 echo '<meta name="robots" content="noindex,nofollow" />', "\n";
466 }
467 }
468
469 /**
470 * Autoloader.
471 *
472 * ElementsKit autoloader loads all the classes needed to run the plugin.
473 *
474 * @since 1.0.0
475 * @access private
476 */
477 public static function registrar_autoloader() {
478 require_once \ElementsKit_Lite::plugin_dir() . '/autoloader.php';
479 Autoloader::run();
480 }
481
482 /**
483 * Instance.
484 *
485 * Ensures only one instance of the plugin class is loaded or can be loaded.
486 *
487 * @since 1.0.0
488 * @access public
489 * @static
490 *
491 * @return Plugin An instance of the class.
492 */
493 public static function instance() {
494 if ( is_null( self::$instance ) ) {
495
496 do_action( 'elementskit_lite/before_loaded' );
497
498 // Fire when ElementsKit instance.
499 self::$instance = new self();
500
501 do_action( 'elementskit/loaded' ); // legacy support
502 do_action( 'elementskit_lite/after_loaded' );
503 }
504
505 return self::$instance;
506 }
507 }
508