Version Description
- Tweak: Added
Load More
button option in Grid widget. - Tweak: Wait images to load before triggering
Masonry
layout in Grid widget.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 3.1.7 |
Comparing to | |
See all releases |
Code changes from version 3.1.6 to 3.1.7
- admin/includes/notices.php +11 -5
- admin/settings/version-control.php +1 -1
- assets/css/premium-addons.css +58 -0
- assets/js/premium-addons.js +37 -2
- premium-addons-for-elementor.php +20 -3
- readme.txt +6 -1
- widgets/premium-grid.php +284 -12
admin/includes/notices.php
CHANGED
@@ -19,7 +19,6 @@ class Premium_Admin_Notices {
|
|
19 |
*/
|
20 |
public function __construct() {
|
21 |
add_action('admin_init', array( $this, 'init') );
|
22 |
-
|
23 |
add_action('admin_notices', array( $this, 'check_admin_notices' ) );
|
24 |
}
|
25 |
|
@@ -27,9 +26,9 @@ class Premium_Admin_Notices {
|
|
27 |
* init required functions
|
28 |
*/
|
29 |
public function init(){
|
30 |
-
|
31 |
//$this->handle_pbg_notice();
|
32 |
-
$this->handle_image_scroll_notice();
|
33 |
}
|
34 |
|
35 |
/**
|
@@ -37,9 +36,16 @@ class Premium_Admin_Notices {
|
|
37 |
*/
|
38 |
public function check_admin_notices() {
|
39 |
$this->required_plugins_check();
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
//$this->get_pbg_notice();
|
42 |
-
$this->get_image_scroll_notice();
|
43 |
}
|
44 |
|
45 |
/**
|
19 |
*/
|
20 |
public function __construct() {
|
21 |
add_action('admin_init', array( $this, 'init') );
|
|
|
22 |
add_action('admin_notices', array( $this, 'check_admin_notices' ) );
|
23 |
}
|
24 |
|
26 |
* init required functions
|
27 |
*/
|
28 |
public function init(){
|
29 |
+
$this->handle_review_notice();
|
30 |
//$this->handle_pbg_notice();
|
31 |
+
// $this->handle_image_scroll_notice();
|
32 |
}
|
33 |
|
34 |
/**
|
36 |
*/
|
37 |
public function check_admin_notices() {
|
38 |
$this->required_plugins_check();
|
39 |
+
|
40 |
+
$cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
|
41 |
+
|
42 |
+
$response = get_transient( $cache_key );
|
43 |
+
|
44 |
+
if ( false == $response ) {
|
45 |
+
$this->get_review_notice();
|
46 |
+
}
|
47 |
//$this->get_pbg_notice();
|
48 |
+
// $this->get_image_scroll_notice();
|
49 |
}
|
50 |
|
51 |
/**
|
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 3.1.
|
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 3.1.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/css/premium-addons.css
CHANGED
@@ -3373,6 +3373,64 @@ button.premium-modal-box-modal-close {
|
|
3373 |
width: 100%;
|
3374 |
object-fit: fill;
|
3375 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3376 |
/************ Premium Vertical Scroll ************/
|
3377 |
/*************************************************/
|
3378 |
.premium-vscroll-inner {
|
3373 |
width: 100%;
|
3374 |
object-fit: fill;
|
3375 |
}
|
3376 |
+
.premium-gallery-load-more.premium-gallery-btn-hidden {
|
3377 |
+
display: none;
|
3378 |
+
}
|
3379 |
+
.premium-gallery-load-more .premium-gallery-load-more-btn {
|
3380 |
+
box-shadow: none;
|
3381 |
+
text-shadow: none;
|
3382 |
+
border: none;
|
3383 |
+
outline: none;
|
3384 |
+
-webkit-box-align: center;
|
3385 |
+
-ms-flex-align: center;
|
3386 |
+
align-items: center;
|
3387 |
+
vertical-align: bottom;
|
3388 |
+
cursor: pointer;
|
3389 |
+
line-height: 1;
|
3390 |
+
font-style: normal;
|
3391 |
+
font-weight: normal;
|
3392 |
+
background-image: none;
|
3393 |
+
color: #fff;
|
3394 |
+
-webkit-transition: all 0.3s ease-in-out;
|
3395 |
+
-ms-transition: all 0.3s ease-in-out;
|
3396 |
+
-moz-transition: all 0.3s ease-in-out;
|
3397 |
+
transition: all 0.3s ease-in-out;
|
3398 |
+
}
|
3399 |
+
.premium-gallery-load-more-btn {
|
3400 |
+
display: inline-flex;
|
3401 |
+
align-items: center;
|
3402 |
+
}
|
3403 |
+
.premium-loader {
|
3404 |
+
border: 3px solid #f3f3f3;
|
3405 |
+
border-top-width: 3px;
|
3406 |
+
border-top-style: solid;
|
3407 |
+
border-top-color: rgb(243, 243, 243);
|
3408 |
+
border-radius: 50%;
|
3409 |
+
border-top: 3px solid;
|
3410 |
+
border-top-color: #bbb;
|
3411 |
+
width: 30px;
|
3412 |
+
height: 30px;
|
3413 |
+
-webkit-animation: spin 2s linear infinite;
|
3414 |
+
animation: spin 2s linear infinite;
|
3415 |
+
margin: 0 auto;
|
3416 |
+
}
|
3417 |
+
.premium-gallery-load-more-btn div {
|
3418 |
+
margin-left: 3px;
|
3419 |
+
}
|
3420 |
+
.premium-gallery-load-more-btn .premium-loader {
|
3421 |
+
display: inline-block;
|
3422 |
+
width: 20px;
|
3423 |
+
height: 20px;
|
3424 |
+
}
|
3425 |
+
@-webkit-keyframes spin {
|
3426 |
+
0% { -webkit-transform: rotate(0deg); }
|
3427 |
+
100% { -webkit-transform: rotate(360deg); }
|
3428 |
+
}
|
3429 |
+
|
3430 |
+
@keyframes spin {
|
3431 |
+
0% { transform: rotate(0deg); }
|
3432 |
+
100% { transform: rotate(360deg); }
|
3433 |
+
}
|
3434 |
/************ Premium Vertical Scroll ************/
|
3435 |
/*************************************************/
|
3436 |
.premium-vscroll-inner {
|
assets/js/premium-addons.js
CHANGED
@@ -69,6 +69,7 @@
|
|
69 |
isotopeOptions = galleryElement.data("settings"),
|
70 |
layout = isotopeOptions['img_size'],
|
71 |
deviceType = $("body").data("elementor-device-mode"),
|
|
|
72 |
columnWidth = null;
|
73 |
|
74 |
if( layout === 'metro' ) {
|
@@ -99,8 +100,9 @@
|
|
99 |
layout = 'masonry';
|
100 |
columnWidth = cellSize;
|
101 |
}
|
102 |
-
|
103 |
-
|
|
|
104 |
itemSelector: ".premium-gallery-item",
|
105 |
percentPosition: true,
|
106 |
animationOptions: {
|
@@ -114,6 +116,39 @@
|
|
114 |
}
|
115 |
});
|
116 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
$scope.find(".premium-gallery-cats-container li a").click(function(e) {
|
119 |
e.preventDefault();
|
69 |
isotopeOptions = galleryElement.data("settings"),
|
70 |
layout = isotopeOptions['img_size'],
|
71 |
deviceType = $("body").data("elementor-device-mode"),
|
72 |
+
loadMore = isotopeOptions['load_more'],
|
73 |
columnWidth = null;
|
74 |
|
75 |
if( layout === 'metro' ) {
|
100 |
layout = 'masonry';
|
101 |
columnWidth = cellSize;
|
102 |
}
|
103 |
+
|
104 |
+
galleryElement.imagesLoaded(function() {}).done(function() {
|
105 |
+
galleryElement.isotope({
|
106 |
itemSelector: ".premium-gallery-item",
|
107 |
percentPosition: true,
|
108 |
animationOptions: {
|
116 |
}
|
117 |
});
|
118 |
});
|
119 |
+
|
120 |
+
if ( loadMore ) {
|
121 |
+
galleryElement.parent().find('.premium-gallery-load-more div').hide();
|
122 |
+
if ( galleryElement.find(".premium-gallery-item").length > 6 ) {
|
123 |
+
galleryElement.parent().find('.premium-gallery-load-more').removeClass('premium-gallery-btn-hidden');
|
124 |
+
galleryElement.find(".premium-gallery-item:gt(5)").hide();
|
125 |
+
function appendItems() {
|
126 |
+
var itemsToShow = galleryElement.find(".premium-gallery-item").filter(':hidden').slice(0, 6);
|
127 |
+
if ( itemsToShow.length > 0 ) {
|
128 |
+
itemsToShow.show();
|
129 |
+
galleryElement.isotope('layout');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
galleryElement.parent().on('click', '.premium-gallery-load-more-btn', function() {
|
133 |
+
$.ajax({
|
134 |
+
url: appendItems(),
|
135 |
+
beforeSend: function() {
|
136 |
+
galleryElement.parent().find('.premium-gallery-load-more div').show();
|
137 |
+
},
|
138 |
+
success: function() {
|
139 |
+
var itemsLeft = galleryElement.find(".premium-gallery-item").filter(':hidden').slice(0, 6);
|
140 |
+
if ( itemsLeft.length > 0 ) {
|
141 |
+
galleryElement.parent().find('.premium-gallery-load-more div').hide();
|
142 |
+
} else {
|
143 |
+
galleryElement.parent().find('.premium-gallery-load-more').hide();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
});
|
147 |
+
});
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
|
153 |
$scope.find(".premium-gallery-cats-container li a").click(function(e) {
|
154 |
e.preventDefault();
|
premium-addons-for-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
-
Version: 3.1.
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
@@ -14,12 +14,12 @@ License: GNU General Public License v3.0
|
|
14 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
15 |
|
16 |
// Define Constants
|
17 |
-
define('PREMIUM_ADDONS_VERSION', '3.1.
|
18 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
19 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
20 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
21 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(PREMIUM_ADDONS_FILE));
|
22 |
-
define('PREMIUM_ADDONS_STABLE_VERSION', '3.1.
|
23 |
|
24 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
25 |
/*
|
@@ -45,6 +45,8 @@ if( ! class_exists('Premium_Addons_Elementor') ) {
|
|
45 |
|
46 |
add_action( 'admin_post_premium_addons_rollback', 'post_premium_addons_rollback' );
|
47 |
|
|
|
|
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -59,6 +61,21 @@ if( ! class_exists('Premium_Addons_Elementor') ) {
|
|
59 |
$this->init_files();
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
/**
|
63 |
* Require initial necessary files
|
64 |
* @since 2.6.8
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
+
Version: 3.1.7
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
14 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
15 |
|
16 |
// Define Constants
|
17 |
+
define('PREMIUM_ADDONS_VERSION', '3.1.7');
|
18 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
19 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
20 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
21 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(PREMIUM_ADDONS_FILE));
|
22 |
+
define('PREMIUM_ADDONS_STABLE_VERSION', '3.1.6');
|
23 |
|
24 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
25 |
/*
|
45 |
|
46 |
add_action( 'admin_post_premium_addons_rollback', 'post_premium_addons_rollback' );
|
47 |
|
48 |
+
register_activation_hook( PREMIUM_ADDONS_FILE, array( $this, 'set_transient' ) );
|
49 |
+
|
50 |
}
|
51 |
|
52 |
/**
|
61 |
$this->init_files();
|
62 |
}
|
63 |
|
64 |
+
/**
|
65 |
+
* Set transient for admin review notice
|
66 |
+
* @since 3.1.7
|
67 |
+
* @access public
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
+
public function set_transient() {
|
71 |
+
$cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
|
72 |
+
|
73 |
+
$expiration = 3600 * 72;
|
74 |
+
|
75 |
+
set_transient( $cache_key, true, $expiration );
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
/**
|
80 |
* Require initial necessary files
|
81 |
* @since 2.6.8
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
|
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.1
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 3.1.
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
@@ -139,6 +139,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
|
|
142 |
= 3.1.6 =
|
143 |
|
144 |
- Tweak: `Metro` layout improved in Grid widget.
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.1
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 3.1.7
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 3.1.7 =
|
143 |
+
|
144 |
+
- Tweak: Added `Load More` button option in Grid widget.
|
145 |
+
- Tweak: Wait images to load before triggering `Masonry` layout in Grid widget.
|
146 |
+
|
147 |
= 3.1.6 =
|
148 |
|
149 |
- Tweak: `Metro` layout improved in Grid widget.
|
widgets/premium-grid.php
CHANGED
@@ -103,6 +103,51 @@ class Premium_Grid extends Widget_Base {
|
|
103 |
]
|
104 |
);
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
$this->end_controls_section();
|
107 |
|
108 |
$this->start_controls_section('premium_gallery_cats',
|
@@ -996,6 +1041,10 @@ class Premium_Grid extends Widget_Base {
|
|
996 |
]
|
997 |
]);
|
998 |
|
|
|
|
|
|
|
|
|
999 |
$this->end_controls_section();
|
1000 |
|
1001 |
$this->start_controls_section('premium_gallery_filter_style',
|
@@ -1133,6 +1182,223 @@ class Premium_Grid extends Widget_Base {
|
|
1133 |
|
1134 |
$this->end_controls_section();
|
1135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1136 |
}
|
1137 |
|
1138 |
public function filter_cats( $string ) {
|
@@ -1178,7 +1444,8 @@ class Premium_Grid extends Widget_Base {
|
|
1178 |
'filter' => $settings['premium_gallery_filter'],
|
1179 |
'light_box' => $settings['premium_gallery_light_box'],
|
1180 |
'overlay_gallery'=> 'yes' == $settings['premium_gallery_overlay_gallery'] ? true : false,
|
1181 |
-
'active_cat' => $category_formatted
|
|
|
1182 |
];
|
1183 |
|
1184 |
$this->add_render_attribute( 'grid', [
|
@@ -1269,10 +1536,10 @@ class Premium_Grid extends Widget_Base {
|
|
1269 |
}
|
1270 |
|
1271 |
?>
|
1272 |
-
<div <?php echo $this->get_render_attribute_string($key); ?>>
|
1273 |
-
<div class="pa-gallery-img <?php echo esc_attr($layout); ?>" onclick="">
|
1274 |
-
<div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
|
1275 |
-
<?php if($settings['premium_gallery_img_size_select'] == 'fitRows') :
|
1276 |
$image_src = $image['premium_gallery_img'];
|
1277 |
$image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
|
1278 |
if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;
|
@@ -1303,12 +1570,12 @@ class Premium_Grid extends Widget_Base {
|
|
1303 |
</div>
|
1304 |
</div>
|
1305 |
<div class="premium-gallery-caption">
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
</div>
|
1313 |
<?php else: ?>
|
1314 |
<div class="pa-gallery-icons-caption-container">
|
@@ -1353,8 +1620,13 @@ class Premium_Grid extends Widget_Base {
|
|
1353 |
</div>
|
1354 |
<?php endforeach; ?>
|
1355 |
</div>
|
|
|
|
|
|
|
|
|
|
|
1356 |
</div>
|
1357 |
-
<?php if($settings['premium_gallery_responsive_switcher']
|
1358 |
<style>
|
1359 |
@media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
|
1360 |
#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-caption {
|
103 |
]
|
104 |
);
|
105 |
|
106 |
+
$this->add_control( 'premium_gallery_load_more',
|
107 |
+
[
|
108 |
+
'label' => __( 'Load More Button', 'premium-addons-for-elementor' ),
|
109 |
+
'description' => __('Requires number of images larger than 6', 'premium-addons-for-elementor'),
|
110 |
+
'type' => Controls_Manager::SWITCHER
|
111 |
+
]
|
112 |
+
);
|
113 |
+
|
114 |
+
$this->add_control( 'premium_gallery_load_more_text',
|
115 |
+
[
|
116 |
+
'label' => __( 'Button Text', 'premium-addons-for-elementor' ),
|
117 |
+
'type' => Controls_Manager::TEXT,
|
118 |
+
'default' => __('Load More', 'premium-addons-for-elementor'),
|
119 |
+
'dynamic' => [ 'active' => true ],
|
120 |
+
'condition' => [
|
121 |
+
'premium_gallery_load_more' => 'yes'
|
122 |
+
]
|
123 |
+
]
|
124 |
+
);
|
125 |
+
|
126 |
+
$this->add_responsive_control('premium_gallery_load_more_align',
|
127 |
+
[
|
128 |
+
'label' => __( 'Button Alignment', 'premium-addons-for-elementor' ),
|
129 |
+
'type' => Controls_Manager::CHOOSE,
|
130 |
+
'options' => [
|
131 |
+
'left' => [
|
132 |
+
'title'=> __( 'Left', 'premium-addons-for-elementor' ),
|
133 |
+
'icon' => 'fa fa-align-left',
|
134 |
+
],
|
135 |
+
'center' => [
|
136 |
+
'title'=> __( 'Center', 'premium-addons-for-elementor' ),
|
137 |
+
'icon' => 'fa fa-align-center',
|
138 |
+
],
|
139 |
+
'right' => [
|
140 |
+
'title'=> __( 'Right', 'premium-addons-for-elementor' ),
|
141 |
+
'icon' => 'fa fa-align-right',
|
142 |
+
],
|
143 |
+
],
|
144 |
+
'default' => 'center',
|
145 |
+
'selectors' => [
|
146 |
+
'{{WRAPPER}} .premium-gallery-load-more' => 'text-align: {{VALUE}};',
|
147 |
+
],
|
148 |
+
]
|
149 |
+
);
|
150 |
+
|
151 |
$this->end_controls_section();
|
152 |
|
153 |
$this->start_controls_section('premium_gallery_cats',
|
1041 |
]
|
1042 |
]);
|
1043 |
|
1044 |
+
$this->end_controls_tab();
|
1045 |
+
|
1046 |
+
$this->end_controls_tabs();
|
1047 |
+
|
1048 |
$this->end_controls_section();
|
1049 |
|
1050 |
$this->start_controls_section('premium_gallery_filter_style',
|
1182 |
|
1183 |
$this->end_controls_section();
|
1184 |
|
1185 |
+
$this->start_controls_section('premium_gallery_button_style_settings',
|
1186 |
+
[
|
1187 |
+
'label' => __('Load More Button', 'premium-addons-for-elementor'),
|
1188 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1189 |
+
'condition' => [
|
1190 |
+
'premium_gallery_load_more' => 'yes',
|
1191 |
+
]
|
1192 |
+
]
|
1193 |
+
);
|
1194 |
+
|
1195 |
+
$this->add_group_control(
|
1196 |
+
Group_Control_Typography::get_type(),
|
1197 |
+
[
|
1198 |
+
'name' => 'premium_gallery_button_typo',
|
1199 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
1200 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn',
|
1201 |
+
]
|
1202 |
+
);
|
1203 |
+
|
1204 |
+
$this->start_controls_tabs('premium_gallery_button_style_tabs');
|
1205 |
+
|
1206 |
+
$this->start_controls_tab('premium_gallery_button_style_normal',
|
1207 |
+
[
|
1208 |
+
'label' => __('Normal', 'premium-addons-for-elementor'),
|
1209 |
+
]
|
1210 |
+
);
|
1211 |
+
|
1212 |
+
$this->add_control('premium_gallery_button_color',
|
1213 |
+
[
|
1214 |
+
'label' => __('Text Color', 'premium-addons-for-elementor'),
|
1215 |
+
'type' => Controls_Manager::COLOR,
|
1216 |
+
'scheme' => [
|
1217 |
+
'type' => Scheme_Color::get_type(),
|
1218 |
+
'value' => Scheme_Color::COLOR_2,
|
1219 |
+
],
|
1220 |
+
'selectors' => [
|
1221 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn' => 'color: {{VALUE}};',
|
1222 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn .premium-loader' => 'border-color: {{VALUE}};',
|
1223 |
+
]
|
1224 |
+
]
|
1225 |
+
);
|
1226 |
+
|
1227 |
+
$this->add_control('premium_gallery_button_spin_color',
|
1228 |
+
[
|
1229 |
+
'label' => __('Spinner Color', 'premium-addons-for-elementor'),
|
1230 |
+
'type' => Controls_Manager::COLOR,
|
1231 |
+
'scheme' => [
|
1232 |
+
'type' => Scheme_Color::get_type(),
|
1233 |
+
'value' => Scheme_Color::COLOR_2,
|
1234 |
+
],
|
1235 |
+
'selectors' => [
|
1236 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn .premium-loader' => 'border-top-color: {{VALUE}};'
|
1237 |
+
]
|
1238 |
+
]
|
1239 |
+
);
|
1240 |
+
|
1241 |
+
$this->add_group_control(
|
1242 |
+
Group_Control_Text_Shadow::get_type(),
|
1243 |
+
[
|
1244 |
+
'name' => 'premium_gallery_button_text_shadow',
|
1245 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn',
|
1246 |
+
]
|
1247 |
+
);
|
1248 |
+
|
1249 |
+
$this->add_group_control(
|
1250 |
+
Group_Control_Background::get_type(),
|
1251 |
+
[
|
1252 |
+
'name' => 'premium_gallery_button_background',
|
1253 |
+
'types' => [ 'classic' , 'gradient' ],
|
1254 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn',
|
1255 |
+
]
|
1256 |
+
);
|
1257 |
+
|
1258 |
+
$this->add_group_control(
|
1259 |
+
Group_Control_Border::get_type(),
|
1260 |
+
[
|
1261 |
+
'name' => 'premium_gallery_button_border',
|
1262 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn',
|
1263 |
+
]
|
1264 |
+
);
|
1265 |
+
|
1266 |
+
$this->add_control('premium_gallery_button_border_radius',
|
1267 |
+
[
|
1268 |
+
'label' => __('Border Radius', 'premium-addons-for-elementor'),
|
1269 |
+
'type' => Controls_Manager::SLIDER,
|
1270 |
+
'size_units' => ['px', 'em' , '%'],
|
1271 |
+
'selectors' => [
|
1272 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn' => 'border-radius: {{SIZE}}{{UNIT}};'
|
1273 |
+
]
|
1274 |
+
]
|
1275 |
+
);
|
1276 |
+
|
1277 |
+
$this->add_group_control(
|
1278 |
+
Group_Control_Box_Shadow::get_type(),
|
1279 |
+
[
|
1280 |
+
'name' => 'premium_gallery_button_box_shadow',
|
1281 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn',
|
1282 |
+
]
|
1283 |
+
);
|
1284 |
+
|
1285 |
+
$this->add_responsive_control('premium_gallery_button_margin',
|
1286 |
+
[
|
1287 |
+
'label' => __('Margin', 'premium-addons-for-elementor'),
|
1288 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1289 |
+
'size_units' => ['px', 'em', '%'],
|
1290 |
+
'selectors' => [
|
1291 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
|
1292 |
+
]
|
1293 |
+
]
|
1294 |
+
);
|
1295 |
+
|
1296 |
+
$this->add_responsive_control('premium_gallery_button_padding',
|
1297 |
+
[
|
1298 |
+
'label' => __('Padding', 'premium-addons-for-elementor'),
|
1299 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1300 |
+
'size_units' => ['px', 'em', '%'],
|
1301 |
+
'selectors' => [
|
1302 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
|
1303 |
+
]
|
1304 |
+
]
|
1305 |
+
);
|
1306 |
+
|
1307 |
+
$this->end_controls_tab();
|
1308 |
+
|
1309 |
+
$this->start_controls_tab('premium_gallery_button_style_hover',
|
1310 |
+
[
|
1311 |
+
'label' => __('Hover', 'premium-addons-for-elementor'),
|
1312 |
+
]
|
1313 |
+
);
|
1314 |
+
|
1315 |
+
$this->add_control('premium_gallery_button_hover_color',
|
1316 |
+
[
|
1317 |
+
'label' => __('Text Hover Color', 'premium-addons-for-elementor'),
|
1318 |
+
'type' => Controls_Manager::COLOR,
|
1319 |
+
'scheme' => [
|
1320 |
+
'type' => Scheme_Color::get_type(),
|
1321 |
+
'value' => Scheme_Color::COLOR_2,
|
1322 |
+
],
|
1323 |
+
'selectors' => [
|
1324 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn:hover' => 'color: {{VALUE}};'
|
1325 |
+
]
|
1326 |
+
]
|
1327 |
+
);
|
1328 |
+
|
1329 |
+
$this->add_group_control(
|
1330 |
+
Group_Control_Text_Shadow::get_type(),
|
1331 |
+
[
|
1332 |
+
'name' => 'premium_gallery_button_text_shadow_hover',
|
1333 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn:hover',
|
1334 |
+
]
|
1335 |
+
);
|
1336 |
+
|
1337 |
+
$this->add_group_control(
|
1338 |
+
Group_Control_Background::get_type(),
|
1339 |
+
[
|
1340 |
+
'name' => 'premium_gallery_button_background_hover',
|
1341 |
+
'types' => [ 'classic' , 'gradient' ],
|
1342 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn:hover',
|
1343 |
+
]
|
1344 |
+
);
|
1345 |
+
|
1346 |
+
$this->add_group_control(
|
1347 |
+
Group_Control_Border::get_type(),
|
1348 |
+
[
|
1349 |
+
'name' => 'premium_gallery_button_border_hover',
|
1350 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn:hover',
|
1351 |
+
]
|
1352 |
+
);
|
1353 |
+
|
1354 |
+
$this->add_control('button_border_radius_hover',
|
1355 |
+
[
|
1356 |
+
'label' => __('Border Radius', 'premium-addons-for-elementor'),
|
1357 |
+
'type' => Controls_Manager::SLIDER,
|
1358 |
+
'size_units' => ['px', 'em' , '%' ],
|
1359 |
+
'selectors' => [
|
1360 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn:hover' => 'border-radius: {{SIZE}}{{UNIT}};'
|
1361 |
+
]
|
1362 |
+
]
|
1363 |
+
);
|
1364 |
+
|
1365 |
+
$this->add_group_control(
|
1366 |
+
Group_Control_Box_Shadow::get_type(),
|
1367 |
+
[
|
1368 |
+
'name' => 'premium_gallery_button_shadow_hover',
|
1369 |
+
'selector' => '{{WRAPPER}} .premium-gallery-load-more-btn:hover',
|
1370 |
+
]
|
1371 |
+
);
|
1372 |
+
|
1373 |
+
$this->add_responsive_control('button_margin_hover',
|
1374 |
+
[
|
1375 |
+
'label' => __('Margin', 'premium-addons-for-elementor'),
|
1376 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1377 |
+
'size_units' => ['px', 'em', '%'],
|
1378 |
+
'selectors' => [
|
1379 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
|
1380 |
+
]
|
1381 |
+
]
|
1382 |
+
);
|
1383 |
+
|
1384 |
+
$this->add_responsive_control('premium_gallery_button_padding_hover',
|
1385 |
+
[
|
1386 |
+
'label' => __('Padding', 'premium-addons-for-elementor'),
|
1387 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1388 |
+
'size_units' => ['px', 'em', '%'],
|
1389 |
+
'selectors' => [
|
1390 |
+
'{{WRAPPER}} .premium-gallery-load-more-btn:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
|
1391 |
+
]
|
1392 |
+
]
|
1393 |
+
);
|
1394 |
+
|
1395 |
+
|
1396 |
+
$this->end_controls_tab();
|
1397 |
+
|
1398 |
+
$this->end_controls_tabs();
|
1399 |
+
|
1400 |
+
$this->end_controls_section();
|
1401 |
+
|
1402 |
}
|
1403 |
|
1404 |
public function filter_cats( $string ) {
|
1444 |
'filter' => $settings['premium_gallery_filter'],
|
1445 |
'light_box' => $settings['premium_gallery_light_box'],
|
1446 |
'overlay_gallery'=> 'yes' == $settings['premium_gallery_overlay_gallery'] ? true : false,
|
1447 |
+
'active_cat' => $category_formatted,
|
1448 |
+
'load_more' => 'yes' == $settings['premium_gallery_load_more'] ? true : false,
|
1449 |
];
|
1450 |
|
1451 |
$this->add_render_attribute( 'grid', [
|
1536 |
}
|
1537 |
|
1538 |
?>
|
1539 |
+
<div <?php echo $this->get_render_attribute_string( $key ); ?>>
|
1540 |
+
<div class="pa-gallery-img <?php echo esc_attr( $layout ); ?>" onclick="">
|
1541 |
+
<div class="pa-gallery-img-container <?php echo esc_attr( $settings['premium_gallery_img_effect'] ); ?>">
|
1542 |
+
<?php if( $settings['premium_gallery_img_size_select'] == 'fitRows' ) :
|
1543 |
$image_src = $image['premium_gallery_img'];
|
1544 |
$image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
|
1545 |
if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;
|
1570 |
</div>
|
1571 |
</div>
|
1572 |
<div class="premium-gallery-caption">
|
1573 |
+
<?php if(!empty($image['premium_gallery_img_name'])):?>
|
1574 |
+
<span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
|
1575 |
+
<?php endif; ?>
|
1576 |
+
<?php if(!empty($image['premium_gallery_img_desc'])):?>
|
1577 |
+
<p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
|
1578 |
+
<?php endif; ?>
|
1579 |
</div>
|
1580 |
<?php else: ?>
|
1581 |
<div class="pa-gallery-icons-caption-container">
|
1620 |
</div>
|
1621 |
<?php endforeach; ?>
|
1622 |
</div>
|
1623 |
+
<?php if ( $settings['premium_gallery_load_more'] === 'yes' ) : ?>
|
1624 |
+
<div class="premium-gallery-load-more premium-gallery-btn-hidden">
|
1625 |
+
<button class="premium-gallery-load-more-btn"><span><?php echo $settings['premium_gallery_load_more_text']; ?></span><div class="premium-loader" ></div></button>
|
1626 |
+
</div>
|
1627 |
+
<?php endif; ?>
|
1628 |
</div>
|
1629 |
+
<?php if($settings['premium_gallery_responsive_switcher'] === 'yes') : ?>
|
1630 |
<style>
|
1631 |
@media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
|
1632 |
#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-caption {
|