Version Description
Wordpress 4.9+
Download this release
Release Info
Developer | ataurr |
Plugin | ElementsKit Elementor addons (Header Footer Builder, Mega Menu Builder, Free Elementor Widgets & Elementor Templates Library) |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- elementskit-lite.php +2 -2
- libs/framework/attr.php +5 -16
- libs/framework/classes/ajax.php +3 -0
- libs/framework/classes/utils.php +5 -0
- libs/framework/views/user-consent-for-banner.php +28 -0
- libs/notice/notice.php +1 -2
- plugin.php +26 -23
- readme.txt +4 -1
elementskit-lite.php
CHANGED
@@ -6,7 +6,7 @@ defined( 'ABSPATH' ) || exit;
|
|
6 |
* Description: The most advanced addons for Elementor with tons of widgets, Header builder, Footer builder, Mega menu builder, layout pack and powerful custom controls.
|
7 |
* Plugin URI: https://products.wpmet.com/elementskit
|
8 |
* Author: Wpmet
|
9 |
-
* Version: 2.1.
|
10 |
* Author URI: https://wpmet.com/
|
11 |
*
|
12 |
* Text Domain: elementskit-lite
|
@@ -27,7 +27,7 @@ final class ElementsKit_Lite{
|
|
27 |
* @var string The plugin version.
|
28 |
*/
|
29 |
static function version(){
|
30 |
-
return '2.1.
|
31 |
}
|
32 |
|
33 |
/**
|
6 |
* Description: The most advanced addons for Elementor with tons of widgets, Header builder, Footer builder, Mega menu builder, layout pack and powerful custom controls.
|
7 |
* Plugin URI: https://products.wpmet.com/elementskit
|
8 |
* Author: Wpmet
|
9 |
+
* Version: 2.1.2
|
10 |
* Author URI: https://wpmet.com/
|
11 |
*
|
12 |
* Text Domain: elementskit-lite
|
27 |
* @var string The plugin version.
|
28 |
*/
|
29 |
static function version(){
|
30 |
+
return '2.1.2';
|
31 |
}
|
32 |
|
33 |
/**
|
libs/framework/attr.php
CHANGED
@@ -37,6 +37,8 @@ class Attr{
|
|
37 |
|
38 |
// whitelist styles
|
39 |
add_filter('mailpoet_conflict_resolver_whitelist_style', [$this, 'whitelisted_styles']);
|
|
|
|
|
40 |
}
|
41 |
|
42 |
public function whitelisted_styles($styles) {
|
@@ -54,7 +56,6 @@ class Attr{
|
|
54 |
}
|
55 |
|
56 |
public function register_settings_menus(){
|
57 |
-
// add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', string $icon_url = '', int $position = null )
|
58 |
|
59 |
// dashboard, main menu
|
60 |
add_menu_page(
|
@@ -66,27 +67,15 @@ class Attr{
|
|
66 |
self::get_url() . 'assets/images/ekit_icon.svg',
|
67 |
'58.6'
|
68 |
);
|
69 |
-
|
70 |
-
// add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' )
|
71 |
-
//add_submenu_page( self::key(), 'ElementsKit_Lite Help', 'Help', 'manage_options', self::key().'-help', [$this, 'register_settings_contents__help'], 11);
|
72 |
}
|
73 |
|
74 |
|
75 |
-
// public function register_support_menu(){
|
76 |
-
// add_submenu_page( self::key(), esc_html__( 'Get Support', 'elementskit-lite' ), esc_html__( 'Get Support', 'elementskit-lite' ), 'manage_options', self::key().'-support', [$this, 'register_settings_contents__support'], 11);
|
77 |
-
// }
|
78 |
-
|
79 |
public function register_settings_contents__settings(){
|
80 |
include self::get_dir() . 'views/settings-init.php';
|
81 |
}
|
82 |
|
|
|
|
|
|
|
83 |
|
84 |
-
// public function register_settings_contents__support(){
|
85 |
-
// echo esc_html__('Please wait..', 'elementskit-lite');
|
86 |
-
// echo '
|
87 |
-
// <script>
|
88 |
-
// window.location.href = "https://help.wpmet.com";
|
89 |
-
// </script>
|
90 |
-
// ';
|
91 |
-
// }
|
92 |
}
|
37 |
|
38 |
// whitelist styles
|
39 |
add_filter('mailpoet_conflict_resolver_whitelist_style', [$this, 'whitelisted_styles']);
|
40 |
+
|
41 |
+
add_action('elementskit-lite/pro_awareness/before_grid_contents', [$this, 'user_consent_for_banner']);
|
42 |
}
|
43 |
|
44 |
public function whitelisted_styles($styles) {
|
56 |
}
|
57 |
|
58 |
public function register_settings_menus(){
|
|
|
59 |
|
60 |
// dashboard, main menu
|
61 |
add_menu_page(
|
67 |
self::get_url() . 'assets/images/ekit_icon.svg',
|
68 |
'58.6'
|
69 |
);
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
|
|
|
|
|
|
|
|
|
73 |
public function register_settings_contents__settings(){
|
74 |
include self::get_dir() . 'views/settings-init.php';
|
75 |
}
|
76 |
|
77 |
+
public function user_consent_for_banner(){
|
78 |
+
include self::get_dir() . 'views/user-consent-for-banner.php';
|
79 |
+
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
libs/framework/classes/ajax.php
CHANGED
@@ -21,6 +21,9 @@ class Ajax{
|
|
21 |
$this->utils->save_option('widget_list', !isset($_POST['widget_list']) ? [] : $_POST['widget_list']);
|
22 |
$this->utils->save_option('module_list', !isset($_POST['module_list']) ? [] : $_POST['module_list']);
|
23 |
$this->utils->save_option('user_data', $_POST['user_data']);
|
|
|
|
|
|
|
24 |
|
25 |
do_action('elementskit/admin/after_save');
|
26 |
|
21 |
$this->utils->save_option('widget_list', !isset($_POST['widget_list']) ? [] : $_POST['widget_list']);
|
22 |
$this->utils->save_option('module_list', !isset($_POST['module_list']) ? [] : $_POST['module_list']);
|
23 |
$this->utils->save_option('user_data', $_POST['user_data']);
|
24 |
+
$this->utils->save_option('settings', $_POST['settings']);
|
25 |
+
|
26 |
+
print_r($_POST['settings']);
|
27 |
|
28 |
do_action('elementskit/admin/after_save');
|
29 |
|
libs/framework/classes/utils.php
CHANGED
@@ -21,6 +21,11 @@ class Utils{
|
|
21 |
return (isset($data_all[$key]) && $data_all[$key] != '') ? $data_all[$key] : $default;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
public function save_option($key, $value = ''){
|
25 |
$data_all = get_option(self::$key);
|
26 |
$data_all[$key] = $value;
|
21 |
return (isset($data_all[$key]) && $data_all[$key] != '') ? $data_all[$key] : $default;
|
22 |
}
|
23 |
|
24 |
+
public function get_settings($key, $default = ''){
|
25 |
+
$data_all = $this->get_option('settings', []);
|
26 |
+
return (isset($data_all[$key]) && $data_all[$key] != '') ? $data_all[$key] : $default;
|
27 |
+
}
|
28 |
+
|
29 |
public function save_option($key, $value = ''){
|
30 |
$data_all = get_option(self::$key);
|
31 |
$data_all[$key] = $value;
|
libs/framework/views/user-consent-for-banner.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style>
|
2 |
+
.ekit-user-consent-for-banner{
|
3 |
+
margin: 0 0 15px 0!important;
|
4 |
+
max-width: 450px;
|
5 |
+
}
|
6 |
+
</style>
|
7 |
+
<script>
|
8 |
+
jQuery(document).ready(function ($) {
|
9 |
+
"use strict";
|
10 |
+
$('#ekit-admin-switch__ekit-user-consent-for-banner').on('change', function(){
|
11 |
+
let val = ($(this).prop("checked") ? $(this).val() : 'no');
|
12 |
+
|
13 |
+
$.post( ajaxurl + '?action=ekit_admin_action', {'settings' : {'ekit_user_consent_for_banner' : val}}, function( data ) {
|
14 |
+
console.log(data);
|
15 |
+
});
|
16 |
+
});
|
17 |
+
}); // end ready function
|
18 |
+
</script>
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
<div class="ekit-user-consent-for-banner notice notice-error">
|
23 |
+
<p>
|
24 |
+
<label for="ekit-admin-switch__ekit-user-consent-for-banner"><?php esc_html_e('Show update & fix related important messages, essential tutorials and promotional images on WP Dashboard', 'elementskit-lite'); ?></label>
|
25 |
+
|
26 |
+
<input type="checkbox" <?php echo ($this->utils->get_settings('ekit_user_consent_for_banner', 'yes') == 'yes' ? 'checked' : '');?> value="yes" class="ekit-admin-control-input" name="ekit-user-consent-for-banner" id="ekit-admin-switch__ekit-user-consent-for-banner">
|
27 |
+
</p>
|
28 |
+
</div>
|
libs/notice/notice.php
CHANGED
@@ -429,8 +429,7 @@ class Notice{
|
|
429 |
}
|
430 |
|
431 |
.wpmet-notice .main-message{
|
432 |
-
margin-bottom:
|
433 |
-
margin-top: 10px;
|
434 |
}
|
435 |
|
436 |
.wpmet-notice-buttons {
|
429 |
}
|
430 |
|
431 |
.wpmet-notice .main-message{
|
432 |
+
margin-bottom: 10px;
|
|
|
433 |
}
|
434 |
|
435 |
.wpmet-notice-buttons {
|
plugin.php
CHANGED
@@ -68,16 +68,31 @@ class Plugin{
|
|
68 |
$filter_string .= (!class_exists('\MetForm_Pro\Plugin') ? '' : ',metform-pro');
|
69 |
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
/**
|
82 |
* ----------------------------------------
|
83 |
* Ask for rating ⭐⭐⭐⭐⭐
|
@@ -87,7 +102,7 @@ class Plugin{
|
|
87 |
*/
|
88 |
|
89 |
\Wpmet\Libs\Rating::instance('elementskit-lite')
|
90 |
-
->set_plugin('ElementsKit', 'https://wordpress.org/
|
91 |
->set_plugin_logo('https://ps.w.org/elementskit-lite/assets/icon-128x128.png','width:150px !important')
|
92 |
->set_allowed_screens('edit-elementskit_template')
|
93 |
->set_allowed_screens('toplevel_page_elementskit')
|
@@ -98,18 +113,6 @@ class Plugin{
|
|
98 |
->call();
|
99 |
|
100 |
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Show WPMET banner (codename: jhanda)
|
104 |
-
*/
|
105 |
-
\Wpmet\Libs\Banner::instance('elementskit-lite')
|
106 |
-
// ->is_test(true)
|
107 |
-
->set_filter(ltrim($filter_string, ','))
|
108 |
-
->set_api_url('https://api.wpmet.com/public/jhanda')
|
109 |
-
->set_plugin_screens('edit-elementskit_template')
|
110 |
-
->set_plugin_screens('toplevel_page_elementskit')
|
111 |
-
->call();
|
112 |
-
|
113 |
$is_pro_active = in_array('elementskit/elementskit.php', apply_filters('active_plugins', get_option('active_plugins')));
|
114 |
|
115 |
/**
|
68 |
$filter_string .= (!class_exists('\MetForm_Pro\Plugin') ? '' : ',metform-pro');
|
69 |
|
70 |
|
71 |
+
if(Libs\Framework\Classes\Utils::instance()->get_settings('ekit_user_consent_for_banner', 'yes') == 'yes'){
|
72 |
+
/**
|
73 |
+
* Show WPMET stories widget in dashboard
|
74 |
+
*/
|
75 |
+
\Wpmet\Libs\Stories::instance('elementskit-lite')
|
76 |
+
// ->is_test(true)
|
77 |
+
->set_filter($filter_string)
|
78 |
+
->set_plugin('ElementsKit', 'https://wpmet.com/plugin/elementskit/')
|
79 |
+
->set_api_url('https://api.wpmet.com/public/stories/')
|
80 |
+
->call();
|
81 |
+
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Show WPMET banner (codename: jhanda)
|
85 |
+
*/
|
86 |
+
\Wpmet\Libs\Banner::instance('elementskit-lite')
|
87 |
+
// ->is_test(true)
|
88 |
+
->set_filter(ltrim($filter_string, ','))
|
89 |
+
->set_api_url('https://api.wpmet.com/public/jhanda')
|
90 |
+
->set_plugin_screens('edit-elementskit_template')
|
91 |
+
->set_plugin_screens('toplevel_page_elementskit')
|
92 |
+
->call();
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
/**
|
97 |
* ----------------------------------------
|
98 |
* Ask for rating ⭐⭐⭐⭐⭐
|
102 |
*/
|
103 |
|
104 |
\Wpmet\Libs\Rating::instance('elementskit-lite')
|
105 |
+
->set_plugin('ElementsKit', 'https://wpmet.com/wordpress.org/rating/elementskit')
|
106 |
->set_plugin_logo('https://ps.w.org/elementskit-lite/assets/icon-128x128.png','width:150px !important')
|
107 |
->set_allowed_screens('edit-elementskit_template')
|
108 |
->set_allowed_screens('toplevel_page_elementskit')
|
113 |
->call();
|
114 |
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
$is_pro_active = in_array('elementskit/elementskit.php', apply_filters('active_plugins', get_option('active_plugins')));
|
117 |
|
118 |
/**
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ataurr, wpmet, emranio, pobonpaul1994, easin55474, khalidjubair, e
|
|
3 |
Tags: elementor addons, mega menu, header footer builder, elements, elementor extensions, elementor modules, page builder addons, elementor addon, elementor widget, addons
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.6
|
6 |
-
Stable tag: 2.1.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
@@ -345,6 +345,9 @@ Our Hotspot Widget for Elementor page builder offers lots of styles including: H
|
|
345 |
- Widgets area
|
346 |
|
347 |
== Changelog ==
|
|
|
|
|
|
|
348 |
Version: 2.1.1 (10-01-2021)
|
349 |
New: Quickly turn on or off the Widgets and Modules from Dashboard.
|
350 |
New: Position option for Header Off-Canvas Widget.
|
3 |
Tags: elementor addons, mega menu, header footer builder, elements, elementor extensions, elementor modules, page builder addons, elementor addon, elementor widget, addons
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.6
|
6 |
+
Stable tag: 2.1.2
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
345 |
- Widgets area
|
346 |
|
347 |
== Changelog ==
|
348 |
+
Version: 2.1.2 (18-01-2021)
|
349 |
+
New: Banners consent for showing notices.
|
350 |
+
|
351 |
Version: 2.1.1 (10-01-2021)
|
352 |
New: Quickly turn on or off the Widgets and Modules from Dashboard.
|
353 |
New: Position option for Header Off-Canvas Widget.
|