Premium Addons for Elementor - Version 2.8.7

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 Icon 128x128 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 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
- // $this->handle_vertical_scroll_notice();
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
- // $this->get_vertical_scroll_notice();
37
}
38
39
/**
@@ -58,22 +60,22 @@ class Premium_Admin_Notices {
58
}
59
60
/**
61
- * Checks if vertical scroll message is dismissed.
62
* @access public
63
* @return void
64
*/
65
- public function handle_vertical_scroll_notice() {
66
- if ( ! isset( $_GET['free_scroll'] ) ) {
67
return;
68
}
69
70
- if ( 'opt_out' === $_GET['free_scroll'] ) {
71
check_admin_referer( 'opt_out' );
72
73
- update_option( 'free_scroll_notice', '1' );
74
}
75
76
- wp_redirect( remove_query_arg( 'free_scroll' ) );
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, 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 vertical scroll.
170
* @since 2.7.6
171
* @return void
172
*/
173
- public function get_vertical_scroll_notice() {
174
175
- $scroll_notice = get_option( 'free_scroll_notice' );
176
177
- $theme = self::get_installed_theme();
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
- if ( '1' === $scroll_notice ) {
182
- return;
183
- } else if ( '1' !== $scroll_notice ) {
184
- $optout_url = wp_nonce_url( add_query_arg( 'free_scroll', 'opt_out' ), 'opt_out' );
185
186
- $scroll_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>NEW!&nbsp</span><strong><span>Vertical Scroll Widget for Elementor&nbsp</strong>is Now Available in Premium Addons for Elementor.&nbsp</span><a href="%s" target="_blank" style="flex-grow: 2;"> Check it out now.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png', $notice_url );
187
188
- }
189
190
- $scroll_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 );
191
192
- $this->render_admin_notices( $scroll_message );
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&nbsp</strong></span><span>is Now Available.&nbsp</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.5</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>
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({layoutMode: 'masonry'});
75
}, 1000);
76
77
});
@@ -88,20 +91,28 @@
88
}
89
});
90
setTimeout(function() {
91
- htmlContent.isotope({layoutMode: 'fitRows'});
92
}, 1000);
93
// htmlContent.isotope({layoutMode: 'fitRows'});
94
$(window).on('load', function(){
95
setTimeout(function() {
96
- htmlContent.isotope({layoutMode: 'fitRows'});
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.6
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.6');
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.5');
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: 4.9.8
7
Requires PHP: 5.4
8
- Stable tag: 2.8.6
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">