Version Description
- Fixed: All images are shown on page load when
Active Category Index
option is set in Premium Grid widget.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 2.8.7 |
Comparing to | |
See all releases |
Code changes from version 2.8.6 to 2.8.7
- admin/images/premium-addons-icon.png +0 -0
- admin/images/premium-blocks-logo.png +0 -0
- admin/includes/notices.php +37 -23
- admin/settings/version-control.php +1 -1
- assets/js/premium-addons.js +14 -3
- premium-addons-for-elementor.php +3 -3
- readme.txt +6 -2
- widgets/premium-grid.php +11 -1
admin/images/premium-addons-icon.png
DELETED
Binary file
|
admin/images/premium-blocks-logo.png
ADDED
Binary file
|
admin/includes/notices.php
CHANGED
@@ -10,6 +10,8 @@ class Premium_Admin_Notices {
|
|
10 |
|
11 |
private static $elementor = 'elementor';
|
12 |
|
|
|
|
|
13 |
/**
|
14 |
* Constructor for the class
|
15 |
*/
|
@@ -24,7 +26,7 @@ class Premium_Admin_Notices {
|
|
24 |
*/
|
25 |
public function init(){
|
26 |
$this->handle_review_notice();
|
27 |
-
|
28 |
}
|
29 |
|
30 |
/**
|
@@ -33,7 +35,7 @@ class Premium_Admin_Notices {
|
|
33 |
public function check_admin_notices() {
|
34 |
$this->required_plugins_check();
|
35 |
$this->get_review_notice();
|
36 |
-
|
37 |
}
|
38 |
|
39 |
/**
|
@@ -58,22 +60,22 @@ class Premium_Admin_Notices {
|
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
-
* Checks if
|
62 |
* @access public
|
63 |
* @return void
|
64 |
*/
|
65 |
-
public function
|
66 |
-
if ( ! isset( $_GET['
|
67 |
return;
|
68 |
}
|
69 |
|
70 |
-
if ( 'opt_out' === $_GET['
|
71 |
check_admin_referer( 'opt_out' );
|
72 |
|
73 |
-
update_option( '
|
74 |
}
|
75 |
|
76 |
-
wp_redirect( remove_query_arg( '
|
77 |
exit;
|
78 |
}
|
79 |
|
@@ -84,7 +86,7 @@ class Premium_Admin_Notices {
|
|
84 |
*/
|
85 |
public function required_plugins_check() {
|
86 |
|
87 |
-
$elementor_path = sprintf( '%s/%s.php', self::$elementor
|
88 |
|
89 |
if( ! defined('ELEMENTOR_VERSION' ) ) {
|
90 |
|
@@ -166,30 +168,42 @@ class Premium_Admin_Notices {
|
|
166 |
}
|
167 |
|
168 |
/**
|
169 |
-
* Shows an admin notice for
|
170 |
* @since 2.7.6
|
171 |
* @return void
|
172 |
*/
|
173 |
-
public function
|
174 |
|
175 |
-
$
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
$notice_url = sprintf( 'https://premiumaddons.com/vertical-scroll-widget-for-elementor-page-builder/?utm_source=vertical-scroll-notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
$optout_url = wp_nonce_url( add_query_arg( 'free_scroll', 'opt_out' ), 'opt_out' );
|
185 |
|
186 |
-
|
|
|
|
|
187 |
|
188 |
-
|
|
|
|
|
|
|
189 |
|
190 |
-
|
191 |
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
}
|
195 |
|
10 |
|
11 |
private static $elementor = 'elementor';
|
12 |
|
13 |
+
private static $pbg = 'premium-blocks-for-gutenberg';
|
14 |
+
|
15 |
/**
|
16 |
* Constructor for the class
|
17 |
*/
|
26 |
*/
|
27 |
public function init(){
|
28 |
$this->handle_review_notice();
|
29 |
+
$this->handle_pbg_notice();
|
30 |
}
|
31 |
|
32 |
/**
|
35 |
public function check_admin_notices() {
|
36 |
$this->required_plugins_check();
|
37 |
$this->get_review_notice();
|
38 |
+
$this->get_pbg_notice();
|
39 |
}
|
40 |
|
41 |
/**
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
+
* Checks if Premium Gutenberg message is dismissed.
|
64 |
* @access public
|
65 |
* @return void
|
66 |
*/
|
67 |
+
public function handle_pbg_notice() {
|
68 |
+
if ( ! isset( $_GET['pbg'] ) ) {
|
69 |
return;
|
70 |
}
|
71 |
|
72 |
+
if ( 'opt_out' === $_GET['pbg'] ) {
|
73 |
check_admin_referer( 'opt_out' );
|
74 |
|
75 |
+
update_option( 'pbg_notice', '1' );
|
76 |
}
|
77 |
|
78 |
+
wp_redirect( remove_query_arg( 'pbg' ) );
|
79 |
exit;
|
80 |
}
|
81 |
|
86 |
*/
|
87 |
public function required_plugins_check() {
|
88 |
|
89 |
+
$elementor_path = sprintf( '%1$s/%1$s.php', self::$elementor );
|
90 |
|
91 |
if( ! defined('ELEMENTOR_VERSION' ) ) {
|
92 |
|
168 |
}
|
169 |
|
170 |
/**
|
171 |
+
* Shows an admin notice for Premium Gutenberg.
|
172 |
* @since 2.7.6
|
173 |
* @return void
|
174 |
*/
|
175 |
+
public function get_pbg_notice() {
|
176 |
|
177 |
+
$pbg_path = sprintf( '%1$s/%1$s.php', self::$pbg);
|
178 |
|
179 |
+
if( ! defined('PREMIUM_BLOCKS_VERSION' ) ) {
|
|
|
|
|
180 |
|
181 |
+
if ( ! self::is_plugin_installed( $pbg_path ) ) {
|
182 |
+
|
183 |
+
if( self::check_user_can( 'install_plugins' ) ) {
|
|
|
184 |
|
185 |
+
$pbg_notice = get_option( 'pbg_notice' );
|
186 |
+
|
187 |
+
$install_url = wp_nonce_url( self_admin_url( sprintf( 'update.php?action=install-plugin&plugin=%s', self::$pbg ) ), 'install-plugin_premium-blocks-for-gutenberg' );
|
188 |
|
189 |
+
if ( '1' === $pbg_notice ) {
|
190 |
+
return;
|
191 |
+
} else if ( '1' !== $pbg_notice ) {
|
192 |
+
$optout_url = wp_nonce_url( add_query_arg( 'pbg', 'opt_out' ), 'opt_out' );
|
193 |
|
194 |
+
$pbg_message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;"><span><strong>Premium Blocks for Gutenberg </strong></span><span>is Now Available. </span><a href="%s" style="flex-grow: 2;"><span class="button-primary" style="margin-left:5px;">Install it Now.<span></a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-blocks-logo.png', $install_url );
|
195 |
|
196 |
+
}
|
197 |
+
|
198 |
+
$pbg_message .= sprintf(__('<a href="%s" style="text-decoration: none; margin-left: 1em; float:right; "><span class="dashicons dashicons-dismiss"></span></a></p>', 'premium-addons-for-elementor'), $optout_url );
|
199 |
+
|
200 |
+
$this->render_admin_notices( $pbg_message );
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
}
|
207 |
|
208 |
}
|
209 |
|
admin/settings/version-control.php
CHANGED
@@ -79,7 +79,7 @@ class PA_Version_Control {
|
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
-
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.8.
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
+
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.8.6</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
assets/js/premium-addons.js
CHANGED
@@ -71,7 +71,10 @@
|
|
71 |
});
|
72 |
htmlContent.imagesLoaded(function () {
|
73 |
setTimeout(function(){
|
74 |
-
htmlContent.isotope({
|
|
|
|
|
|
|
75 |
}, 1000);
|
76 |
|
77 |
});
|
@@ -88,20 +91,28 @@
|
|
88 |
}
|
89 |
});
|
90 |
setTimeout(function() {
|
91 |
-
htmlContent.isotope({
|
|
|
|
|
|
|
92 |
}, 1000);
|
93 |
// htmlContent.isotope({layoutMode: 'fitRows'});
|
94 |
$(window).on('load', function(){
|
95 |
setTimeout(function() {
|
96 |
-
htmlContent.isotope({
|
|
|
|
|
|
|
97 |
}, 1000);
|
98 |
});
|
99 |
}
|
|
|
100 |
$scope.find('.premium-gallery-cats-container li a').click(function(e){
|
101 |
e.preventDefault();
|
102 |
$scope.find('.premium-gallery-cats-container li .active').removeClass('active');
|
103 |
$(this).addClass('active');
|
104 |
var selector = $(this).attr('data-filter');
|
|
|
105 |
htmlContent.isotope({filter: selector});
|
106 |
return false;
|
107 |
});
|
71 |
});
|
72 |
htmlContent.imagesLoaded(function () {
|
73 |
setTimeout(function(){
|
74 |
+
htmlContent.isotope({
|
75 |
+
layoutMode: 'masonry',
|
76 |
+
filter: isotopeOptions['active_cat']
|
77 |
+
});
|
78 |
}, 1000);
|
79 |
|
80 |
});
|
91 |
}
|
92 |
});
|
93 |
setTimeout(function() {
|
94 |
+
htmlContent.isotope({
|
95 |
+
layoutMode: 'fitRows',
|
96 |
+
filter: isotopeOptions['active_cat']
|
97 |
+
});
|
98 |
}, 1000);
|
99 |
// htmlContent.isotope({layoutMode: 'fitRows'});
|
100 |
$(window).on('load', function(){
|
101 |
setTimeout(function() {
|
102 |
+
htmlContent.isotope({
|
103 |
+
layoutMode: 'fitRows',
|
104 |
+
filter: isotopeOptions['active_cat']
|
105 |
+
});
|
106 |
}, 1000);
|
107 |
});
|
108 |
}
|
109 |
+
|
110 |
$scope.find('.premium-gallery-cats-container li a').click(function(e){
|
111 |
e.preventDefault();
|
112 |
$scope.find('.premium-gallery-cats-container li .active').removeClass('active');
|
113 |
$(this).addClass('active');
|
114 |
var selector = $(this).attr('data-filter');
|
115 |
+
console.log(selector);
|
116 |
htmlContent.isotope({filter: selector});
|
117 |
return false;
|
118 |
});
|
premium-addons-for-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
-
Version: 2.8.
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
@@ -22,12 +22,12 @@ if (! function_exists('add_action')) {
|
|
22 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
-
define('PREMIUM_ADDONS_VERSION', '2.8.
|
26 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
27 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
28 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
29 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
-
define('PREMIUM_ADDONS_STABLE_VERSION', '2.8.
|
31 |
|
32 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
33 |
/*
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
+
Version: 2.8.7
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
22 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
+
define('PREMIUM_ADDONS_VERSION', '2.8.7');
|
26 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
27 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
28 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
29 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
+
define('PREMIUM_ADDONS_STABLE_VERSION', '2.8.6');
|
31 |
|
32 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
33 |
/*
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: leap13
|
|
3 |
Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, page builder
|
4 |
Donate link: http://premiumaddons.com
|
5 |
Requires at least: 4.5
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 2.8.
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
@@ -137,6 +137,10 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
|
|
140 |
= 2.8.6 =
|
141 |
|
142 |
- Tweak: Prevent page body scroll when modal is opened in Premium Modal Box widget.
|
3 |
Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, page builder
|
4 |
Donate link: http://premiumaddons.com
|
5 |
Requires at least: 4.5
|
6 |
+
Tested up to: 5.0.0
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 2.8.7
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 2.8.7 =
|
141 |
+
|
142 |
+
- Fixed: All images are shown on page load when `Active Category Index` option is set in Premium Grid widget.
|
143 |
+
|
144 |
= 2.8.6 =
|
145 |
|
146 |
- Tweak: Prevent page body scroll when modal is opened in Premium Modal Box widget.
|
widgets/premium-grid.php
CHANGED
@@ -1071,11 +1071,21 @@ class Premium_Grid extends Widget_Base {
|
|
1071 |
$min_size = $settings['premium_gallery_min_range'].'px';
|
1072 |
$max_size = $settings['premium_gallery_max_range'].'px';
|
1073 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1074 |
$grid_settings = [
|
1075 |
'img_size' => $settings['premium_gallery_img_size_select'],
|
1076 |
'filter' => $settings['premium_gallery_filter'],
|
1077 |
-
'light_box' => $settings['premium_gallery_light_box']
|
|
|
1078 |
];
|
|
|
1079 |
|
1080 |
?>
|
1081 |
<div id="premium-img-gallery-<?php echo esc_attr($this->get_id()); ?>" class="premium-img-gallery">
|
1071 |
$min_size = $settings['premium_gallery_min_range'].'px';
|
1072 |
$max_size = $settings['premium_gallery_max_range'].'px';
|
1073 |
|
1074 |
+
$category_formatted = "*";
|
1075 |
+
|
1076 |
+
if( 'yes' != $settings['premium_gallery_first_cat_switcher'] ) {
|
1077 |
+
$active_index = $settings['premium_gallery_active_cat'];
|
1078 |
+
$active_category = $settings['premium_gallery_cats_content'][$active_index]['premium_gallery_img_cat'];
|
1079 |
+
$category_formatted = "." . $this->filter_cats($active_category);
|
1080 |
+
}
|
1081 |
+
|
1082 |
$grid_settings = [
|
1083 |
'img_size' => $settings['premium_gallery_img_size_select'],
|
1084 |
'filter' => $settings['premium_gallery_filter'],
|
1085 |
+
'light_box' => $settings['premium_gallery_light_box'],
|
1086 |
+
'active_cat'=> $category_formatted
|
1087 |
];
|
1088 |
+
|
1089 |
|
1090 |
?>
|
1091 |
<div id="premium-img-gallery-<?php echo esc_attr($this->get_id()); ?>" class="premium-img-gallery">
|