Premium Addons for Elementor - Version 4.8.1

Version Description

  • Tweak: PHP Code refactored for better performance and security.
Download this release

Release Info

Developer leap13
Plugin Icon 128x128 Premium Addons for Elementor
Version 4.8.1
Comparing to
See all releases

Code changes from version 4.8.0 to 4.8.1

admin/includes/admin-notices.php CHANGED
@@ -1,401 +1,349 @@
1
- <?php
2
-
3
- /**
4
- * PA Admin Notices.
5
- */
6
- namespace PremiumAddons\Admin\Includes;
7
-
8
- use PremiumAddons\Includes\Helper_Functions;
9
-
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit();
12
- }
13
-
14
- /**
15
- * Class Admin_Notices
16
- */
17
- class Admin_Notices {
18
-
19
- /**
20
- * Class object
21
- *
22
- * @var instance
23
- */
24
- private static $instance = null;
25
-
26
- /**
27
- * Elementor slug
28
- *
29
- * @var elementor
30
- */
31
- private static $elementor = 'elementor';
32
-
33
- /**
34
- * PAPRO Slug
35
- *
36
- * @var papro
37
- */
38
- private static $papro = 'premium-addons-pro';
39
-
40
- /**
41
- * Notices Keys
42
- *
43
- * @var notices
44
- */
45
- private static $notices = null;
46
-
47
- /**
48
- * Constructor for the class
49
- */
50
- public function __construct() {
51
-
52
- add_action( 'admin_init', array( $this, 'init' ) );
53
-
54
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
55
-
56
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
57
-
58
- add_action( 'wp_ajax_pa_reset_admin_notice', array( $this, 'reset_admin_notice' ) );
59
-
60
- add_action( 'wp_ajax_pa_dismiss_admin_notice', array( $this, 'dismiss_admin_notice' ) );
61
-
62
- self::$notices = array(
63
- 'ch21_notice',
64
- 'pa-review',
65
- );
66
-
67
- delete_option( 'bf21_notice' );
68
-
69
- }
70
-
71
- /**
72
- * init required functions
73
- */
74
- public function init() {
75
-
76
- $this->handle_review_notice();
77
-
78
- }
79
-
80
- /**
81
- * init notices check functions
82
- */
83
- public function admin_notices() {
84
-
85
- $this->required_plugins_check();
86
-
87
- $cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
88
-
89
- $response = get_transient( $cache_key );
90
-
91
- $show_review = get_option( 'pa_review_notice' );
92
-
93
- // Make sure Already did was not clicked before.
94
- if ( '1' !== $show_review ) {
95
- if ( false == $response ) {
96
- $this->get_review_notice();
97
- }
98
- }
99
-
100
- if ( strtotime( 'now' ) < strtotime( '04 January 2022' ) ) {
101
- $this->get_ch_notice();
102
- };
103
-
104
- }
105
-
106
- /**
107
- * Handle Review Notice
108
- *
109
- * Checks if review message is dismissed.
110
- *
111
- * @access public
112
- * @return void
113
- */
114
- public function handle_review_notice() {
115
-
116
- if ( ! isset( $_GET['pa_review'] ) ) {
117
- return;
118
- }
119
-
120
- if ( 'opt_out' === $_GET['pa_review'] ) {
121
- check_admin_referer( 'opt_out' );
122
-
123
- update_option( 'pa_review_notice', '1' );
124
- }
125
-
126
- wp_redirect( remove_query_arg( 'pa_review' ) );
127
-
128
- exit;
129
- }
130
-
131
- /**
132
- * Required plugin check
133
- *
134
- * Shows an admin notice when Elementor is missing.
135
- *
136
- * @access public
137
- *
138
- * @return boolean
139
- */
140
- public function required_plugins_check() {
141
-
142
- $elementor_path = sprintf( '%1$s/%1$s.php', self::$elementor );
143
-
144
- if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
145
-
146
- if ( ! Helper_Functions::is_plugin_installed( $elementor_path ) ) {
147
-
148
- if ( Admin_Helper::check_user_can( 'install_plugins' ) ) {
149
-
150
- $install_url = wp_nonce_url( self_admin_url( sprintf( 'update.php?action=install-plugin&plugin=%s', self::$elementor ) ), 'install-plugin_elementor' );
151
-
152
- $message = sprintf( '<p>%s</p>', __( 'Premium Addons for Elementor is not working because you need to Install Elementor plugin.', 'premium-addons-for-elementor' ) );
153
-
154
- $message .= sprintf( '<p><a href="%s" class="button-primary">%s</a></p>', $install_url, __( 'Install Now', 'premium-addons-for-elementor' ) );
155
-
156
- }
157
- } else {
158
-
159
- if ( Admin_Helper::check_user_can( 'activate_plugins' ) ) {
160
-
161
- $activation_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $elementor_path . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $elementor_path );
162
-
163
- $message = '<p>' . __( 'Premium Addons for Elementor is not working because you need to activate Elementor plugin.', 'premium-addons-for-elementor' ) . '</p>';
164
-
165
- $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'premium-addons-for-elementor' ) ) . '</p>';
166
-
167
- }
168
- }
169
- $this->render_admin_notices( $message );
170
- }
171
- }
172
-
173
- /**
174
- * Gets admin review notice HTML
175
- *
176
- * @since 2.8.4
177
- * @return void
178
- */
179
- public function get_review_text( $review_url, $optout_url ) {
180
-
181
- $notice = sprintf(
182
- '<p>' . __( 'Can we take only 2 minutes of your time? We would be really grateful it if you give ', 'premium-addons-for-elementor' ) .
183
- '<b>' . __( 'Premium Addons for Elementor', 'premium-addons-for-elementor' ) . '</b> a 5 Stars Rating on WordPress.org. By speading the love, we can create even greater free stuff in the future!</p>
184
- <div>
185
- <a class="button button-primary" href="%s" target="_blank"><span>' . __( 'Sure, leave a Review', 'premium-addons-for-elementor' ) . '</span></a>
186
- <a class="button" href="%2$s"><span>' . __( 'I Already Did', 'premium-addons-for-elementor' ) . '</span></a>
187
- <a class="button button-secondary pa-notice-reset"><span>' . __( 'Maybe Later', 'premium-addons-for-elementor' ) . '</span></a>
188
- </div>',
189
- $review_url,
190
- $optout_url
191
- );
192
-
193
- return $notice;
194
- }
195
-
196
- /**
197
- * Checks if review admin notice is dismissed
198
- *
199
- * @since 2.6.8
200
- * @return void
201
- */
202
- public function get_review_notice() {
203
-
204
- $review_url = 'https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/?filter=5';
205
-
206
- $optout_url = wp_nonce_url( add_query_arg( 'pa_review', 'opt_out' ), 'opt_out' );
207
- ?>
208
-
209
- <div class="error pa-notice-wrap pa-review-notice" data-notice="pa-review">
210
- <div class="pa-img-wrap">
211
- <img src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/pa-logo-symbol.png'; ?>">
212
- </div>
213
- <div class="pa-text-wrap">
214
- <?php echo $this->get_review_text( $review_url, $optout_url ); ?>
215
- </div>
216
- <div class="pa-notice-close">
217
- <a href="<?php echo esc_url( $optout_url ); ?>"><span class="dashicons dashicons-dismiss"></span></a>
218
- </div>
219
- </div>
220
-
221
- <?php
222
-
223
- }
224
-
225
- /**
226
- *
227
- * Shows admin notice for Christmas Sale.
228
- *
229
- * @since 4.4.1
230
- * @access public
231
- *
232
- * @return void
233
- */
234
- public function get_ch_notice() {
235
-
236
- $papro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
237
-
238
- $is_papro_installed = Helper_Functions::is_plugin_installed( $papro_path );
239
-
240
- $license_status = get_option( 'papro_license_status' );
241
-
242
- $ch_notice = get_option( 'ch21_notice' );
243
-
244
- if ( ( $is_papro_installed && 'valid' === $license_status ) || '1' === $ch_notice ) {
245
- return;
246
- }
247
-
248
- $link = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/christmas-sale/', 'wp-dash', 'christmas21-notification', 'christmas21' );
249
-
250
- ?>
251
-
252
- <div class="error pa-notice-wrap pa-new-feature-notice pa-review-notice">
253
- <div class="pa-img-wrap">
254
- <img src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/pa-logo-symbol.png'; ?>">
255
- </div>
256
- <div class="pa-text-wrap">
257
- <p>
258
- <?php echo __( 'Christmas Sale! Get <b>10% Discount</b> on Lifetime license for a Limited Time Only', 'premium-addons-for-elementor' ); ?>
259
- <a class="button button-primary" href="<?php echo esc_url( $link ); ?>" target="_blank">
260
- <span><?php echo __( 'Get The Deal', 'premium-addons-for-elementor' ); ?></span>
261
- </a>
262
- </p>
263
- </div>
264
- <div class="pa-notice-close" data-notice="ch21">
265
- <span class="dashicons dashicons-dismiss"></span>
266
- </div>
267
- </div>
268
-
269
- <?php
270
- }
271
-
272
- /**
273
- * Renders an admin notice error message
274
- *
275
- * @since 1.0.0
276
- * @access private
277
- *
278
- * @return void
279
- */
280
- private function render_admin_notices( $message, $class = '', $handle = '' ) {
281
- ?>
282
- <div class="error pa-new-feature-notice <?php echo $class; ?>" data-notice="<?php echo $handle; ?>">
283
- <?php echo $message; ?>
284
- </div>
285
- <?php
286
- }
287
-
288
- /*
289
- * Register admin scripts
290
- *
291
- * @since 3.2.8
292
- * @access public
293
- *
294
- */
295
- public function admin_enqueue_scripts() {
296
-
297
- wp_enqueue_script(
298
- 'pa-notice',
299
- PREMIUM_ADDONS_URL . 'admin/assets/js/pa-notice.js',
300
- array( 'jquery' ),
301
- PREMIUM_ADDONS_VERSION,
302
- true
303
- );
304
-
305
- wp_localize_script(
306
- 'pa-notice',
307
- 'PaNoticeSettings',
308
- array(
309
- 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
310
- 'nonce' => wp_create_nonce( 'pa-notice-nonce' ),
311
- )
312
- );
313
-
314
- }
315
-
316
- /**
317
- * Set transient for admin notice
318
- *
319
- * @since 3.2.8
320
- * @access public
321
- *
322
- * @return void
323
- */
324
- public function reset_admin_notice() {
325
-
326
- check_ajax_referer( 'pa-notice-nonce', 'nonce' );
327
-
328
- if ( ! Admin_Helper::check_user_can( 'manage_options' ) ) {
329
- wp_send_json_error();
330
- }
331
-
332
- $key = isset( $_POST['notice'] ) ? $_POST['notice'] : '';
333
-
334
- if ( ! empty( $key ) && in_array( $key, self::$notices, true ) ) {
335
-
336
- $cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
337
-
338
- set_transient( $cache_key, true, WEEK_IN_SECONDS );
339
-
340
- wp_send_json_success();
341
-
342
- } else {
343
-
344
- wp_send_json_error();
345
-
346
- }
347
-
348
- }
349
-
350
- /**
351
- * Dismiss admin notice
352
- *
353
- * @since 3.11.7
354
- * @access public
355
- *
356
- * @return void
357
- */
358
- public function dismiss_admin_notice() {
359
-
360
- check_ajax_referer( 'pa-notice-nonce', 'nonce' );
361
-
362
- if ( ! current_user_can( 'manage_options' ) ) {
363
- wp_send_json_error();
364
- }
365
-
366
- $key = isset( $_POST['notice'] ) ? $_POST['notice'] : '';
367
-
368
- if ( ! empty( $key ) && in_array( $key, self::$notices, true ) ) {
369
-
370
- update_option( $key, '1' );
371
-
372
- wp_send_json_success();
373
-
374
- } else {
375
-
376
- wp_send_json_error();
377
-
378
- }
379
-
380
- }
381
-
382
- /**
383
- * Creates and returns an instance of the class
384
- *
385
- * @since 2.8.4
386
- * @access public
387
- *
388
- * @return object
389
- */
390
- public static function get_instance() {
391
-
392
- if ( self::$instance == null ) {
393
-
394
- self::$instance = new self();
395
-
396
- }
397
-
398
- return self::$instance;
399
- }
400
-
401
- }
1
+ <?php
2
+
3
+ /**
4
+ * PA Admin Notices.
5
+ */
6
+ namespace PremiumAddons\Admin\Includes;
7
+
8
+ use PremiumAddons\Includes\Helper_Functions;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit();
12
+ }
13
+
14
+ /**
15
+ * Class Admin_Notices
16
+ */
17
+ class Admin_Notices {
18
+
19
+ /**
20
+ * Class object
21
+ *
22
+ * @var instance
23
+ */
24
+ private static $instance = null;
25
+
26
+ /**
27
+ * Elementor slug
28
+ *
29
+ * @var elementor
30
+ */
31
+ private static $elementor = 'elementor';
32
+
33
+ /**
34
+ * PAPRO Slug
35
+ *
36
+ * @var papro
37
+ */
38
+ private static $papro = 'premium-addons-pro';
39
+
40
+ /**
41
+ * Notices Keys
42
+ *
43
+ * @var notices
44
+ */
45
+ private static $notices = null;
46
+
47
+ /**
48
+ * Constructor for the class
49
+ */
50
+ public function __construct() {
51
+
52
+ add_action( 'admin_init', array( $this, 'init' ) );
53
+
54
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
55
+
56
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
57
+
58
+ add_action( 'wp_ajax_pa_reset_admin_notice', array( $this, 'reset_admin_notice' ) );
59
+
60
+ add_action( 'wp_ajax_pa_dismiss_admin_notice', array( $this, 'dismiss_admin_notice' ) );
61
+
62
+ self::$notices = array(
63
+ 'pa-review',
64
+ );
65
+
66
+ delete_option( 'ch21_notice' );
67
+
68
+ }
69
+
70
+ /**
71
+ * init required functions
72
+ */
73
+ public function init() {
74
+
75
+ $this->handle_review_notice();
76
+
77
+ }
78
+
79
+ /**
80
+ * init notices check functions
81
+ */
82
+ public function admin_notices() {
83
+
84
+ $this->required_plugins_check();
85
+
86
+ $cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
87
+
88
+ $response = get_transient( $cache_key );
89
+
90
+ $show_review = get_option( 'pa_review_notice' );
91
+
92
+ // Make sure Already did was not clicked before.
93
+ if ( '1' !== $show_review ) {
94
+ if ( false == $response ) {
95
+ $this->get_review_notice();
96
+ }
97
+ }
98
+
99
+ }
100
+
101
+ /**
102
+ * Handle Review Notice
103
+ *
104
+ * Checks if review message is dismissed.
105
+ *
106
+ * @access public
107
+ * @return void
108
+ */
109
+ public function handle_review_notice() {
110
+
111
+ if ( ! isset( $_GET['pa_review'] ) ) {
112
+ return;
113
+ }
114
+
115
+ if ( 'opt_out' === $_GET['pa_review'] ) {
116
+ check_admin_referer( 'opt_out' );
117
+
118
+ update_option( 'pa_review_notice', '1' );
119
+ }
120
+
121
+ wp_redirect( remove_query_arg( 'pa_review' ) );
122
+
123
+ exit;
124
+ }
125
+
126
+ /**
127
+ * Required plugin check
128
+ *
129
+ * Shows an admin notice when Elementor is missing.
130
+ *
131
+ * @access public
132
+ *
133
+ * @return boolean
134
+ */
135
+ public function required_plugins_check() {
136
+
137
+ $elementor_path = sprintf( '%1$s/%1$s.php', self::$elementor );
138
+
139
+ if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
140
+
141
+ if ( ! Helper_Functions::is_plugin_installed( $elementor_path ) ) {
142
+
143
+ if ( Admin_Helper::check_user_can( 'install_plugins' ) ) {
144
+
145
+ $install_url = wp_nonce_url( self_admin_url( sprintf( 'update.php?action=install-plugin&plugin=%s', self::$elementor ) ), 'install-plugin_elementor' );
146
+
147
+ $message = sprintf( '<p>%s</p>', __( 'Premium Addons for Elementor is not working because you need to Install Elementor plugin.', 'premium-addons-for-elementor' ) );
148
+
149
+ $message .= sprintf( '<p><a href="%s" class="button-primary">%s</a></p>', $install_url, __( 'Install Now', 'premium-addons-for-elementor' ) );
150
+
151
+ }
152
+ } else {
153
+
154
+ if ( Admin_Helper::check_user_can( 'activate_plugins' ) ) {
155
+
156
+ $activation_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $elementor_path . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $elementor_path );
157
+
158
+ $message = '<p>' . __( 'Premium Addons for Elementor is not working because you need to activate Elementor plugin.', 'premium-addons-for-elementor' ) . '</p>';
159
+
160
+ $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'premium-addons-for-elementor' ) ) . '</p>';
161
+
162
+ }
163
+ }
164
+ $this->render_admin_notices( $message );
165
+ }
166
+ }
167
+
168
+ /**
169
+ * Gets admin review notice HTML
170
+ *
171
+ * @since 2.8.4
172
+ * @return void
173
+ */
174
+ public function get_review_text( $review_url, $optout_url ) {
175
+
176
+ $notice = sprintf(
177
+ '<p>' . __( 'Can we take only 2 minutes of your time? We would be really grateful it if you give ', 'premium-addons-for-elementor' ) .
178
+ '<b>' . __( 'Premium Addons for Elementor', 'premium-addons-for-elementor' ) . '</b> a 5 Stars Rating on WordPress.org. By speading the love, we can create even greater free stuff in the future!</p>
179
+ <div>
180
+ <a class="button button-primary" href="%s" target="_blank"><span>' . __( 'Sure, leave a Review', 'premium-addons-for-elementor' ) . '</span></a>
181
+ <a class="button" href="%2$s"><span>' . __( 'I Already Did', 'premium-addons-for-elementor' ) . '</span></a>
182
+ <a class="button button-secondary pa-notice-reset"><span>' . __( 'Maybe Later', 'premium-addons-for-elementor' ) . '</span></a>
183
+ </div>',
184
+ $review_url,
185
+ $optout_url
186
+ );
187
+
188
+ return $notice;
189
+ }
190
+
191
+ /**
192
+ * Checks if review admin notice is dismissed
193
+ *
194
+ * @since 2.6.8
195
+ * @return void
196
+ */
197
+ public function get_review_notice() {
198
+
199
+ $review_url = 'https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/?filter=5';
200
+
201
+ $optout_url = wp_nonce_url( add_query_arg( 'pa_review', 'opt_out' ), 'opt_out' );
202
+ ?>
203
+
204
+ <div class="error pa-notice-wrap pa-review-notice" data-notice="pa-review">
205
+ <div class="pa-img-wrap">
206
+ <img src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/pa-logo-symbol.png'; ?>">
207
+ </div>
208
+ <div class="pa-text-wrap">
209
+ <?php echo $this->get_review_text( $review_url, $optout_url ); ?>
210
+ </div>
211
+ <div class="pa-notice-close">
212
+ <a href="<?php echo esc_url( $optout_url ); ?>"><span class="dashicons dashicons-dismiss"></span></a>
213
+ </div>
214
+ </div>
215
+
216
+ <?php
217
+
218
+ }
219
+
220
+ /**
221
+ * Renders an admin notice error message
222
+ *
223
+ * @since 1.0.0
224
+ * @access private
225
+ *
226
+ * @return void
227
+ */
228
+ private function render_admin_notices( $message, $class = '', $handle = '' ) {
229
+ ?>
230
+ <div class="error pa-new-feature-notice <?php echo $class; ?>" data-notice="<?php echo $handle; ?>">
231
+ <?php echo $message; ?>
232
+ </div>
233
+ <?php
234
+ }
235
+
236
+ /*
237
+ * Register admin scripts
238
+ *
239
+ * @since 3.2.8
240
+ * @access public
241
+ *
242
+ */
243
+ public function admin_enqueue_scripts() {
244
+
245
+ wp_enqueue_script(
246
+ 'pa-notice',
247
+ PREMIUM_ADDONS_URL . 'admin/assets/js/pa-notice.js',
248
+ array( 'jquery' ),
249
+ PREMIUM_ADDONS_VERSION,
250
+ true
251
+ );
252
+
253
+ wp_localize_script(
254
+ 'pa-notice',
255
+ 'PaNoticeSettings',
256
+ array(
257
+ 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
258
+ 'nonce' => wp_create_nonce( 'pa-notice-nonce' ),
259
+ )
260
+ );
261
+
262
+ }
263
+
264
+ /**
265
+ * Set transient for admin notice
266
+ *
267
+ * @since 3.2.8
268
+ * @access public
269
+ *
270
+ * @return void
271
+ */
272
+ public function reset_admin_notice() {
273
+
274
+ check_ajax_referer( 'pa-notice-nonce', 'nonce' );
275
+
276
+ if ( ! Admin_Helper::check_user_can( 'manage_options' ) ) {
277
+ wp_send_json_error();
278
+ }
279
+
280
+ $key = isset( $_POST['notice'] ) ? $_POST['notice'] : '';
281
+
282
+ if ( ! empty( $key ) && in_array( $key, self::$notices, true ) ) {
283
+
284
+ $cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
285
+
286
+ set_transient( $cache_key, true, WEEK_IN_SECONDS );
287
+
288
+ wp_send_json_success();
289
+
290
+ } else {
291
+
292
+ wp_send_json_error();
293
+
294
+ }
295
+
296
+ }
297
+
298
+ /**
299
+ * Dismiss admin notice
300
+ *
301
+ * @since 3.11.7
302
+ * @access public
303
+ *
304
+ * @return void
305
+ */
306
+ public function dismiss_admin_notice() {
307
+
308
+ check_ajax_referer( 'pa-notice-nonce', 'nonce' );
309
+
310
+ if ( ! current_user_can( 'manage_options' ) ) {
311
+ wp_send_json_error();
312
+ }
313
+
314
+ $key = isset( $_POST['notice'] ) ? $_POST['notice'] : '';
315
+
316
+ if ( ! empty( $key ) && in_array( $key, self::$notices, true ) ) {
317
+
318
+ update_option( $key, '1' );
319
+
320
+ wp_send_json_success();
321
+
322
+ } else {
323
+
324
+ wp_send_json_error();
325
+
326
+ }
327
+
328
+ }
329
+
330
+ /**
331
+ * Creates and returns an instance of the class
332
+ *
333
+ * @since 2.8.4
334
+ * @access public
335
+ *
336
+ * @return object
337
+ */
338
+ public static function get_instance() {
339
+
340
+ if ( self::$instance == null ) {
341
+
342
+ self::$instance = new self();
343
+
344
+ }
345
+
346
+ return self::$instance;
347
+ }
348
+
349
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/duplicator.php CHANGED
@@ -1,290 +1,298 @@
1
- <?php
2
- /**
3
- * PA Duplicator.
4
- */
5
-
6
- namespace PremiumAddons\Admin\Includes;
7
-
8
- use Elementor\Core\Files\CSS\Post as Post_CSS;
9
-
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit();
12
- }
13
-
14
- /**
15
- * Class Duplicator
16
- */
17
- class Duplicator {
18
-
19
- /**
20
- * PA Duplicator action.
21
- */
22
- const DUPLICATE_ACTION = 'pa_duplicator';
23
-
24
- /**
25
- * Class object
26
- *
27
- * @var instance
28
- */
29
- private static $instance = null;
30
-
31
- /**
32
- * Elementor slug
33
- *
34
- * @var elementor
35
- */
36
- private static $elementor = 'elementor';
37
-
38
- /**
39
- * PAPRO Slug
40
- *
41
- * @var papro
42
- */
43
- private static $papro = 'premium-addons-pro';
44
-
45
- /**
46
- * Constructor for the class
47
- */
48
- public function __construct() {
49
-
50
- add_action( 'admin_action_' . self::DUPLICATE_ACTION, array( $this, 'duplicate_post' ) );
51
-
52
- add_filter( 'post_row_actions', array( $this, 'add_duplicator_actions' ), 10, 2 );
53
-
54
- add_filter( 'page_row_actions', array( $this, 'add_duplicator_actions' ), 10, 2 );
55
-
56
- }
57
-
58
- /**
59
- * Add Duplicator Actions
60
- *
61
- * Add duplicator action links to posts/pages
62
- *
63
- * @access public
64
- * @since 3.9.7
65
- *
66
- * @param array $actions row actions.
67
- * @param object $post \WP_Post.
68
- * @return array
69
- */
70
- public function add_duplicator_actions( $actions, $post ) {
71
-
72
- if ( current_user_can( 'edit_posts' ) && post_type_supports( $post->post_type, 'elementor' ) ) {
73
-
74
- $actions[ self::DUPLICATE_ACTION ] = sprintf(
75
- '<a href="%1$s" title="%2$s"><span class="screen-reader-text">%2$s</span>%3$s</a>',
76
- esc_url( self::get_duplicate_url( $post->ID ) ),
77
- /* translators: %s: Post Title */
78
- sprintf( esc_attr__( 'Duplicate - %s', 'premium-addons-for-elementor' ), esc_attr( $post->post_title ) ),
79
- __( 'PA Duplicate', 'premium-addons-for-elementor' )
80
- );
81
-
82
- }
83
-
84
- return $actions;
85
- }
86
-
87
- /**
88
- * Get duplicate url
89
- *
90
- * @access public
91
- * @since 3.9.7
92
- *
93
- * @param integer $post_id item ID.
94
- * @return string
95
- */
96
- public static function get_duplicate_url( $post_id ) {
97
-
98
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
99
-
100
- return wp_nonce_url(
101
- add_query_arg(
102
- array(
103
- 'action' => self::DUPLICATE_ACTION,
104
- 'post_id' => $post_id,
105
- 'paged' => $paged,
106
- ),
107
- admin_url( 'admin.php' )
108
- ),
109
- self::DUPLICATE_ACTION
110
- );
111
- }
112
-
113
- /**
114
- * Duplicate required post/page
115
- *
116
- * @access public
117
- * @since 3.9.7
118
- *
119
- * @return void
120
- */
121
- public function duplicate_post() {
122
-
123
- if ( ! current_user_can( 'edit_posts' ) ) {
124
- return;
125
- }
126
-
127
- $nonce = isset( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : '';
128
- $post_id = isset( $_GET['post_id'] ) ? absint( $_GET['post_id'] ) : 0;
129
- $paged = isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
130
-
131
- if ( ! wp_verify_nonce( $nonce, self::DUPLICATE_ACTION ) ) {
132
- return;
133
- }
134
-
135
- if ( is_null( $post = get_post( $post_id ) ) ) {
136
- return;
137
- }
138
-
139
- $post = sanitize_post( $post, 'db' );
140
-
141
- $duplicated_post_id = self::insert_post( $post );
142
-
143
- $redirect = add_query_arg(
144
- array(
145
- 'post_type' => $post->post_type,
146
- 'paged' => $paged,
147
- ),
148
- admin_url( 'edit.php' )
149
- );
150
-
151
- if ( ! is_wp_error( $duplicated_post_id ) ) {
152
-
153
- self::duplicate_post_taxonomies( $post, $duplicated_post_id );
154
- self::duplicate_post_meta_data( $post, $duplicated_post_id );
155
-
156
- $css = Post_CSS::create( $duplicated_post_id );
157
- $css->update();
158
-
159
- }
160
-
161
- wp_safe_redirect( $redirect );
162
- die();
163
- }
164
-
165
- /**
166
- * Duplicate required post/page
167
- *
168
- * @access public
169
- * @since 3.9.7
170
- *
171
- * @param object $post WP_Post.
172
- */
173
- protected static function insert_post( $post ) {
174
-
175
- $current_user = wp_get_current_user();
176
-
177
- $post_meta = get_post_meta( $post->ID );
178
-
179
- $duplicated_post_args = array(
180
- 'post_status' => 'draft',
181
- 'post_type' => $post->post_type,
182
- 'post_parent' => $post->post_parent,
183
- 'post_content' => $post->post_content,
184
- 'menu_order' => $post->menu_order,
185
- 'ping_status' => $post->ping_status,
186
- 'post_excerpt' => $post->post_excerpt,
187
- 'post_password' => $post->post_password,
188
- 'comment_status' => $post->comment_status,
189
- 'to_ping' => $post->to_ping,
190
- 'post_author' => $current_user->ID,
191
- 'post_title' => sprintf(
192
- /* translators: 1: Post Title, 2: Post ID */
193
- __( '%1$s - Duplicate - [#%2$d]', 'premium-addons-for-elementor' ),
194
- $post->post_title,
195
- $post->ID
196
- ),
197
- );
198
-
199
- if ( isset( $post_meta['_elementor_edit_mode'][0] ) ) {
200
-
201
- $data = array(
202
- 'meta_input' => array(
203
- '_elementor_edit_mode' => $post_meta['_elementor_edit_mode'][0],
204
- '_elementor_template_type' => $post_meta['_elementor_template_type'][0],
205
- ),
206
- );
207
-
208
- $duplicated_post_args = array_merge( $duplicated_post_args, $data );
209
-
210
- }
211
-
212
- return wp_insert_post( $duplicated_post_args );
213
- }
214
-
215
- /**
216
- * Add post taxonomies to the cloned version
217
- *
218
- * @access public
219
- * @since 3.9.7
220
- *
221
- * @param object $post WP_Post.
222
- * @param integer $id item ID.
223
- */
224
- public static function duplicate_post_taxonomies( $post, $id ) {
225
-
226
- $taxonomies = get_object_taxonomies( $post->post_type );
227
-
228
- if ( ! empty( $taxonomies ) && is_array( $taxonomies ) ) {
229
- foreach ( $taxonomies as $taxonomy ) {
230
- $terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'slugs' ) );
231
- wp_set_object_terms( $id, $terms, $taxonomy, false );
232
- }
233
- }
234
- }
235
-
236
- /**
237
- * Add post meta data to the cloned version
238
- *
239
- * @access public
240
- * @since 3.9.7
241
- *
242
- * @param object $post WP_Post.
243
- * @param integer $id item ID.
244
- */
245
- public static function duplicate_post_meta_data( $post, $id ) {
246
-
247
- global $wpdb;
248
-
249
- $meta = $wpdb->get_results(
250
- $wpdb->prepare( "SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id = %d", $post->ID )
251
- );
252
-
253
- if ( ! empty( $meta ) && is_array( $meta ) ) {
254
-
255
- $query = "INSERT INTO {$wpdb->postmeta} ( post_id, meta_key, meta_value ) VALUES ";
256
-
257
- $_records = array();
258
-
259
- foreach ( $meta as $meta_info ) {
260
- $_value = wp_slash( $meta_info->meta_value );
261
- $_records[] = "( $id, '{$meta_info->meta_key}', '{$_value}' )";
262
- }
263
-
264
- $query .= implode( ', ', $_records ) . ';';
265
- $wpdb->query( $query );
266
- }
267
-
268
- }
269
-
270
-
271
- /**
272
- * Creates and returns an instance of the class
273
- *
274
- * @since 3.20.9
275
- * @access public
276
- *
277
- * @return object
278
- */
279
- public static function get_instance() {
280
-
281
- if ( ! isset( self::$instance ) ) {
282
-
283
- self::$instance = new self();
284
-
285
- }
286
-
287
- return self::$instance;
288
- }
289
-
290
- }
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * PA Duplicator.
4
+ */
5
+
6
+ namespace PremiumAddons\Admin\Includes;
7
+
8
+ use Elementor\Core\Files\CSS\Post as Post_CSS;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit();
12
+ }
13
+
14
+ /**
15
+ * Class Duplicator
16
+ */
17
+ class Duplicator {
18
+
19
+ /**
20
+ * PA Duplicator action.
21
+ */
22
+ const DUPLICATE_ACTION = 'pa_duplicator';
23
+
24
+ /**
25
+ * Class object
26
+ *
27
+ * @var instance
28
+ */
29
+ private static $instance = null;
30
+
31
+ /**
32
+ * Elementor slug
33
+ *
34
+ * @var elementor
35
+ */
36
+ private static $elementor = 'elementor';
37
+
38
+ /**
39
+ * PAPRO Slug
40
+ *
41
+ * @var papro
42
+ */
43
+ private static $papro = 'premium-addons-pro';
44
+
45
+ /**
46
+ * Constructor for the class
47
+ */
48
+ public function __construct() {
49
+
50
+ add_action( 'admin_action_' . self::DUPLICATE_ACTION, array( $this, 'duplicate_post' ) );
51
+
52
+ add_filter( 'post_row_actions', array( $this, 'add_duplicator_actions' ), 10, 2 );
53
+
54
+ add_filter( 'page_row_actions', array( $this, 'add_duplicator_actions' ), 10, 2 );
55
+
56
+ }
57
+
58
+ /**
59
+ * Add Duplicator Actions
60
+ *
61
+ * Add duplicator action links to posts/pages
62
+ *
63
+ * @access public
64
+ * @since 3.9.7
65
+ *
66
+ * @param array $actions row actions.
67
+ * @param object $post \WP_Post.
68
+ * @return array
69
+ */
70
+ public function add_duplicator_actions( $actions, $post ) {
71
+
72
+ if ( current_user_can( 'edit_posts' ) && post_type_supports( $post->post_type, 'elementor' ) ) {
73
+
74
+ $actions[ self::DUPLICATE_ACTION ] = sprintf(
75
+ '<a href="%1$s" title="%2$s"><span class="screen-reader-text">%2$s</span>%3$s</a>',
76
+ esc_url( self::get_duplicate_url( $post->ID ) ),
77
+ /* translators: %s: Post Title */
78
+ sprintf( esc_attr__( 'Duplicate - %s', 'premium-addons-for-elementor' ), esc_attr( $post->post_title ) ),
79
+ __( 'PA Duplicate', 'premium-addons-for-elementor' )
80
+ );
81
+
82
+ }
83
+
84
+ return $actions;
85
+ }
86
+
87
+ /**
88
+ * Get duplicate url
89
+ *
90
+ * @access public
91
+ * @since 3.9.7
92
+ *
93
+ * @param integer $post_id item ID.
94
+ * @return string
95
+ */
96
+ public static function get_duplicate_url( $post_id ) {
97
+
98
+ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
99
+
100
+ return wp_nonce_url(
101
+ add_query_arg(
102
+ array(
103
+ 'action' => self::DUPLICATE_ACTION,
104
+ 'post_id' => $post_id,
105
+ 'paged' => $paged,
106
+ ),
107
+ admin_url( 'admin.php' )
108
+ ),
109
+ self::DUPLICATE_ACTION
110
+ );
111
+ }
112
+
113
+ /**
114
+ * Duplicate required post/page
115
+ *
116
+ * @access public
117
+ * @since 3.9.7
118
+ *
119
+ * @return void
120
+ */
121
+ public function duplicate_post() {
122
+
123
+ if ( ! current_user_can( 'edit_posts' ) ) {
124
+ return;
125
+ }
126
+
127
+ $nonce = isset( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : '';
128
+ $post_id = isset( $_GET['post_id'] ) ? absint( $_GET['post_id'] ) : 0;
129
+ $paged = isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
130
+
131
+ if ( ! wp_verify_nonce( $nonce, self::DUPLICATE_ACTION ) ) {
132
+ return;
133
+ }
134
+
135
+ if ( is_null( $post = get_post( $post_id ) ) ) {
136
+ return;
137
+ }
138
+
139
+ $post = sanitize_post( $post, 'db' );
140
+
141
+ $duplicated_post_id = self::insert_post( $post );
142
+
143
+ $redirect = add_query_arg(
144
+ array(
145
+ 'post_type' => $post->post_type,
146
+ 'paged' => $paged,
147
+ ),
148
+ admin_url( 'edit.php' )
149
+ );
150
+
151
+ if ( ! is_wp_error( $duplicated_post_id ) ) {
152
+
153
+ self::duplicate_post_taxonomies( $post, $duplicated_post_id );
154
+ self::duplicate_post_meta_data( $post, $duplicated_post_id );
155
+
156
+ $css = Post_CSS::create( $duplicated_post_id );
157
+ $css->update();
158
+
159
+ }
160
+
161
+ wp_safe_redirect( $redirect );
162
+ die();
163
+ }
164
+
165
+ /**
166
+ * Duplicate required post/page
167
+ *
168
+ * @access public
169
+ * @since 3.9.7
170
+ *
171
+ * @param object $post WP_Post.
172
+ */
173
+ protected static function insert_post( $post ) {
174
+
175
+ $current_user = wp_get_current_user();
176
+
177
+ $post_meta = get_post_meta( $post->ID );
178
+
179
+ $duplicated_post_args = array(
180
+ 'post_status' => 'draft',
181
+ 'post_type' => $post->post_type,
182
+ 'post_parent' => $post->post_parent,
183
+ 'post_content' => $post->post_content,
184
+ 'menu_order' => $post->menu_order,
185
+ 'ping_status' => $post->ping_status,
186
+ 'post_excerpt' => $post->post_excerpt,
187
+ 'post_password' => $post->post_password,
188
+ 'comment_status' => $post->comment_status,
189
+ 'to_ping' => $post->to_ping,
190
+ 'post_author' => $current_user->ID,
191
+ 'post_title' => sprintf(
192
+ /* translators: 1: Post Title, 2: Post ID */
193
+ __( '%1$s - Duplicate - [#%2$d]', 'premium-addons-for-elementor' ),
194
+ $post->post_title,
195
+ $post->ID
196
+ ),
197
+ );
198
+
199
+ if ( isset( $post_meta['_elementor_edit_mode'][0] ) ) {
200
+
201
+ $data = array(
202
+ 'meta_input' => array(
203
+ '_elementor_edit_mode' => $post_meta['_elementor_edit_mode'][0],
204
+ '_elementor_template_type' => $post_meta['_elementor_template_type'][0],
205
+ ),
206
+ );
207
+
208
+ $duplicated_post_args = array_merge( $duplicated_post_args, $data );
209
+
210
+ }
211
+
212
+ return wp_insert_post( $duplicated_post_args );
213
+ }
214
+
215
+ /**
216
+ * Add post taxonomies to the cloned version
217
+ *
218
+ * @access public
219
+ * @since 3.9.7
220
+ *
221
+ * @param object $post WP_Post.
222
+ * @param integer $id item ID.
223
+ */
224
+ public static function duplicate_post_taxonomies( $post, $id ) {
225
+
226
+ $taxonomies = get_object_taxonomies( $post->post_type );
227
+
228
+ if ( ! empty( $taxonomies ) && is_array( $taxonomies ) ) {
229
+ foreach ( $taxonomies as $taxonomy ) {
230
+ $terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'slugs' ) );
231
+ wp_set_object_terms( $id, $terms, $taxonomy, false );
232
+ }
233
+ }
234
+ }
235
+
236
+ /**
237
+ * Add post meta data to the cloned version
238
+ *
239
+ * @access public
240
+ * @since 3.9.7
241
+ *
242
+ * @param object $post WP_Post.
243
+ * @param integer $id item ID.
244
+ */
245
+ public static function duplicate_post_meta_data( $post, $id ) {
246
+
247
+ global $wpdb;
248
+
249
+ $postmeta = esc_sql( $wpdb->postmeta );
250
+
251
+ $post_id = esc_sql( $post->ID );
252
+
253
+ $meta = $wpdb->get_results(
254
+ $wpdb->prepare( "SELECT meta_key, meta_value FROM {$postmeta} WHERE post_id = %d", $post_id )
255
+ );
256
+
257
+ if ( ! empty( $meta ) && is_array( $meta ) ) {
258
+
259
+ $query = "INSERT INTO {$postmeta} ( post_id, meta_key, meta_value ) VALUES ";
260
+
261
+ $_records = array();
262
+
263
+ foreach ( $meta as $meta_info ) {
264
+
265
+ $meta_value = wp_slash( $meta_info->meta_value );
266
+ $meta_key = sanitize_text_field( $meta_info->meta_key );
267
+
268
+ $_value = $meta_value;
269
+ $_records[] = "( $id, '{$meta_key}', '{$_value}' )";
270
+ }
271
+
272
+ $query .= implode( ', ', $_records ) . ';';
273
+ $wpdb->query( $wpdb->prepare( $query ) );
274
+ }
275
+
276
+ }
277
+
278
+
279
+ /**
280
+ * Creates and returns an instance of the class
281
+ *
282
+ * @since 3.20.9
283
+ * @access public
284
+ *
285
+ * @return object
286
+ */
287
+ public static function get_instance() {
288
+
289
+ if ( ! isset( self::$instance ) ) {
290
+
291
+ self::$instance = new self();
292
+
293
+ }
294
+
295
+ return self::$instance;
296
+ }
297
+
298
+ }
assets/frontend/js/premium-floating-effects.js CHANGED
@@ -260,6 +260,9 @@
260
  return (element.cid == $index);
261
  });
262
 
 
 
 
263
  return $arr[widgetIndex].attributes.elements.models;
264
  }
265
 
@@ -278,6 +281,9 @@
278
  return (element.cid === $index);
279
  });
280
 
 
 
 
281
  return $arr[widgetIndex].attributes.settings.attributes;
282
  }
283
 
260
  return (element.cid == $index);
261
  });
262
 
263
+ if (!$arr[widgetIndex])
264
+ return;
265
+
266
  return $arr[widgetIndex].attributes.elements.models;
267
  }
268
 
281
  return (element.cid === $index);
282
  });
283
 
284
+ if (!$arr[widgetIndex])
285
+ return;
286
+
287
  return $arr[widgetIndex].attributes.settings.attributes;
288
  }
289
 
assets/frontend/min-js/premium-floating-effects.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(h){if(h.hasClass("premium-floating-effects-yes")){var u=h,b=u.data("model-cid"),w={},l=h.find(".elementor-widget-container")[0],S=h.closest(".elementor-section").hasClass("elementor-inner-section"),x=S?h.closest(".elementor-inner-section").data("model-cid"):h.closest(".elementor-top-section").data("model-cid"),k=S?h.closest(".elementor-inner-column").data("model-cid"):h.closest(".elementor-top-column").data("model-cid"),e=elementorFrontend.isEditMode();if(!(w=(e?function(){var e=null;if(!window.elementor.hasOwnProperty("elements"))return!1;if(e=window.elementor.elements.models,S){var t={col:h.closest(".elementor-top-column"),colId:h.closest(".elementor-top-column").data("model-cid"),sec:h.closest(".elementor-top-section"),secId:h.closest(".elementor-top-section").data("model-cid")},a=X(e,t.secId),r=X(a,t.colId);e=r}if(!e)return!1;var i=X(e,x),o=function(e,t){if(!e)return;var a=e.findIndex(function(e){return e.cid===t});return e[a].attributes.settings.attributes}(X(i,k),b);if(!o)return!1;if("yes"!==o.premium_fe_switcher||0===o.length)return!1;var _=o.premium_fe_easing;"steps"===o.premium_fe_easing&&(_="steps("+o.premium_fe_ease_step+")");var s={target:o.premium_fe_target,direction:o.premium_fe_direction,loop:"default"===o.premium_fe_loop||o.premium_fe_loop_number,easing:_};if(w.general=s,"yes"===o.premium_fe_translate_switcher){var m={x_param_from:o.premium_fe_Xtranslate.sizes.from,x_param_to:o.premium_fe_Xtranslate.sizes.to,y_param_from:o.premium_fe_Ytranslate.sizes.from,y_param_to:o.premium_fe_Ytranslate.sizes.to,duration:o.premium_fe_trans_duration.size,delay:o.premium_fe_trans_delay.size};w.translate=m}if("yes"===o.premium_fe_rotate_switcher){var n={x_param_from:o.premium_fe_Xrotate.sizes.from,x_param_to:o.premium_fe_Xrotate.sizes.to,y_param_from:o.premium_fe_Yrotate.sizes.from,y_param_to:o.premium_fe_Yrotate.sizes.to,z_param_from:o.premium_fe_Zrotate.sizes.from,z_param_to:o.premium_fe_Zrotate.sizes.to,duration:o.premium_fe_rotate_duration.size,delay:o.premium_fe_rotate_delay.size};w.rotate=n}if("yes"===o.premium_fe_scale_switcher){var u={x_param_from:o.premium_fe_Xscale.sizes.from,x_param_to:o.premium_fe_Xscale.sizes.to,y_param_from:o.premium_fe_Yscale.sizes.from,y_param_to:o.premium_fe_Yscale.sizes.to,duration:o.premium_fe_scale_duration.size,delay:o.premium_fe_scale_delay.size};w.scale=u}if("yes"===o.premium_fe_skew_switcher){var l={x_param_from:o.premium_fe_Xskew.sizes.from,x_param_to:o.premium_fe_Xskew.sizes.to,y_param_from:o.premium_fe_Yskew.sizes.from,y_param_to:o.premium_fe_Yskew.sizes.to,duration:o.premium_fe_trans_duration.size,delay:o.premium_fe_trans_delay.size};w.skew=l}if(PremiumFESettings.papro_installed){if("yes"===o.premium_fe_opacity_switcher){var f={from:o.premium_fe_opacity.sizes.from/100,to:o.premium_fe_opacity.sizes.to/100,duration:o.premium_fe_opacity_duration.size,delay:o.premium_fe_opacity_delay.size};w.opacity=f}if("yes"===o.premium_fe_bg_color_switcher){var d={from:o.premium_fe_bg_color_from,to:o.premium_fe_bg_color_to,duration:o.premium_fe_bg_color_duration.size,delay:o.premium_fe_bg_color_delay.size};w.bg_color=d}if("yes"===o.premium_fe_blur_switcher){var p={from:"blur("+o.premium_fe_blur_val.sizes.from+"px)",to:"blur("+o.premium_fe_blur_val.sizes.to+"px)",duration:o.premium_fe_blur_duration.size,delay:o.premium_fe_blur_delay.size};w.blur=p}if("yes"===o.premium_fe_contrast_switcher){var c={from:"contrast("+o.premium_fe_contrast_val.sizes.from+"%)",to:"contrast("+o.premium_fe_contrast_val.sizes.to+"%)",duration:o.premium_fe_contrast_duration.size,delay:o.premium_fe_contrast_delay.size};w.contrast=c}if("yes"===o.premium_fe_gScale_switcher){var y={from:"grayscale("+o.premium_fe_gScale_val.sizes.from+"%)",to:"grayscale("+o.premium_fe_gScale_val.sizes.to+"%)",duration:o.premium_fe_gScale_duration.size,delay:o.premium_fe_gScale_delay.size};w.gScale=y}if("yes"===o.premium_fe_hue_switcher){var g={from:"hue-rotate("+o.premium_fe_hue_val.sizes.from+"deg)",to:"hue-rotate("+o.premium_fe_hue_val.sizes.to+"deg)",duration:o.premium_fe_hue_duration.size,delay:o.premium_fe_hue_delay.size};w.hue=g}if("yes"===o.premium_fe_brightness_switcher){var v={from:"brightness("+o.premium_fe_brightness_val.sizes.from+"%)",to:"brightness("+o.premium_fe_brightness_val.sizes.to+"%)",duration:o.premium_fe_brightness_duration.size,delay:o.premium_fe_brightness_delay.size};w.bright=v}if("yes"===o.premium_fe_saturate_switcher){var z={from:"saturate("+o.premium_fe_saturate_val.sizes.from+"%)",to:"saturate("+o.premium_fe_saturate_val.sizes.to+"%)",duration:o.premium_fe_saturate_duration.size,delay:o.premium_fe_saturate_delay.size};w.saturate=z}}return 0!==Object.keys(w).length&&w}:function(){var e=u.data("general_settings"),t={translateSettings:u.data("translate_effect"),rotateSettings:u.data("rotate_effect"),scaleSettings:u.data("scale_effect"),skewSettings:u.data("skew_effect"),opacitySettings:u.data("opacity_effect"),bgColorSettings:u.data("bg_color_effect"),bRadiusSettings:u.data("b_radius_effect"),hueSettings:u.data("hue_effect"),gScaleSettings:u.data("gray_effect"),contrastSettings:u.data("contrast_effect"),blurSettings:u.data("blur_effect"),brightSettings:u.data("brightness_effect"),saturateSettings:u.data("saturate_effect")};if(-1===Object.values(t).findIndex(function(e){return void 0!==e}))return!1;if(w.general=e,w.translate=t.translateSettings,w.rotate=t.rotateSettings,w.scale=t.scaleSettings,w.skew=t.skewSettings,w.opacity=t.opacitySettings,w.bg_color=t.bgColorSettings,w.blur=t.blurSettings,w.hue=t.hueSettings,w.gScale=t.gScaleSettings,w.contrast=t.contrastSettings,w.bright=t.brightSettings,w.saturate=t.saturateSettings,0!==Object.keys(w).length)return w})()))return!1;!function(){if(w.general.target){var e=w.general.target;l=0<u.find(e).length?".elementor-element-"+u.data("id")+" "+e:e}var t={targets:l,loop:w.general.loop,direction:w.general.direction,easing:w.general.easing};if(w.translate){var a=w.translate;x_translate={value:[a.x_param_from||0,a.x_param_to||0],duration:a.duration,delay:a.delay||0},y_translate={value:[a.y_param_from||0,a.y_param_to||0],duration:a.duration,delay:a.delay||0},t.translateX=x_translate,t.translateY=y_translate}if(w.rotate){a=w.rotate;x_rotate={duration:a.duration,delay:a.delay||0,value:[a.x_param_from||0,a.x_param_to||0]},y_rotate={duration:a.duration,delay:a.delay||0,value:[a.y_param_from||0,a.y_param_to||0]},z_rotate={duration:a.duration,delay:a.delay||0,value:[a.z_param_from||0,a.z_param_to||0]},t.rotateX=x_rotate,t.rotateY=y_rotate,t.rotateZ=z_rotate}if(w.scale){a=w.scale;x_scale={value:[a.x_param_from||0,a.x_param_to||0],duration:a.duration,delay:a.delay||0},y_scale={value:[a.y_param_from||0,a.y_param_to||0],duration:a.duration,delay:a.delay||0},t.scaleX=x_scale,t.scaleY=y_scale}if(w.skew){a=w.skew;x_skew={value:[a.x_param_from||0,a.x_param_to||0],duration:a.duration,delay:a.delay||0},y_skew={value:[a.y_param_from||0,a.y_param_to||0],duration:a.duration,delay:a.delay||0},t.skewX=x_skew,t.skewY=y_skew}if(w.opacity){a=w.opacity;t.opacity={value:[a.from||0,a.to||0],duration:a.duration,delay:a.delay||0}}if(w.bg_color){a=w.bg_color;t.backgroundColor={value:[a.from||0,a.to||0],duration:a.duration,delay:a.delay||0}}var r=[];if(w.blur){var i={value:[(a=w.blur).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(i)}if(w.gScale){var o={value:[(a=w.gScale).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(o)}if(w.hue){var _={value:[(a=w.hue).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(_)}if(w.contrast){var s={value:[(a=w.contrast).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(s)}if(w.bright){var m={value:[(a=w.bright).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(m)}if(w.saturate){var n={value:[(a=w.saturate).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(n)}0!==r.length&&(t.filter=r);anime(t)}()}function X(e,t){if(e){var a=e.findIndex(function(e){return e.cid==t});return e[a].attributes.elements.models}}})});
1
+ jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(h){if(h.hasClass("premium-floating-effects-yes")){var u=h,b=u.data("model-cid"),w={},l=h.find(".elementor-widget-container")[0],S=h.closest(".elementor-section").hasClass("elementor-inner-section"),x=S?h.closest(".elementor-inner-section").data("model-cid"):h.closest(".elementor-top-section").data("model-cid"),k=S?h.closest(".elementor-inner-column").data("model-cid"):h.closest(".elementor-top-column").data("model-cid"),e=elementorFrontend.isEditMode();if(!(w=(e?function(){var e=null;if(!window.elementor.hasOwnProperty("elements"))return!1;if(e=window.elementor.elements.models,S){var t={col:h.closest(".elementor-top-column"),colId:h.closest(".elementor-top-column").data("model-cid"),sec:h.closest(".elementor-top-section"),secId:h.closest(".elementor-top-section").data("model-cid")},a=X(e,t.secId),r=X(a,t.colId);e=r}if(!e)return!1;var i=X(e,x),o=function(e,t){if(!e)return;var a=e.findIndex(function(e){return e.cid===t});if(!e[a])return;return e[a].attributes.settings.attributes}(X(i,k),b);if(!o)return!1;if("yes"!==o.premium_fe_switcher||0===o.length)return!1;var _=o.premium_fe_easing;"steps"===o.premium_fe_easing&&(_="steps("+o.premium_fe_ease_step+")");var s={target:o.premium_fe_target,direction:o.premium_fe_direction,loop:"default"===o.premium_fe_loop||o.premium_fe_loop_number,easing:_};if(w.general=s,"yes"===o.premium_fe_translate_switcher){var m={x_param_from:o.premium_fe_Xtranslate.sizes.from,x_param_to:o.premium_fe_Xtranslate.sizes.to,y_param_from:o.premium_fe_Ytranslate.sizes.from,y_param_to:o.premium_fe_Ytranslate.sizes.to,duration:o.premium_fe_trans_duration.size,delay:o.premium_fe_trans_delay.size};w.translate=m}if("yes"===o.premium_fe_rotate_switcher){var n={x_param_from:o.premium_fe_Xrotate.sizes.from,x_param_to:o.premium_fe_Xrotate.sizes.to,y_param_from:o.premium_fe_Yrotate.sizes.from,y_param_to:o.premium_fe_Yrotate.sizes.to,z_param_from:o.premium_fe_Zrotate.sizes.from,z_param_to:o.premium_fe_Zrotate.sizes.to,duration:o.premium_fe_rotate_duration.size,delay:o.premium_fe_rotate_delay.size};w.rotate=n}if("yes"===o.premium_fe_scale_switcher){var u={x_param_from:o.premium_fe_Xscale.sizes.from,x_param_to:o.premium_fe_Xscale.sizes.to,y_param_from:o.premium_fe_Yscale.sizes.from,y_param_to:o.premium_fe_Yscale.sizes.to,duration:o.premium_fe_scale_duration.size,delay:o.premium_fe_scale_delay.size};w.scale=u}if("yes"===o.premium_fe_skew_switcher){var l={x_param_from:o.premium_fe_Xskew.sizes.from,x_param_to:o.premium_fe_Xskew.sizes.to,y_param_from:o.premium_fe_Yskew.sizes.from,y_param_to:o.premium_fe_Yskew.sizes.to,duration:o.premium_fe_trans_duration.size,delay:o.premium_fe_trans_delay.size};w.skew=l}if(PremiumFESettings.papro_installed){if("yes"===o.premium_fe_opacity_switcher){var f={from:o.premium_fe_opacity.sizes.from/100,to:o.premium_fe_opacity.sizes.to/100,duration:o.premium_fe_opacity_duration.size,delay:o.premium_fe_opacity_delay.size};w.opacity=f}if("yes"===o.premium_fe_bg_color_switcher){var d={from:o.premium_fe_bg_color_from,to:o.premium_fe_bg_color_to,duration:o.premium_fe_bg_color_duration.size,delay:o.premium_fe_bg_color_delay.size};w.bg_color=d}if("yes"===o.premium_fe_blur_switcher){var p={from:"blur("+o.premium_fe_blur_val.sizes.from+"px)",to:"blur("+o.premium_fe_blur_val.sizes.to+"px)",duration:o.premium_fe_blur_duration.size,delay:o.premium_fe_blur_delay.size};w.blur=p}if("yes"===o.premium_fe_contrast_switcher){var c={from:"contrast("+o.premium_fe_contrast_val.sizes.from+"%)",to:"contrast("+o.premium_fe_contrast_val.sizes.to+"%)",duration:o.premium_fe_contrast_duration.size,delay:o.premium_fe_contrast_delay.size};w.contrast=c}if("yes"===o.premium_fe_gScale_switcher){var y={from:"grayscale("+o.premium_fe_gScale_val.sizes.from+"%)",to:"grayscale("+o.premium_fe_gScale_val.sizes.to+"%)",duration:o.premium_fe_gScale_duration.size,delay:o.premium_fe_gScale_delay.size};w.gScale=y}if("yes"===o.premium_fe_hue_switcher){var g={from:"hue-rotate("+o.premium_fe_hue_val.sizes.from+"deg)",to:"hue-rotate("+o.premium_fe_hue_val.sizes.to+"deg)",duration:o.premium_fe_hue_duration.size,delay:o.premium_fe_hue_delay.size};w.hue=g}if("yes"===o.premium_fe_brightness_switcher){var v={from:"brightness("+o.premium_fe_brightness_val.sizes.from+"%)",to:"brightness("+o.premium_fe_brightness_val.sizes.to+"%)",duration:o.premium_fe_brightness_duration.size,delay:o.premium_fe_brightness_delay.size};w.bright=v}if("yes"===o.premium_fe_saturate_switcher){var z={from:"saturate("+o.premium_fe_saturate_val.sizes.from+"%)",to:"saturate("+o.premium_fe_saturate_val.sizes.to+"%)",duration:o.premium_fe_saturate_duration.size,delay:o.premium_fe_saturate_delay.size};w.saturate=z}}return 0!==Object.keys(w).length&&w}:function(){var e=u.data("general_settings"),t={translateSettings:u.data("translate_effect"),rotateSettings:u.data("rotate_effect"),scaleSettings:u.data("scale_effect"),skewSettings:u.data("skew_effect"),opacitySettings:u.data("opacity_effect"),bgColorSettings:u.data("bg_color_effect"),bRadiusSettings:u.data("b_radius_effect"),hueSettings:u.data("hue_effect"),gScaleSettings:u.data("gray_effect"),contrastSettings:u.data("contrast_effect"),blurSettings:u.data("blur_effect"),brightSettings:u.data("brightness_effect"),saturateSettings:u.data("saturate_effect")};if(-1===Object.values(t).findIndex(function(e){return void 0!==e}))return!1;if(w.general=e,w.translate=t.translateSettings,w.rotate=t.rotateSettings,w.scale=t.scaleSettings,w.skew=t.skewSettings,w.opacity=t.opacitySettings,w.bg_color=t.bgColorSettings,w.blur=t.blurSettings,w.hue=t.hueSettings,w.gScale=t.gScaleSettings,w.contrast=t.contrastSettings,w.bright=t.brightSettings,w.saturate=t.saturateSettings,0!==Object.keys(w).length)return w})()))return!1;!function(){if(w.general.target){var e=w.general.target;l=0<u.find(e).length?".elementor-element-"+u.data("id")+" "+e:e}var t={targets:l,loop:w.general.loop,direction:w.general.direction,easing:w.general.easing};if(w.translate){var a=w.translate;x_translate={value:[a.x_param_from||0,a.x_param_to||0],duration:a.duration,delay:a.delay||0},y_translate={value:[a.y_param_from||0,a.y_param_to||0],duration:a.duration,delay:a.delay||0},t.translateX=x_translate,t.translateY=y_translate}if(w.rotate){a=w.rotate;x_rotate={duration:a.duration,delay:a.delay||0,value:[a.x_param_from||0,a.x_param_to||0]},y_rotate={duration:a.duration,delay:a.delay||0,value:[a.y_param_from||0,a.y_param_to||0]},z_rotate={duration:a.duration,delay:a.delay||0,value:[a.z_param_from||0,a.z_param_to||0]},t.rotateX=x_rotate,t.rotateY=y_rotate,t.rotateZ=z_rotate}if(w.scale){a=w.scale;x_scale={value:[a.x_param_from||0,a.x_param_to||0],duration:a.duration,delay:a.delay||0},y_scale={value:[a.y_param_from||0,a.y_param_to||0],duration:a.duration,delay:a.delay||0},t.scaleX=x_scale,t.scaleY=y_scale}if(w.skew){a=w.skew;x_skew={value:[a.x_param_from||0,a.x_param_to||0],duration:a.duration,delay:a.delay||0},y_skew={value:[a.y_param_from||0,a.y_param_to||0],duration:a.duration,delay:a.delay||0},t.skewX=x_skew,t.skewY=y_skew}if(w.opacity){a=w.opacity;t.opacity={value:[a.from||0,a.to||0],duration:a.duration,delay:a.delay||0}}if(w.bg_color){a=w.bg_color;t.backgroundColor={value:[a.from||0,a.to||0],duration:a.duration,delay:a.delay||0}}var r=[];if(w.blur){var i={value:[(a=w.blur).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(i)}if(w.gScale){var o={value:[(a=w.gScale).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(o)}if(w.hue){var _={value:[(a=w.hue).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(_)}if(w.contrast){var s={value:[(a=w.contrast).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(s)}if(w.bright){var m={value:[(a=w.bright).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(m)}if(w.saturate){var n={value:[(a=w.saturate).from||0,a.to||0],duration:a.duration,delay:a.delay||0};r.push(n)}0!==r.length&&(t.filter=r);anime(t)}()}function X(e,t){if(e){var a=e.findIndex(function(e){return e.cid==t});if(e[a])return e[a].attributes.elements.models}}})});
modules/woocommerce/skins/skin-1.php CHANGED
@@ -734,7 +734,7 @@ class Skin_1 extends Skin_Base {
734
  ),
735
  ),
736
  'selectors' => array(
737
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
738
  ),
739
  )
740
  );
@@ -904,7 +904,7 @@ class Skin_1 extends Skin_Base {
904
  ),
905
  ),
906
  'selectors' => array(
907
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
908
  ),
909
  )
910
  );
734
  ),
735
  ),
736
  'selectors' => array(
737
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
738
  ),
739
  )
740
  );
904
  ),
905
  ),
906
  'selectors' => array(
907
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
908
  ),
909
  )
910
  );
modules/woocommerce/skins/skin-2.php CHANGED
@@ -752,7 +752,7 @@ class Skin_2 extends Skin_Base {
752
  ),
753
  ),
754
  'selectors' => array(
755
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
756
  ),
757
  )
758
  );
@@ -920,7 +920,7 @@ class Skin_2 extends Skin_Base {
920
  ),
921
  ),
922
  'selectors' => array(
923
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
924
  ),
925
  )
926
  );
752
  ),
753
  ),
754
  'selectors' => array(
755
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
756
  ),
757
  )
758
  );
920
  ),
921
  ),
922
  'selectors' => array(
923
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
924
  ),
925
  )
926
  );
modules/woocommerce/skins/skin-3.php CHANGED
@@ -1,1198 +1,1198 @@
1
- <?php
2
-
3
- namespace PremiumAddons\Modules\Woocommerce\Skins;
4
-
5
- use Elementor\Controls_Manager;
6
- use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
7
- use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
8
- use Elementor\Repeater;
9
- use Elementor\Group_Control_Typography;
10
- use Elementor\Group_Control_Background;
11
- use Elementor\Group_Control_Box_Shadow;
12
- use Elementor\Group_Control_Text_Shadow;
13
- use Elementor\Group_Control_Border;
14
-
15
-
16
- use PremiumAddons\Modules\Woocommerce\TemplateBlocks\Skin_Init;
17
-
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit; // If this file is called directly, abort.
20
- }
21
-
22
- /**
23
- * Class Skin_Grid_Default
24
- *
25
- * @property Products $parent
26
- */
27
- class Skin_3 extends Skin_Base {
28
-
29
- /**
30
- * Get ID.
31
- *
32
- * @since 4.7.0
33
- * @access public
34
- */
35
- public function get_id() {
36
- return 'grid-3';
37
- }
38
-
39
- /**
40
- * Get title.
41
- *
42
- * @since 4.7.0
43
- * @access public
44
- */
45
- public function get_title() {
46
- return __( 'Skin 3', 'premium-addons-for-elementor' );
47
- }
48
-
49
- /**
50
- * Register control actions.
51
- *
52
- * @since 4.7.0
53
- * @access protected
54
- */
55
- protected function _register_controls_actions() {
56
-
57
- // Content Controls
58
- add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_display_options_controls' ) );
59
-
60
- // Sale Ribbon Controls
61
- add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_sale_products_controls' ) );
62
-
63
- // Featured Ribbon Controls
64
- add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_featured_products_controls' ) );
65
-
66
- // Quick View Controls
67
- add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_quick_view_controls' ) );
68
-
69
- // Image Style
70
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_content_style' ) );
71
-
72
- // Product Title Style
73
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_title_style' ) );
74
-
75
- // Product Category Style
76
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_category_style' ) );
77
-
78
- // Product Description Style
79
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_excerpt_style' ) );
80
-
81
- // Product CTA Style
82
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_cta_style' ) );
83
-
84
- // Product Sale Ribbon Style
85
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_sale_style_controls' ) );
86
-
87
- // Product Featured Ribbon Style
88
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_featured_style_controls' ) );
89
-
90
- // Product Featured Ribbon Style
91
- add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_quick_style_controls' ), 30 );
92
-
93
- parent::_register_controls_actions();
94
- }
95
-
96
- /**
97
- * Register content control section.
98
- *
99
- * @since 4.7.0
100
- * @access public
101
- */
102
- public function register_display_options_controls() {
103
-
104
- $this->start_controls_section(
105
- 'section_content_field',
106
- array(
107
- 'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
108
- )
109
- );
110
-
111
- $this->add_control(
112
- 'product_image',
113
- array(
114
- 'label' => __( 'Image', 'premium-addons-for-elementor' ),
115
- 'type' => Controls_Manager::SWITCHER,
116
- 'default' => 'yes',
117
- )
118
- );
119
-
120
- $repeater = new REPEATER();
121
-
122
- $repeater->add_control(
123
- 'product_segment',
124
- array(
125
- 'label' => __( 'Select Product Segment', 'premium-addons-for-elementor' ),
126
- 'type' => Controls_Manager::SELECT,
127
- 'options' => array(
128
- 'title' => __( 'Title', 'premium-addons-pro' ),
129
- 'category' => __( 'Category', 'premium-addons-pro' ),
130
- 'ratings' => __( 'Rating', 'premium-addons-pro' ),
131
- 'price' => __( 'Price', 'premium-addons-pro' ),
132
- 'desc' => __( 'Excerpt', 'premium-addons-pro' ),
133
- 'cta' => __( 'Add To Cart', 'premium-addons-pro' ),
134
- ),
135
- 'multiple' => true,
136
- )
137
- );
138
-
139
- $this->add_control(
140
- 'product_structure',
141
- array(
142
- 'label' => __( 'Product Structure', 'premium-addons-for-elementor' ),
143
- 'type' => Controls_Manager::REPEATER,
144
- 'default' => array(
145
- array(
146
- 'product_segment' => 'title',
147
- ),
148
- array(
149
- 'product_segment' => 'category',
150
- ),
151
- array(
152
- 'product_segment' => 'ratings',
153
- ),
154
- array(
155
- 'product_segment' => 'price',
156
- ),
157
- array(
158
- 'product_segment' => 'cta',
159
- ),
160
- ),
161
- 'fields' => $repeater->get_controls(),
162
- 'title_field' => '{{{ product_segment }}}',
163
- )
164
- );
165
-
166
- $this->add_responsive_control(
167
- 'alignment',
168
- array(
169
- 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
170
- 'type' => Controls_Manager::CHOOSE,
171
- 'options' => array(
172
- 'left' => array(
173
- 'title' => __( 'Left', 'premium-addons-for-elementor' ),
174
- 'icon' => 'eicon-text-align-left',
175
- ),
176
- 'center' => array(
177
- 'title' => __( 'Center', 'premium-addons-for-elementor' ),
178
- 'icon' => 'eicon-text-align-center',
179
- ),
180
- 'right' => array(
181
- 'title' => __( 'Right', 'premium-addons-for-elementor' ),
182
- 'icon' => 'eicon-text-align-right',
183
- ),
184
- ),
185
- 'default' => 'center',
186
- 'toggle' => false,
187
- 'prefix_class' => 'premium-woo-product-align-',
188
- 'selectors' => array(
189
- '{{WRAPPER}} .premium-woo-products-details-wrap' => 'text-align: {{VALUE}}',
190
- ),
191
- )
192
- );
193
-
194
- $this->end_controls_section();
195
- }
196
-
197
- /**
198
- * Register Content Controls.
199
- *
200
- * @since 4.7.0
201
- * @access public
202
- */
203
- public function register_product_content_style() {
204
-
205
- $this->start_controls_section(
206
- 'section_product_style',
207
- array(
208
- 'label' => __( 'Product', 'premium-addons-for-elementor' ),
209
- 'tab' => Controls_Manager::TAB_STYLE,
210
- )
211
- );
212
-
213
- $this->add_group_control(
214
- Group_Control_Background::get_type(),
215
- array(
216
- 'name' => 'content_background',
217
- 'types' => array( 'classic', 'gradient' ),
218
- 'selector' => '{{WRAPPER}} .premium-woo-product-wrapper',
219
- )
220
- );
221
-
222
- $this->add_responsive_control(
223
- 'content_padding',
224
- array(
225
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
226
- 'type' => Controls_Manager::DIMENSIONS,
227
- 'size_units' => array( 'px', 'em', '%' ),
228
- 'selectors' => array(
229
- '{{WRAPPER}} .premium-woo-products-details-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
230
- ),
231
- )
232
- );
233
-
234
- $this->add_control(
235
- 'product_rating_style',
236
- array(
237
- 'label' => __( 'Rating', 'premium-addons-for-elementor' ),
238
- 'type' => Controls_Manager::HEADING,
239
- 'separator' => 'before',
240
- )
241
- );
242
-
243
- $this->add_control(
244
- 'product_rating_color',
245
- array(
246
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
247
- 'type' => Controls_Manager::COLOR,
248
- 'global' => array(
249
- 'default' => Global_Colors::COLOR_ACCENT,
250
- ),
251
- 'selectors' => array(
252
- '{{WRAPPER}} .premium-woocommerce .star-rating, {{WRAPPER}} .premium-woocommerce .star-rating::before' => 'color: {{VALUE}};',
253
- ),
254
- )
255
- );
256
-
257
- $this->add_responsive_control(
258
- 'product_rating_spacing',
259
- array(
260
- 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),
261
- 'type' => Controls_Manager::SLIDER,
262
- 'selectors' => array(
263
- '{{WRAPPER}} .premium-woocommerce .star-rating' => 'margin-bottom: {{SIZE}}{{UNIT}};',
264
- ),
265
- )
266
- );
267
-
268
- $this->end_controls_section();
269
- }
270
-
271
- public function register_product_title_style() {
272
-
273
- $this->start_controls_section(
274
- 'section_title_style',
275
- array(
276
- 'label' => __( 'Title', 'premium-addons-for-elementor' ),
277
- 'tab' => Controls_Manager::TAB_STYLE,
278
- )
279
- );
280
-
281
- $this->add_control(
282
- 'title_color',
283
- array(
284
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
285
- 'type' => Controls_Manager::COLOR,
286
- 'global' => array(
287
- 'default' => Global_Colors::COLOR_PRIMARY,
288
- ),
289
- 'selectors' => array(
290
- '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title' => 'color: {{VALUE}};',
291
- ),
292
- )
293
- );
294
-
295
- $this->add_control(
296
- 'title_hover_color',
297
- array(
298
- 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
299
- 'type' => Controls_Manager::COLOR,
300
- 'global' => array(
301
- 'default' => Global_Colors::COLOR_PRIMARY,
302
- ),
303
- 'selectors' => array(
304
- '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title:hover' => 'color: {{VALUE}};',
305
- ),
306
- )
307
- );
308
-
309
- $this->add_group_control(
310
- Group_Control_Typography::get_type(),
311
- array(
312
- 'name' => 'title_typography',
313
- 'global' => array(
314
- 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
315
- ),
316
- 'selector' => '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title',
317
- )
318
- );
319
-
320
- $this->add_group_control(
321
- Group_Control_Text_Shadow::get_type(),
322
- array(
323
- 'name' => 'title_text_shadow',
324
- 'selector' => '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title',
325
- )
326
- );
327
-
328
- $this->add_responsive_control(
329
- 'title_spacing',
330
- array(
331
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
332
- 'type' => Controls_Manager::DIMENSIONS,
333
- 'size_units' => array( 'px', 'em', '%' ),
334
- 'selectors' => array(
335
- '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
336
- ),
337
- )
338
- );
339
-
340
- $this->end_controls_section();
341
-
342
- }
343
-
344
- public function register_product_category_style() {
345
-
346
- $this->start_controls_section(
347
- 'section_category_style',
348
- array(
349
- 'label' => __( 'Category', 'premium-addons-for-elementor' ),
350
- 'tab' => Controls_Manager::TAB_STYLE,
351
- )
352
- );
353
-
354
- $this->add_control(
355
- 'category_color',
356
- array(
357
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
358
- 'type' => Controls_Manager::COLOR,
359
- 'global' => array(
360
- 'default' => Global_Colors::COLOR_TEXT,
361
- ),
362
- 'selectors' => array(
363
- '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category' => 'color: {{VALUE}};',
364
- ),
365
- )
366
- );
367
-
368
- $this->add_group_control(
369
- Group_Control_Typography::get_type(),
370
- array(
371
- 'name' => 'category_typography',
372
- 'global' => array(
373
- 'default' => Global_Typography::TYPOGRAPHY_TEXT,
374
- ),
375
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category',
376
- )
377
- );
378
-
379
- $this->add_group_control(
380
- Group_Control_Text_Shadow::get_type(),
381
- array(
382
- 'name' => 'category_text_shadow',
383
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category',
384
- )
385
- );
386
-
387
- $this->add_responsive_control(
388
- 'category_spacing',
389
- array(
390
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
391
- 'type' => Controls_Manager::DIMENSIONS,
392
- 'size_units' => array( 'px', 'em', '%' ),
393
- 'selectors' => array(
394
- '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
395
- ),
396
- )
397
- );
398
-
399
- $this->end_controls_section();
400
-
401
- }
402
-
403
- public function register_product_excerpt_style() {
404
-
405
- $this->start_controls_section(
406
- 'section_desc_style',
407
- array(
408
- 'label' => __( 'Description', 'premium-addons-for-elementor' ),
409
- 'tab' => Controls_Manager::TAB_STYLE,
410
- )
411
- );
412
-
413
- $this->add_control(
414
- 'desc_color',
415
- array(
416
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
417
- 'type' => Controls_Manager::COLOR,
418
- 'global' => array(
419
- 'default' => Global_Colors::COLOR_TEXT,
420
- ),
421
- 'selectors' => array(
422
- '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc' => 'color: {{VALUE}};',
423
- ),
424
- )
425
- );
426
-
427
- $this->add_group_control(
428
- Group_Control_Typography::get_type(),
429
- array(
430
- 'name' => 'desc_typography',
431
- 'global' => array(
432
- 'default' => Global_Typography::TYPOGRAPHY_TEXT,
433
- ),
434
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc',
435
- )
436
- );
437
-
438
- $this->add_group_control(
439
- Group_Control_Text_Shadow::get_type(),
440
- array(
441
- 'name' => 'desc_text_shadow',
442
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc',
443
- )
444
- );
445
-
446
- $this->add_responsive_control(
447
- 'desc_spacing',
448
- array(
449
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
450
- 'type' => Controls_Manager::DIMENSIONS,
451
- 'size_units' => array( 'px', 'em', '%' ),
452
- 'selectors' => array(
453
- '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
454
- ),
455
- )
456
- );
457
-
458
- $this->end_controls_section();
459
-
460
- }
461
-
462
- public function register_product_cta_style() {
463
-
464
- $this->start_controls_section(
465
- 'section_button_style',
466
- array(
467
- 'label' => __( 'Add To Cart', 'premium-addons-for-elementor' ),
468
- 'tab' => Controls_Manager::TAB_STYLE,
469
- )
470
- );
471
-
472
- $this->add_group_control(
473
- Group_Control_Typography::get_type(),
474
- array(
475
- 'name' => 'cta_typography',
476
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
477
- 'global' => array(
478
- 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
479
- ),
480
- )
481
- );
482
-
483
- $this->add_responsive_control(
484
- 'cta_padding',
485
- array(
486
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
487
- 'type' => Controls_Manager::DIMENSIONS,
488
- 'size_units' => array( 'px', 'em', '%' ),
489
- 'selectors' => array(
490
- '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
491
- ),
492
- )
493
- );
494
-
495
- $this->start_controls_tabs( 'cta_style_tabs' );
496
-
497
- $this->start_controls_tab(
498
- 'cta_style_tab_normal',
499
- array(
500
- 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
501
- )
502
- );
503
-
504
- $this->add_control(
505
- 'cta_color',
506
- array(
507
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
508
- 'type' => Controls_Manager::COLOR,
509
- 'selectors' => array(
510
- '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button' => 'color: {{VALUE}};',
511
- ),
512
- )
513
- );
514
-
515
- $this->add_group_control(
516
- Group_Control_Background::get_type(),
517
- array(
518
- 'name' => 'cta_background',
519
- 'types' => array( 'classic', 'gradient' ),
520
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
521
- )
522
- );
523
-
524
- $this->add_group_control(
525
- Group_Control_Box_Shadow::get_type(),
526
- array(
527
- 'name' => 'cta_shadow',
528
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
529
- )
530
- );
531
-
532
- $this->add_group_control(
533
- Group_Control_Border::get_type(),
534
- array(
535
- 'name' => 'cta_border',
536
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
537
- )
538
- );
539
-
540
- $this->add_control(
541
- 'cta_radius',
542
- array(
543
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
544
- 'type' => Controls_Manager::DIMENSIONS,
545
- 'size_units' => array( 'px', 'em', '%' ),
546
- 'selectors' => array(
547
- '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
548
- ),
549
- )
550
- );
551
-
552
- $this->end_controls_tab();
553
-
554
- $this->start_controls_tab(
555
- 'cta_style_tab_hover',
556
- array(
557
- 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
558
- )
559
- );
560
-
561
- $this->add_control(
562
- 'cta_color_hover',
563
- array(
564
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
565
- 'type' => Controls_Manager::COLOR,
566
- 'selectors' => array(
567
- '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover' => 'color: {{VALUE}}',
568
- ),
569
- )
570
- );
571
-
572
- $this->add_group_control(
573
- Group_Control_Background::get_type(),
574
- array(
575
- 'name' => 'cta_background_hover',
576
- 'types' => array( 'classic', 'gradient' ),
577
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover',
578
- )
579
- );
580
-
581
- $this->add_group_control(
582
- Group_Control_Box_Shadow::get_type(),
583
- array(
584
- 'name' => 'cta_shadow_hover',
585
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover',
586
- )
587
- );
588
-
589
- $this->add_group_control(
590
- Group_Control_Border::get_type(),
591
- array(
592
- 'name' => 'cta_border_hover',
593
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover',
594
- )
595
- );
596
-
597
- $this->add_control(
598
- 'cta_radius_hover',
599
- array(
600
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
601
- 'type' => Controls_Manager::DIMENSIONS,
602
- 'size_units' => array( 'px', '%', 'em' ),
603
- 'selectors' => array(
604
- '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
605
- ),
606
- )
607
- );
608
-
609
- $this->end_controls_tab();
610
-
611
- $this->end_controls_tabs();
612
-
613
- $this->end_controls_section();
614
-
615
- }
616
-
617
- /**
618
- * Register pagination control section.
619
- *
620
- * @since 4.7.0
621
- * @access public
622
- */
623
- public function register_sale_products_controls() {
624
-
625
- $this->start_controls_section(
626
- 'section_sale_ribbon_settings',
627
- array(
628
- 'label' => __( 'Sale Ribbon', 'premium-addons-for-elementor' ),
629
- )
630
- );
631
-
632
- $this->add_control(
633
- 'sale',
634
- array(
635
- 'label' => __( 'Show Sale Ribbon', 'premium-addons-for-elementor' ),
636
- 'type' => Controls_Manager::SWITCHER,
637
- 'default' => 'yes',
638
- )
639
- );
640
-
641
- $this->add_control(
642
- 'sale_type',
643
- array(
644
- 'label' => __( 'Type', 'premium-addons-for-elementor' ),
645
- 'type' => Controls_Manager::SELECT,
646
- 'options' => array(
647
- '' => __( 'Default', 'premium-addons-for-elementor' ),
648
- 'custom' => __( 'Custom', 'premium-addons-for-elementor' ),
649
- ),
650
- 'default' => '',
651
- 'condition' => array(
652
- $this->get_control_id( 'sale' ) => 'yes',
653
- ),
654
- )
655
- );
656
-
657
- $this->add_control(
658
- 'sale_string',
659
- array(
660
- 'label' => __( 'String', 'premium-addons-for-elementor' ),
661
- 'type' => Controls_Manager::TEXT,
662
- 'default' => '[value]%',
663
- 'description' => __( 'Show Sale % Value ( [value] Autocalculated offer value will replace this ).', 'premium-addons-for-elementor' ),
664
- 'condition' => array(
665
- $this->get_control_id( 'sale' ) => 'yes',
666
- $this->get_control_id( 'sale_type' ) => 'custom',
667
- ),
668
- )
669
- );
670
-
671
- $this->end_controls_section();
672
- }
673
-
674
-
675
- /**
676
- * Register Quick View Controls.
677
- *
678
- * @since 4.7.0
679
- * @access public
680
- */
681
- public function register_quick_view_controls() {
682
-
683
- $this->start_controls_section(
684
- 'section_content_quick_view',
685
- array(
686
- 'label' => __( 'Quick View', 'premium-addons-for-elementor' ),
687
- )
688
- );
689
-
690
- $this->add_control(
691
- 'quick_view',
692
- array(
693
- 'label' => __( 'Enable Quick View', 'premium-addons-for-elementor' ),
694
- 'type' => Controls_Manager::SWITCHER,
695
- 'default' => 'yes',
696
- )
697
- );
698
-
699
- $this->add_control(
700
- 'quick_view_type',
701
- array(
702
- 'label' => __( 'Quick View', 'premium-addons-for-elementor' ),
703
- 'type' => Controls_Manager::SELECT,
704
- 'options' => array(
705
- 'button' => __( 'On Button Click', 'premium-addons-for-elementor' ),
706
- 'image' => __( 'On Image Click', 'premium-addons-for-elementor' ),
707
- ),
708
- 'default' => 'button',
709
- 'condition' => array(
710
- $this->get_control_id( 'quick_view' ) => 'yes',
711
- ),
712
- )
713
- );
714
-
715
- $this->end_controls_section();
716
- }
717
-
718
- /**
719
- * Register Sale style Controls.
720
- *
721
- * @since 4.7.0
722
- * @access public
723
- */
724
- public function register_sale_style_controls() {
725
-
726
- $this->start_controls_section(
727
- 'section_sale_style',
728
- array(
729
- 'label' => __( 'Sale Ribbon', 'premium-addons-for-elementor' ),
730
- 'tab' => Controls_Manager::TAB_STYLE,
731
- 'condition' => array(
732
- $this->get_control_id( 'sale' ) => 'yes',
733
- ),
734
- )
735
- );
736
-
737
- $this->add_responsive_control(
738
- 'sale_size',
739
- array(
740
- 'label' => __( 'Size', 'premium-addons-for-elementor' ),
741
- 'type' => Controls_Manager::SLIDER,
742
- 'size_units' => array( 'px', 'em' ),
743
- 'range' => array(
744
- 'px' => array(
745
- 'min' => 20,
746
- 'max' => 200,
747
- ),
748
- ),
749
- 'selectors' => array(
750
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
751
- ),
752
- )
753
- );
754
-
755
- $this->add_control(
756
- 'sale_color',
757
- array(
758
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
759
- 'type' => Controls_Manager::COLOR,
760
- 'selectors' => array(
761
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'color: {{VALUE}};',
762
- ),
763
- )
764
- );
765
-
766
- $this->add_group_control(
767
- Group_Control_Typography::get_type(),
768
- array(
769
- 'name' => 'sale_typography',
770
- 'global' => array(
771
- 'default' => Global_Typography::TYPOGRAPHY_TEXT,
772
- ),
773
- 'selector' => '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale',
774
- 'condition' => array(
775
- $this->get_control_id( 'sale' ) => 'yes',
776
- ),
777
- )
778
- );
779
-
780
- $this->add_control(
781
- 'sale_background',
782
- array(
783
- 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
784
- 'type' => Controls_Manager::COLOR,
785
- 'global' => array(
786
- 'default' => Global_Colors::COLOR_SECONDARY,
787
- ),
788
- 'selectors' => array(
789
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'background-color: {{VALUE}};',
790
- ),
791
- )
792
- );
793
-
794
- $this->add_responsive_control(
795
- 'sale_radius',
796
- array(
797
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
798
- 'type' => Controls_Manager::DIMENSIONS,
799
- 'size_units' => array( 'px', 'em', '%' ),
800
- 'selectors' => array(
801
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
802
- ),
803
- )
804
- );
805
-
806
- $this->add_group_control(
807
- Group_Control_Text_Shadow::get_type(),
808
- array(
809
- 'name' => 'sale_text_shadow',
810
- 'selector' => '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale',
811
- )
812
- );
813
-
814
- $this->add_group_control(
815
- Group_Control_Box_Shadow::get_type(),
816
- array(
817
- 'name' => 'sale_shadow',
818
- 'selector' => '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale',
819
- )
820
- );
821
-
822
- $this->add_responsive_control(
823
- 'sale_margin',
824
- array(
825
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
826
- 'type' => Controls_Manager::DIMENSIONS,
827
- 'size_units' => array( 'px', 'em', '%' ),
828
- 'selectors' => array(
829
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
830
- ),
831
- )
832
- );
833
-
834
- $this->add_responsive_control(
835
- 'sale_padding',
836
- array(
837
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
838
- 'type' => Controls_Manager::DIMENSIONS,
839
- 'size_units' => array( 'px', 'em', '%' ),
840
- 'selectors' => array(
841
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
842
- ),
843
- )
844
- );
845
-
846
- $this->end_controls_section();
847
- }
848
- /**
849
- * Register pagination control section.
850
- *
851
- * @since 4.7.0
852
- * @access public
853
- */
854
- public function register_featured_products_controls() {
855
-
856
- $this->start_controls_section(
857
- 'section_featured_ribbon_settings',
858
- array(
859
- 'label' => __( 'Featured Ribbon', 'premium-addons-for-elementor' ),
860
- )
861
- );
862
-
863
- $this->add_control(
864
- 'featured',
865
- array(
866
- 'label' => __( 'Show Featured Ribbon', 'premium-addons-for-elementor' ),
867
- 'type' => Controls_Manager::SWITCHER,
868
- )
869
- );
870
-
871
- $this->add_control(
872
- 'featured_string',
873
- array(
874
- 'label' => __( 'String', 'premium-addons-for-elementor' ),
875
- 'type' => Controls_Manager::TEXT,
876
- 'default' => __( 'Hot', 'premium-addons-for-elementor' ),
877
- 'condition' => array(
878
- $this->get_control_id( 'featured' ) => 'yes',
879
- ),
880
- )
881
- );
882
-
883
- $this->end_controls_section();
884
- }
885
-
886
- /**
887
- * Register Style Flash Controls.
888
- *
889
- * @since 4.7.0
890
- * @access public
891
- */
892
- public function register_featured_style_controls() {
893
-
894
- $this->start_controls_section(
895
- 'section_featured_style',
896
- array(
897
- 'label' => __( 'Featured Ribbon', 'premium-addons-for-elementor' ),
898
- 'tab' => Controls_Manager::TAB_STYLE,
899
- 'condition' => array(
900
- $this->get_control_id( 'featured' ) => 'yes',
901
- ),
902
- )
903
- );
904
-
905
- $this->add_responsive_control(
906
- 'featured_size',
907
- array(
908
- 'label' => __( 'Size', 'premium-addons-for-elementor' ),
909
- 'type' => Controls_Manager::SLIDER,
910
- 'size_units' => array( 'px', 'em' ),
911
- 'range' => array(
912
- 'px' => array(
913
- 'min' => 20,
914
- 'max' => 200,
915
- ),
916
- ),
917
- 'selectors' => array(
918
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
919
- ),
920
- )
921
- );
922
-
923
- $this->add_control(
924
- 'featured_color',
925
- array(
926
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
927
- 'type' => Controls_Manager::COLOR,
928
- 'selectors' => array(
929
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'color: {{VALUE}};',
930
- ),
931
- )
932
- );
933
-
934
- $this->add_group_control(
935
- Group_Control_Typography::get_type(),
936
- array(
937
- 'name' => 'featured_typography',
938
- 'global' => array(
939
- 'default' => Global_Typography::TYPOGRAPHY_TEXT,
940
- ),
941
- 'selector' => '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured',
942
- 'condition' => array(
943
- $this->get_control_id( 'featured' ) => 'yes',
944
- ),
945
- )
946
- );
947
-
948
- $this->add_control(
949
- 'featured_background',
950
- array(
951
- 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
952
- 'type' => Controls_Manager::COLOR,
953
- 'global' => array(
954
- 'default' => Global_Colors::COLOR_PRIMARY,
955
- ),
956
- 'selectors' => array(
957
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'background-color: {{VALUE}};',
958
- ),
959
- )
960
- );
961
-
962
- $this->add_responsive_control(
963
- 'featured_radius',
964
- array(
965
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
966
- 'type' => Controls_Manager::DIMENSIONS,
967
- 'size_units' => array( 'px', 'em', '%' ),
968
- 'selectors' => array(
969
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
970
- ),
971
- )
972
- );
973
-
974
- $this->add_group_control(
975
- Group_Control_Text_Shadow::get_type(),
976
- array(
977
- 'name' => 'featured_text_shadow',
978
- 'selector' => '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured',
979
- )
980
- );
981
-
982
- $this->add_group_control(
983
- Group_Control_Box_Shadow::get_type(),
984
- array(
985
- 'name' => 'featured_shadow',
986
- 'selector' => '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured',
987
- )
988
- );
989
-
990
- $this->add_responsive_control(
991
- 'featured_margin',
992
- array(
993
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
994
- 'type' => Controls_Manager::DIMENSIONS,
995
- 'size_units' => array( 'px', 'em', '%' ),
996
- 'selectors' => array(
997
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
998
- ),
999
- )
1000
- );
1001
-
1002
- $this->add_responsive_control(
1003
- 'featured_padding',
1004
- array(
1005
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1006
- 'type' => Controls_Manager::DIMENSIONS,
1007
- 'size_units' => array( 'px', 'em', '%' ),
1008
- 'selectors' => array(
1009
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1010
- ),
1011
- )
1012
- );
1013
-
1014
- $this->end_controls_section();
1015
-
1016
- }
1017
-
1018
- /**
1019
- * Register Quick View Style Controls.
1020
- *
1021
- * @since 4.7.0
1022
- * @access public
1023
- */
1024
- public function register_quick_style_controls() {
1025
-
1026
- $this->start_controls_section(
1027
- 'section_quick_view_style',
1028
- array(
1029
- 'label' => __( 'Quick View Button', 'premium-addons-for-elementor' ),
1030
- 'tab' => Controls_Manager::TAB_STYLE,
1031
- 'condition' => array(
1032
- $this->get_control_id( 'quick_view' ) => 'yes',
1033
- $this->get_control_id( 'quick_view_type' ) => 'button',
1034
- ),
1035
- )
1036
- );
1037
-
1038
- $this->add_group_control(
1039
- Group_Control_Typography::get_type(),
1040
- array(
1041
- 'name' => 'qv_typography',
1042
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1043
- 'global' => array(
1044
- 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
1045
- ),
1046
- )
1047
- );
1048
-
1049
- $this->add_responsive_control(
1050
- 'qv_padding',
1051
- array(
1052
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1053
- 'type' => Controls_Manager::DIMENSIONS,
1054
- 'size_units' => array( 'px', 'em', '%' ),
1055
- 'selectors' => array(
1056
- '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1057
- ),
1058
- )
1059
- );
1060
-
1061
- $this->start_controls_tabs( 'qv_style_tabs' );
1062
-
1063
- $this->start_controls_tab(
1064
- 'qv_style_tab_normal',
1065
- array(
1066
- 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
1067
- )
1068
- );
1069
-
1070
- $this->add_control(
1071
- 'qv_color',
1072
- array(
1073
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1074
- 'type' => Controls_Manager::COLOR,
1075
- 'selectors' => array(
1076
- '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn' => 'color: {{VALUE}};',
1077
- ),
1078
- )
1079
- );
1080
-
1081
- $this->add_group_control(
1082
- Group_Control_Background::get_type(),
1083
- array(
1084
- 'name' => 'qv_background',
1085
- 'types' => array( 'classic', 'gradient' ),
1086
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1087
- )
1088
- );
1089
-
1090
- $this->add_group_control(
1091
- Group_Control_Box_Shadow::get_type(),
1092
- array(
1093
- 'name' => 'qv_shadow',
1094
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1095
- )
1096
- );
1097
-
1098
- $this->add_group_control(
1099
- Group_Control_Border::get_type(),
1100
- array(
1101
- 'name' => 'qv_border',
1102
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1103
- )
1104
- );
1105
-
1106
- $this->add_control(
1107
- 'qv_radius',
1108
- array(
1109
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1110
- 'type' => Controls_Manager::DIMENSIONS,
1111
- 'size_units' => array( 'px', 'em', '%' ),
1112
- 'selectors' => array(
1113
- '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1114
- ),
1115
- )
1116
- );
1117
-
1118
- $this->end_controls_tab();
1119
-
1120
- $this->start_controls_tab(
1121
- 'qv_style_tab_hover',
1122
- array(
1123
- 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
1124
- )
1125
- );
1126
-
1127
- $this->add_control(
1128
- 'qv_color_hover',
1129
- array(
1130
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1131
- 'type' => Controls_Manager::COLOR,
1132
- 'selectors' => array(
1133
- '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover' => 'color: {{VALUE}}',
1134
- ),
1135
- )
1136
- );
1137
-
1138
- $this->add_group_control(
1139
- Group_Control_Background::get_type(),
1140
- array(
1141
- 'name' => 'qv_background_hover',
1142
- 'types' => array( 'classic', 'gradient' ),
1143
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover',
1144
- )
1145
- );
1146
-
1147
- $this->add_group_control(
1148
- Group_Control_Box_Shadow::get_type(),
1149
- array(
1150
- 'name' => 'qv_shadow_hover',
1151
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover',
1152
- )
1153
- );
1154
-
1155
- $this->add_group_control(
1156
- Group_Control_Border::get_type(),
1157
- array(
1158
- 'name' => 'qv_border_hover',
1159
- 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover',
1160
- )
1161
- );
1162
-
1163
- $this->add_control(
1164
- 'qv_radius_hover',
1165
- array(
1166
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1167
- 'type' => Controls_Manager::DIMENSIONS,
1168
- 'size_units' => array( 'px', '%', 'em' ),
1169
- 'selectors' => array(
1170
- '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1171
- ),
1172
- )
1173
- );
1174
-
1175
- $this->end_controls_tab();
1176
-
1177
- $this->end_controls_tabs();
1178
-
1179
- $this->end_controls_section();
1180
-
1181
- }
1182
-
1183
-
1184
- /**
1185
- * Render Main HTML.
1186
- *
1187
- * @since 1.5.0
1188
- * @access protected
1189
- */
1190
- public function render() {
1191
-
1192
- $settings = $this->parent->get_settings();
1193
-
1194
- $skin = Skin_Init::get_instance( $this->get_id() );
1195
-
1196
- echo $skin->render( $this->get_id(), $settings, $this->parent->get_id() );
1197
- }
1198
- }
1
+ <?php
2
+
3
+ namespace PremiumAddons\Modules\Woocommerce\Skins;
4
+
5
+ use Elementor\Controls_Manager;
6
+ use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
7
+ use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
8
+ use Elementor\Repeater;
9
+ use Elementor\Group_Control_Typography;
10
+ use Elementor\Group_Control_Background;
11
+ use Elementor\Group_Control_Box_Shadow;
12
+ use Elementor\Group_Control_Text_Shadow;
13
+ use Elementor\Group_Control_Border;
14
+
15
+
16
+ use PremiumAddons\Modules\Woocommerce\TemplateBlocks\Skin_Init;
17
+
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ exit; // If this file is called directly, abort.
20
+ }
21
+
22
+ /**
23
+ * Class Skin_Grid_Default
24
+ *
25
+ * @property Products $parent
26
+ */
27
+ class Skin_3 extends Skin_Base {
28
+
29
+ /**
30
+ * Get ID.
31
+ *
32
+ * @since 4.7.0
33
+ * @access public
34
+ */
35
+ public function get_id() {
36
+ return 'grid-3';
37
+ }
38
+
39
+ /**
40
+ * Get title.
41
+ *
42
+ * @since 4.7.0
43
+ * @access public
44
+ */
45
+ public function get_title() {
46
+ return __( 'Skin 3', 'premium-addons-for-elementor' );
47
+ }
48
+
49
+ /**
50
+ * Register control actions.
51
+ *
52
+ * @since 4.7.0
53
+ * @access protected
54
+ */
55
+ protected function _register_controls_actions() {
56
+
57
+ // Content Controls
58
+ add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_display_options_controls' ) );
59
+
60
+ // Sale Ribbon Controls
61
+ add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_sale_products_controls' ) );
62
+
63
+ // Featured Ribbon Controls
64
+ add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_featured_products_controls' ) );
65
+
66
+ // Quick View Controls
67
+ add_action( 'elementor/element/premium-woo-products/section_pagination_options/after_section_end', array( $this, 'register_quick_view_controls' ) );
68
+
69
+ // Image Style
70
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_content_style' ) );
71
+
72
+ // Product Title Style
73
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_title_style' ) );
74
+
75
+ // Product Category Style
76
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_category_style' ) );
77
+
78
+ // Product Description Style
79
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_excerpt_style' ) );
80
+
81
+ // Product CTA Style
82
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_product_cta_style' ) );
83
+
84
+ // Product Sale Ribbon Style
85
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_sale_style_controls' ) );
86
+
87
+ // Product Featured Ribbon Style
88
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_featured_style_controls' ) );
89
+
90
+ // Product Featured Ribbon Style
91
+ add_action( 'elementor/element/premium-woo-products/section_image_style/after_section_end', array( $this, 'register_quick_style_controls' ), 30 );
92
+
93
+ parent::_register_controls_actions();
94
+ }
95
+
96
+ /**
97
+ * Register content control section.
98
+ *
99
+ * @since 4.7.0
100
+ * @access public
101
+ */
102
+ public function register_display_options_controls() {
103
+
104
+ $this->start_controls_section(
105
+ 'section_content_field',
106
+ array(
107
+ 'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
108
+ )
109
+ );
110
+
111
+ $this->add_control(
112
+ 'product_image',
113
+ array(
114
+ 'label' => __( 'Image', 'premium-addons-for-elementor' ),
115
+ 'type' => Controls_Manager::SWITCHER,
116
+ 'default' => 'yes',
117
+ )
118
+ );
119
+
120
+ $repeater = new REPEATER();
121
+
122
+ $repeater->add_control(
123
+ 'product_segment',
124
+ array(
125
+ 'label' => __( 'Select Product Segment', 'premium-addons-for-elementor' ),
126
+ 'type' => Controls_Manager::SELECT,
127
+ 'options' => array(
128
+ 'title' => __( 'Title', 'premium-addons-pro' ),
129
+ 'category' => __( 'Category', 'premium-addons-pro' ),
130
+ 'ratings' => __( 'Rating', 'premium-addons-pro' ),
131
+ 'price' => __( 'Price', 'premium-addons-pro' ),
132
+ 'desc' => __( 'Excerpt', 'premium-addons-pro' ),
133
+ 'cta' => __( 'Add To Cart', 'premium-addons-pro' ),
134
+ ),
135
+ 'multiple' => true,
136
+ )
137
+ );
138
+
139
+ $this->add_control(
140
+ 'product_structure',
141
+ array(
142
+ 'label' => __( 'Product Structure', 'premium-addons-for-elementor' ),
143
+ 'type' => Controls_Manager::REPEATER,
144
+ 'default' => array(
145
+ array(
146
+ 'product_segment' => 'title',
147
+ ),
148
+ array(
149
+ 'product_segment' => 'category',
150
+ ),
151
+ array(
152
+ 'product_segment' => 'ratings',
153
+ ),
154
+ array(
155
+ 'product_segment' => 'price',
156
+ ),
157
+ array(
158
+ 'product_segment' => 'cta',
159
+ ),
160
+ ),
161
+ 'fields' => $repeater->get_controls(),
162
+ 'title_field' => '{{{ product_segment }}}',
163
+ )
164
+ );
165
+
166
+ $this->add_responsive_control(
167
+ 'alignment',
168
+ array(
169
+ 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
170
+ 'type' => Controls_Manager::CHOOSE,
171
+ 'options' => array(
172
+ 'left' => array(
173
+ 'title' => __( 'Left', 'premium-addons-for-elementor' ),
174
+ 'icon' => 'eicon-text-align-left',
175
+ ),
176
+ 'center' => array(
177
+ 'title' => __( 'Center', 'premium-addons-for-elementor' ),
178
+ 'icon' => 'eicon-text-align-center',
179
+ ),
180
+ 'right' => array(
181
+ 'title' => __( 'Right', 'premium-addons-for-elementor' ),
182
+ 'icon' => 'eicon-text-align-right',
183
+ ),
184
+ ),
185
+ 'default' => 'center',
186
+ 'toggle' => false,
187
+ 'prefix_class' => 'premium-woo-product-align-',
188
+ 'selectors' => array(
189
+ '{{WRAPPER}} .premium-woo-products-details-wrap' => 'text-align: {{VALUE}}',
190
+ ),
191
+ )
192
+ );
193
+
194
+ $this->end_controls_section();
195
+ }
196
+
197
+ /**
198
+ * Register Content Controls.
199
+ *
200
+ * @since 4.7.0
201
+ * @access public
202
+ */
203
+ public function register_product_content_style() {
204
+
205
+ $this->start_controls_section(
206
+ 'section_product_style',
207
+ array(
208
+ 'label' => __( 'Product', 'premium-addons-for-elementor' ),
209
+ 'tab' => Controls_Manager::TAB_STYLE,
210
+ )
211
+ );
212
+
213
+ $this->add_group_control(
214
+ Group_Control_Background::get_type(),
215
+ array(
216
+ 'name' => 'content_background',
217
+ 'types' => array( 'classic', 'gradient' ),
218
+ 'selector' => '{{WRAPPER}} .premium-woo-product-wrapper',
219
+ )
220
+ );
221
+
222
+ $this->add_responsive_control(
223
+ 'content_padding',
224
+ array(
225
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
226
+ 'type' => Controls_Manager::DIMENSIONS,
227
+ 'size_units' => array( 'px', 'em', '%' ),
228
+ 'selectors' => array(
229
+ '{{WRAPPER}} .premium-woo-products-details-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
230
+ ),
231
+ )
232
+ );
233
+
234
+ $this->add_control(
235
+ 'product_rating_style',
236
+ array(
237
+ 'label' => __( 'Rating', 'premium-addons-for-elementor' ),
238
+ 'type' => Controls_Manager::HEADING,
239
+ 'separator' => 'before',
240
+ )
241
+ );
242
+
243
+ $this->add_control(
244
+ 'product_rating_color',
245
+ array(
246
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
247
+ 'type' => Controls_Manager::COLOR,
248
+ 'global' => array(
249
+ 'default' => Global_Colors::COLOR_ACCENT,
250
+ ),
251
+ 'selectors' => array(
252
+ '{{WRAPPER}} .premium-woocommerce .star-rating, {{WRAPPER}} .premium-woocommerce .star-rating::before' => 'color: {{VALUE}};',
253
+ ),
254
+ )
255
+ );
256
+
257
+ $this->add_responsive_control(
258
+ 'product_rating_spacing',
259
+ array(
260
+ 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),
261
+ 'type' => Controls_Manager::SLIDER,
262
+ 'selectors' => array(
263
+ '{{WRAPPER}} .premium-woocommerce .star-rating' => 'margin-bottom: {{SIZE}}{{UNIT}};',
264
+ ),
265
+ )
266
+ );
267
+
268
+ $this->end_controls_section();
269
+ }
270
+
271
+ public function register_product_title_style() {
272
+
273
+ $this->start_controls_section(
274
+ 'section_title_style',
275
+ array(
276
+ 'label' => __( 'Title', 'premium-addons-for-elementor' ),
277
+ 'tab' => Controls_Manager::TAB_STYLE,
278
+ )
279
+ );
280
+
281
+ $this->add_control(
282
+ 'title_color',
283
+ array(
284
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
285
+ 'type' => Controls_Manager::COLOR,
286
+ 'global' => array(
287
+ 'default' => Global_Colors::COLOR_PRIMARY,
288
+ ),
289
+ 'selectors' => array(
290
+ '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title' => 'color: {{VALUE}};',
291
+ ),
292
+ )
293
+ );
294
+
295
+ $this->add_control(
296
+ 'title_hover_color',
297
+ array(
298
+ 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
299
+ 'type' => Controls_Manager::COLOR,
300
+ 'global' => array(
301
+ 'default' => Global_Colors::COLOR_PRIMARY,
302
+ ),
303
+ 'selectors' => array(
304
+ '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title:hover' => 'color: {{VALUE}};',
305
+ ),
306
+ )
307
+ );
308
+
309
+ $this->add_group_control(
310
+ Group_Control_Typography::get_type(),
311
+ array(
312
+ 'name' => 'title_typography',
313
+ 'global' => array(
314
+ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
315
+ ),
316
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title',
317
+ )
318
+ );
319
+
320
+ $this->add_group_control(
321
+ Group_Control_Text_Shadow::get_type(),
322
+ array(
323
+ 'name' => 'title_text_shadow',
324
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title',
325
+ )
326
+ );
327
+
328
+ $this->add_responsive_control(
329
+ 'title_spacing',
330
+ array(
331
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
332
+ 'type' => Controls_Manager::DIMENSIONS,
333
+ 'size_units' => array( 'px', 'em', '%' ),
334
+ 'selectors' => array(
335
+ '{{WRAPPER}} .premium-woocommerce .woocommerce-loop-product__title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
336
+ ),
337
+ )
338
+ );
339
+
340
+ $this->end_controls_section();
341
+
342
+ }
343
+
344
+ public function register_product_category_style() {
345
+
346
+ $this->start_controls_section(
347
+ 'section_category_style',
348
+ array(
349
+ 'label' => __( 'Category', 'premium-addons-for-elementor' ),
350
+ 'tab' => Controls_Manager::TAB_STYLE,
351
+ )
352
+ );
353
+
354
+ $this->add_control(
355
+ 'category_color',
356
+ array(
357
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
358
+ 'type' => Controls_Manager::COLOR,
359
+ 'global' => array(
360
+ 'default' => Global_Colors::COLOR_TEXT,
361
+ ),
362
+ 'selectors' => array(
363
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category' => 'color: {{VALUE}};',
364
+ ),
365
+ )
366
+ );
367
+
368
+ $this->add_group_control(
369
+ Group_Control_Typography::get_type(),
370
+ array(
371
+ 'name' => 'category_typography',
372
+ 'global' => array(
373
+ 'default' => Global_Typography::TYPOGRAPHY_TEXT,
374
+ ),
375
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category',
376
+ )
377
+ );
378
+
379
+ $this->add_group_control(
380
+ Group_Control_Text_Shadow::get_type(),
381
+ array(
382
+ 'name' => 'category_text_shadow',
383
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category',
384
+ )
385
+ );
386
+
387
+ $this->add_responsive_control(
388
+ 'category_spacing',
389
+ array(
390
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
391
+ 'type' => Controls_Manager::DIMENSIONS,
392
+ 'size_units' => array( 'px', 'em', '%' ),
393
+ 'selectors' => array(
394
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-product-category' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
395
+ ),
396
+ )
397
+ );
398
+
399
+ $this->end_controls_section();
400
+
401
+ }
402
+
403
+ public function register_product_excerpt_style() {
404
+
405
+ $this->start_controls_section(
406
+ 'section_desc_style',
407
+ array(
408
+ 'label' => __( 'Description', 'premium-addons-for-elementor' ),
409
+ 'tab' => Controls_Manager::TAB_STYLE,
410
+ )
411
+ );
412
+
413
+ $this->add_control(
414
+ 'desc_color',
415
+ array(
416
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
417
+ 'type' => Controls_Manager::COLOR,
418
+ 'global' => array(
419
+ 'default' => Global_Colors::COLOR_TEXT,
420
+ ),
421
+ 'selectors' => array(
422
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc' => 'color: {{VALUE}};',
423
+ ),
424
+ )
425
+ );
426
+
427
+ $this->add_group_control(
428
+ Group_Control_Typography::get_type(),
429
+ array(
430
+ 'name' => 'desc_typography',
431
+ 'global' => array(
432
+ 'default' => Global_Typography::TYPOGRAPHY_TEXT,
433
+ ),
434
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc',
435
+ )
436
+ );
437
+
438
+ $this->add_group_control(
439
+ Group_Control_Text_Shadow::get_type(),
440
+ array(
441
+ 'name' => 'desc_text_shadow',
442
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc',
443
+ )
444
+ );
445
+
446
+ $this->add_responsive_control(
447
+ 'desc_spacing',
448
+ array(
449
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
450
+ 'type' => Controls_Manager::DIMENSIONS,
451
+ 'size_units' => array( 'px', 'em', '%' ),
452
+ 'selectors' => array(
453
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-product-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
454
+ ),
455
+ )
456
+ );
457
+
458
+ $this->end_controls_section();
459
+
460
+ }
461
+
462
+ public function register_product_cta_style() {
463
+
464
+ $this->start_controls_section(
465
+ 'section_button_style',
466
+ array(
467
+ 'label' => __( 'Add To Cart', 'premium-addons-for-elementor' ),
468
+ 'tab' => Controls_Manager::TAB_STYLE,
469
+ )
470
+ );
471
+
472
+ $this->add_group_control(
473
+ Group_Control_Typography::get_type(),
474
+ array(
475
+ 'name' => 'cta_typography',
476
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
477
+ 'global' => array(
478
+ 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
479
+ ),
480
+ )
481
+ );
482
+
483
+ $this->add_responsive_control(
484
+ 'cta_padding',
485
+ array(
486
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
487
+ 'type' => Controls_Manager::DIMENSIONS,
488
+ 'size_units' => array( 'px', 'em', '%' ),
489
+ 'selectors' => array(
490
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
491
+ ),
492
+ )
493
+ );
494
+
495
+ $this->start_controls_tabs( 'cta_style_tabs' );
496
+
497
+ $this->start_controls_tab(
498
+ 'cta_style_tab_normal',
499
+ array(
500
+ 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
501
+ )
502
+ );
503
+
504
+ $this->add_control(
505
+ 'cta_color',
506
+ array(
507
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
508
+ 'type' => Controls_Manager::COLOR,
509
+ 'selectors' => array(
510
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button' => 'color: {{VALUE}};',
511
+ ),
512
+ )
513
+ );
514
+
515
+ $this->add_group_control(
516
+ Group_Control_Background::get_type(),
517
+ array(
518
+ 'name' => 'cta_background',
519
+ 'types' => array( 'classic', 'gradient' ),
520
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
521
+ )
522
+ );
523
+
524
+ $this->add_group_control(
525
+ Group_Control_Box_Shadow::get_type(),
526
+ array(
527
+ 'name' => 'cta_shadow',
528
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
529
+ )
530
+ );
531
+
532
+ $this->add_group_control(
533
+ Group_Control_Border::get_type(),
534
+ array(
535
+ 'name' => 'cta_border',
536
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button',
537
+ )
538
+ );
539
+
540
+ $this->add_control(
541
+ 'cta_radius',
542
+ array(
543
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
544
+ 'type' => Controls_Manager::DIMENSIONS,
545
+ 'size_units' => array( 'px', 'em', '%' ),
546
+ 'selectors' => array(
547
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
548
+ ),
549
+ )
550
+ );
551
+
552
+ $this->end_controls_tab();
553
+
554
+ $this->start_controls_tab(
555
+ 'cta_style_tab_hover',
556
+ array(
557
+ 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
558
+ )
559
+ );
560
+
561
+ $this->add_control(
562
+ 'cta_color_hover',
563
+ array(
564
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
565
+ 'type' => Controls_Manager::COLOR,
566
+ 'selectors' => array(
567
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover' => 'color: {{VALUE}}',
568
+ ),
569
+ )
570
+ );
571
+
572
+ $this->add_group_control(
573
+ Group_Control_Background::get_type(),
574
+ array(
575
+ 'name' => 'cta_background_hover',
576
+ 'types' => array( 'classic', 'gradient' ),
577
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover',
578
+ )
579
+ );
580
+
581
+ $this->add_group_control(
582
+ Group_Control_Box_Shadow::get_type(),
583
+ array(
584
+ 'name' => 'cta_shadow_hover',
585
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover',
586
+ )
587
+ );
588
+
589
+ $this->add_group_control(
590
+ Group_Control_Border::get_type(),
591
+ array(
592
+ 'name' => 'cta_border_hover',
593
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover',
594
+ )
595
+ );
596
+
597
+ $this->add_control(
598
+ 'cta_radius_hover',
599
+ array(
600
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
601
+ 'type' => Controls_Manager::DIMENSIONS,
602
+ 'size_units' => array( 'px', '%', 'em' ),
603
+ 'selectors' => array(
604
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-products-details-wrap .premium-woo-atc-button .button:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
605
+ ),
606
+ )
607
+ );
608
+
609
+ $this->end_controls_tab();
610
+
611
+ $this->end_controls_tabs();
612
+
613
+ $this->end_controls_section();
614
+
615
+ }
616
+
617
+ /**
618
+ * Register pagination control section.
619
+ *
620
+ * @since 4.7.0
621
+ * @access public
622
+ */
623
+ public function register_sale_products_controls() {
624
+
625
+ $this->start_controls_section(
626
+ 'section_sale_ribbon_settings',
627
+ array(
628
+ 'label' => __( 'Sale Ribbon', 'premium-addons-for-elementor' ),
629
+ )
630
+ );
631
+
632
+ $this->add_control(
633
+ 'sale',
634
+ array(
635
+ 'label' => __( 'Show Sale Ribbon', 'premium-addons-for-elementor' ),
636
+ 'type' => Controls_Manager::SWITCHER,
637
+ 'default' => 'yes',
638
+ )
639
+ );
640
+
641
+ $this->add_control(
642
+ 'sale_type',
643
+ array(
644
+ 'label' => __( 'Type', 'premium-addons-for-elementor' ),
645
+ 'type' => Controls_Manager::SELECT,
646
+ 'options' => array(
647
+ '' => __( 'Default', 'premium-addons-for-elementor' ),
648
+ 'custom' => __( 'Custom', 'premium-addons-for-elementor' ),
649
+ ),
650
+ 'default' => '',
651
+ 'condition' => array(
652
+ $this->get_control_id( 'sale' ) => 'yes',
653
+ ),
654
+ )
655
+ );
656
+
657
+ $this->add_control(
658
+ 'sale_string',
659
+ array(
660
+ 'label' => __( 'String', 'premium-addons-for-elementor' ),
661
+ 'type' => Controls_Manager::TEXT,
662
+ 'default' => '[value]%',
663
+ 'description' => __( 'Show Sale % Value ( [value] Autocalculated offer value will replace this ).', 'premium-addons-for-elementor' ),
664
+ 'condition' => array(
665
+ $this->get_control_id( 'sale' ) => 'yes',
666
+ $this->get_control_id( 'sale_type' ) => 'custom',
667
+ ),
668
+ )
669
+ );
670
+
671
+ $this->end_controls_section();
672
+ }
673
+
674
+
675
+ /**
676
+ * Register Quick View Controls.
677
+ *
678
+ * @since 4.7.0
679
+ * @access public
680
+ */
681
+ public function register_quick_view_controls() {
682
+
683
+ $this->start_controls_section(
684
+ 'section_content_quick_view',
685
+ array(
686
+ 'label' => __( 'Quick View', 'premium-addons-for-elementor' ),
687
+ )
688
+ );
689
+
690
+ $this->add_control(
691
+ 'quick_view',
692
+ array(
693
+ 'label' => __( 'Enable Quick View', 'premium-addons-for-elementor' ),
694
+ 'type' => Controls_Manager::SWITCHER,
695
+ 'default' => 'yes',
696
+ )
697
+ );
698
+
699
+ $this->add_control(
700
+ 'quick_view_type',
701
+ array(
702
+ 'label' => __( 'Quick View', 'premium-addons-for-elementor' ),
703
+ 'type' => Controls_Manager::SELECT,
704
+ 'options' => array(
705
+ 'button' => __( 'On Button Click', 'premium-addons-for-elementor' ),
706
+ 'image' => __( 'On Image Click', 'premium-addons-for-elementor' ),
707
+ ),
708
+ 'default' => 'button',
709
+ 'condition' => array(
710
+ $this->get_control_id( 'quick_view' ) => 'yes',
711
+ ),
712
+ )
713
+ );
714
+
715
+ $this->end_controls_section();
716
+ }
717
+
718
+ /**
719
+ * Register Sale style Controls.
720
+ *
721
+ * @since 4.7.0
722
+ * @access public
723
+ */
724
+ public function register_sale_style_controls() {
725
+
726
+ $this->start_controls_section(
727
+ 'section_sale_style',
728
+ array(
729
+ 'label' => __( 'Sale Ribbon', 'premium-addons-for-elementor' ),
730
+ 'tab' => Controls_Manager::TAB_STYLE,
731
+ 'condition' => array(
732
+ $this->get_control_id( 'sale' ) => 'yes',
733
+ ),
734
+ )
735
+ );
736
+
737
+ $this->add_responsive_control(
738
+ 'sale_size',
739
+ array(
740
+ 'label' => __( 'Size', 'premium-addons-for-elementor' ),
741
+ 'type' => Controls_Manager::SLIDER,
742
+ 'size_units' => array( 'px', 'em' ),
743
+ 'range' => array(
744
+ 'px' => array(
745
+ 'min' => 20,
746
+ 'max' => 200,
747
+ ),
748
+ ),
749
+ 'selectors' => array(
750
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
751
+ ),
752
+ )
753
+ );
754
+
755
+ $this->add_control(
756
+ 'sale_color',
757
+ array(
758
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
759
+ 'type' => Controls_Manager::COLOR,
760
+ 'selectors' => array(
761
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'color: {{VALUE}};',
762
+ ),
763
+ )
764
+ );
765
+
766
+ $this->add_group_control(
767
+ Group_Control_Typography::get_type(),
768
+ array(
769
+ 'name' => 'sale_typography',
770
+ 'global' => array(
771
+ 'default' => Global_Typography::TYPOGRAPHY_TEXT,
772
+ ),
773
+ 'selector' => '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale',
774
+ 'condition' => array(
775
+ $this->get_control_id( 'sale' ) => 'yes',
776
+ ),
777
+ )
778
+ );
779
+
780
+ $this->add_control(
781
+ 'sale_background',
782
+ array(
783
+ 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
784
+ 'type' => Controls_Manager::COLOR,
785
+ 'global' => array(
786
+ 'default' => Global_Colors::COLOR_SECONDARY,
787
+ ),
788
+ 'selectors' => array(
789
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'background-color: {{VALUE}};',
790
+ ),
791
+ )
792
+ );
793
+
794
+ $this->add_responsive_control(
795
+ 'sale_radius',
796
+ array(
797
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
798
+ 'type' => Controls_Manager::DIMENSIONS,
799
+ 'size_units' => array( 'px', 'em', '%' ),
800
+ 'selectors' => array(
801
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
802
+ ),
803
+ )
804
+ );
805
+
806
+ $this->add_group_control(
807
+ Group_Control_Text_Shadow::get_type(),
808
+ array(
809
+ 'name' => 'sale_text_shadow',
810
+ 'selector' => '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale',
811
+ )
812
+ );
813
+
814
+ $this->add_group_control(
815
+ Group_Control_Box_Shadow::get_type(),
816
+ array(
817
+ 'name' => 'sale_shadow',
818
+ 'selector' => '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale',
819
+ )
820
+ );
821
+
822
+ $this->add_responsive_control(
823
+ 'sale_margin',
824
+ array(
825
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
826
+ 'type' => Controls_Manager::DIMENSIONS,
827
+ 'size_units' => array( 'px', 'em', '%' ),
828
+ 'selectors' => array(
829
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
830
+ ),
831
+ )
832
+ );
833
+
834
+ $this->add_responsive_control(
835
+ 'sale_padding',
836
+ array(
837
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
838
+ 'type' => Controls_Manager::DIMENSIONS,
839
+ 'size_units' => array( 'px', 'em', '%' ),
840
+ 'selectors' => array(
841
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
842
+ ),
843
+ )
844
+ );
845
+
846
+ $this->end_controls_section();
847
+ }
848
+ /**
849
+ * Register pagination control section.
850
+ *
851
+ * @since 4.7.0
852
+ * @access public
853
+ */
854
+ public function register_featured_products_controls() {
855
+
856
+ $this->start_controls_section(
857
+ 'section_featured_ribbon_settings',
858
+ array(
859
+ 'label' => __( 'Featured Ribbon', 'premium-addons-for-elementor' ),
860
+ )
861
+ );
862
+
863
+ $this->add_control(
864
+ 'featured',
865
+ array(
866
+ 'label' => __( 'Show Featured Ribbon', 'premium-addons-for-elementor' ),
867
+ 'type' => Controls_Manager::SWITCHER,
868
+ )
869
+ );
870
+
871
+ $this->add_control(
872
+ 'featured_string',
873
+ array(
874
+ 'label' => __( 'String', 'premium-addons-for-elementor' ),
875
+ 'type' => Controls_Manager::TEXT,
876
+ 'default' => __( 'Hot', 'premium-addons-for-elementor' ),
877
+ 'condition' => array(
878
+ $this->get_control_id( 'featured' ) => 'yes',
879
+ ),
880
+ )
881
+ );
882
+
883
+ $this->end_controls_section();
884
+ }
885
+
886
+ /**
887
+ * Register Style Flash Controls.
888
+ *
889
+ * @since 4.7.0
890
+ * @access public
891
+ */
892
+ public function register_featured_style_controls() {
893
+
894
+ $this->start_controls_section(
895
+ 'section_featured_style',
896
+ array(
897
+ 'label' => __( 'Featured Ribbon', 'premium-addons-for-elementor' ),
898
+ 'tab' => Controls_Manager::TAB_STYLE,
899
+ 'condition' => array(
900
+ $this->get_control_id( 'featured' ) => 'yes',
901
+ ),
902
+ )
903
+ );
904
+
905
+ $this->add_responsive_control(
906
+ 'featured_size',
907
+ array(
908
+ 'label' => __( 'Size', 'premium-addons-for-elementor' ),
909
+ 'type' => Controls_Manager::SLIDER,
910
+ 'size_units' => array( 'px', 'em' ),
911
+ 'range' => array(
912
+ 'px' => array(
913
+ 'min' => 20,
914
+ 'max' => 200,
915
+ ),
916
+ ),
917
+ 'selectors' => array(
918
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
919
+ ),
920
+ )
921
+ );
922
+
923
+ $this->add_control(
924
+ 'featured_color',
925
+ array(
926
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
927
+ 'type' => Controls_Manager::COLOR,
928
+ 'selectors' => array(
929
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'color: {{VALUE}};',
930
+ ),
931
+ )
932
+ );
933
+
934
+ $this->add_group_control(
935
+ Group_Control_Typography::get_type(),
936
+ array(
937
+ 'name' => 'featured_typography',
938
+ 'global' => array(
939
+ 'default' => Global_Typography::TYPOGRAPHY_TEXT,
940
+ ),
941
+ 'selector' => '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured',
942
+ 'condition' => array(
943
+ $this->get_control_id( 'featured' ) => 'yes',
944
+ ),
945
+ )
946
+ );
947
+
948
+ $this->add_control(
949
+ 'featured_background',
950
+ array(
951
+ 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
952
+ 'type' => Controls_Manager::COLOR,
953
+ 'global' => array(
954
+ 'default' => Global_Colors::COLOR_PRIMARY,
955
+ ),
956
+ 'selectors' => array(
957
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'background-color: {{VALUE}};',
958
+ ),
959
+ )
960
+ );
961
+
962
+ $this->add_responsive_control(
963
+ 'featured_radius',
964
+ array(
965
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
966
+ 'type' => Controls_Manager::DIMENSIONS,
967
+ 'size_units' => array( 'px', 'em', '%' ),
968
+ 'selectors' => array(
969
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
970
+ ),
971
+ )
972
+ );
973
+
974
+ $this->add_group_control(
975
+ Group_Control_Text_Shadow::get_type(),
976
+ array(
977
+ 'name' => 'featured_text_shadow',
978
+ 'selector' => '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured',
979
+ )
980
+ );
981
+
982
+ $this->add_group_control(
983
+ Group_Control_Box_Shadow::get_type(),
984
+ array(
985
+ 'name' => 'featured_shadow',
986
+ 'selector' => '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured',
987
+ )
988
+ );
989
+
990
+ $this->add_responsive_control(
991
+ 'featured_margin',
992
+ array(
993
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
994
+ 'type' => Controls_Manager::DIMENSIONS,
995
+ 'size_units' => array( 'px', 'em', '%' ),
996
+ 'selectors' => array(
997
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
998
+ ),
999
+ )
1000
+ );
1001
+
1002
+ $this->add_responsive_control(
1003
+ 'featured_padding',
1004
+ array(
1005
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1006
+ 'type' => Controls_Manager::DIMENSIONS,
1007
+ 'size_units' => array( 'px', 'em', '%' ),
1008
+ 'selectors' => array(
1009
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1010
+ ),
1011
+ )
1012
+ );
1013
+
1014
+ $this->end_controls_section();
1015
+
1016
+ }
1017
+
1018
+ /**
1019
+ * Register Quick View Style Controls.
1020
+ *
1021
+ * @since 4.7.0
1022
+ * @access public
1023
+ */
1024
+ public function register_quick_style_controls() {
1025
+
1026
+ $this->start_controls_section(
1027
+ 'section_quick_view_style',
1028
+ array(
1029
+ 'label' => __( 'Quick View Button', 'premium-addons-for-elementor' ),
1030
+ 'tab' => Controls_Manager::TAB_STYLE,
1031
+ 'condition' => array(
1032
+ $this->get_control_id( 'quick_view' ) => 'yes',
1033
+ $this->get_control_id( 'quick_view_type' ) => 'button',
1034
+ ),
1035
+ )
1036
+ );
1037
+
1038
+ $this->add_group_control(
1039
+ Group_Control_Typography::get_type(),
1040
+ array(
1041
+ 'name' => 'qv_typography',
1042
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1043
+ 'global' => array(
1044
+ 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
1045
+ ),
1046
+ )
1047
+ );
1048
+
1049
+ $this->add_responsive_control(
1050
+ 'qv_padding',
1051
+ array(
1052
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1053
+ 'type' => Controls_Manager::DIMENSIONS,
1054
+ 'size_units' => array( 'px', 'em', '%' ),
1055
+ 'selectors' => array(
1056
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1057
+ ),
1058
+ )
1059
+ );
1060
+
1061
+ $this->start_controls_tabs( 'qv_style_tabs' );
1062
+
1063
+ $this->start_controls_tab(
1064
+ 'qv_style_tab_normal',
1065
+ array(
1066
+ 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
1067
+ )
1068
+ );
1069
+
1070
+ $this->add_control(
1071
+ 'qv_color',
1072
+ array(
1073
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1074
+ 'type' => Controls_Manager::COLOR,
1075
+ 'selectors' => array(
1076
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn' => 'color: {{VALUE}};',
1077
+ ),
1078
+ )
1079
+ );
1080
+
1081
+ $this->add_group_control(
1082
+ Group_Control_Background::get_type(),
1083
+ array(
1084
+ 'name' => 'qv_background',
1085
+ 'types' => array( 'classic', 'gradient' ),
1086
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1087
+ )
1088
+ );
1089
+
1090
+ $this->add_group_control(
1091
+ Group_Control_Box_Shadow::get_type(),
1092
+ array(
1093
+ 'name' => 'qv_shadow',
1094
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1095
+ )
1096
+ );
1097
+
1098
+ $this->add_group_control(
1099
+ Group_Control_Border::get_type(),
1100
+ array(
1101
+ 'name' => 'qv_border',
1102
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn',
1103
+ )
1104
+ );
1105
+
1106
+ $this->add_control(
1107
+ 'qv_radius',
1108
+ array(
1109
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1110
+ 'type' => Controls_Manager::DIMENSIONS,
1111
+ 'size_units' => array( 'px', 'em', '%' ),
1112
+ 'selectors' => array(
1113
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1114
+ ),
1115
+ )
1116
+ );
1117
+
1118
+ $this->end_controls_tab();
1119
+
1120
+ $this->start_controls_tab(
1121
+ 'qv_style_tab_hover',
1122
+ array(
1123
+ 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
1124
+ )
1125
+ );
1126
+
1127
+ $this->add_control(
1128
+ 'qv_color_hover',
1129
+ array(
1130
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1131
+ 'type' => Controls_Manager::COLOR,
1132
+ 'selectors' => array(
1133
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover' => 'color: {{VALUE}}',
1134
+ ),
1135
+ )
1136
+ );
1137
+
1138
+ $this->add_group_control(
1139
+ Group_Control_Background::get_type(),
1140
+ array(
1141
+ 'name' => 'qv_background_hover',
1142
+ 'types' => array( 'classic', 'gradient' ),
1143
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover',
1144
+ )
1145
+ );
1146
+
1147
+ $this->add_group_control(
1148
+ Group_Control_Box_Shadow::get_type(),
1149
+ array(
1150
+ 'name' => 'qv_shadow_hover',
1151
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover',
1152
+ )
1153
+ );
1154
+
1155
+ $this->add_group_control(
1156
+ Group_Control_Border::get_type(),
1157
+ array(
1158
+ 'name' => 'qv_border_hover',
1159
+ 'selector' => '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover',
1160
+ )
1161
+ );
1162
+
1163
+ $this->add_control(
1164
+ 'qv_radius_hover',
1165
+ array(
1166
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1167
+ 'type' => Controls_Manager::DIMENSIONS,
1168
+ 'size_units' => array( 'px', '%', 'em' ),
1169
+ 'selectors' => array(
1170
+ '{{WRAPPER}} .premium-woocommerce .premium-woo-qv-btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1171
+ ),
1172
+ )
1173
+ );
1174
+
1175
+ $this->end_controls_tab();
1176
+
1177
+ $this->end_controls_tabs();
1178
+
1179
+ $this->end_controls_section();
1180
+
1181
+ }
1182
+
1183
+
1184
+ /**
1185
+ * Render Main HTML.
1186
+ *
1187
+ * @since 1.5.0
1188
+ * @access protected
1189
+ */
1190
+ public function render() {
1191
+
1192
+ $settings = $this->parent->get_settings();
1193
+
1194
+ $skin = Skin_Init::get_instance( $this->get_id() );
1195
+
1196
+ echo $skin->render( $this->get_id(), $settings, $this->parent->get_id() );
1197
+ }
1198
+ }
modules/woocommerce/skins/skin-4.php CHANGED
@@ -727,7 +727,7 @@ class Skin_4 extends Skin_Base {
727
  ),
728
  ),
729
  'selectors' => array(
730
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
731
  ),
732
  )
733
  );
@@ -895,7 +895,7 @@ class Skin_4 extends Skin_Base {
895
  ),
896
  ),
897
  'selectors' => array(
898
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
899
  ),
900
  )
901
  );
727
  ),
728
  ),
729
  'selectors' => array(
730
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
731
  ),
732
  )
733
  );
895
  ),
896
  ),
897
  'selectors' => array(
898
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
899
  ),
900
  )
901
  );
modules/woocommerce/skins/skin-5.php CHANGED
@@ -709,7 +709,7 @@ class Skin_5 extends Skin_Base {
709
  ),
710
  ),
711
  'selectors' => array(
712
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
713
  ),
714
  )
715
  );
@@ -879,7 +879,7 @@ class Skin_5 extends Skin_Base {
879
  ),
880
  ),
881
  'selectors' => array(
882
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
883
  ),
884
  )
885
  );
709
  ),
710
  ),
711
  'selectors' => array(
712
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
713
  ),
714
  )
715
  );
879
  ),
880
  ),
881
  'selectors' => array(
882
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
883
  ),
884
  )
885
  );
modules/woocommerce/skins/skin-6.php CHANGED
@@ -712,7 +712,7 @@ class Skin_6 extends Skin_Base {
712
  ),
713
  ),
714
  'selectors' => array(
715
- '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
716
  ),
717
  )
718
  );
@@ -880,7 +880,7 @@ class Skin_6 extends Skin_Base {
880
  ),
881
  ),
882
  'selectors' => array(
883
- '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
884
  ),
885
  )
886
  );
712
  ),
713
  ),
714
  'selectors' => array(
715
+ '{{WRAPPER}} .premium-woo-product-sale-wrap .premium-woo-product-onsale' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
716
  ),
717
  )
718
  );
880
  ),
881
  ),
882
  'selectors' => array(
883
+ '{{WRAPPER}} .premium-woo-product-featured-wrap .premium-woo-product-featured' => 'min-height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
884
  ),
885
  )
886
  );
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons for Elementor plugin includes widgets and addons like Blog Post Grid, Gallery, WooCommerce Listing , Carousel, Modal Popup, Google Maps, Pricing Tables, Lottie Animations, Countdown, Testimonials.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 4.8.0
7
  Elementor tested up to: 3.5.3
8
  Elementor Pro tested up to: 3.5.2
9
  Author: Leap13
@@ -18,12 +18,12 @@ if ( ! defined( 'ABSPATH' ) ) {
18
  }
19
 
20
  // Define Constants.
21
- define( 'PREMIUM_ADDONS_VERSION', '4.8.0' );
22
  define( 'PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
23
  define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
24
  define( 'PREMIUM_ADDONS_FILE', __FILE__ );
25
  define( 'PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
26
- define( 'PREMIUM_ADDONS_STABLE_VERSION', '4.7.9' );
27
 
28
  /*
29
  * Load plugin core file
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons for Elementor plugin includes widgets and addons like Blog Post Grid, Gallery, WooCommerce Listing , Carousel, Modal Popup, Google Maps, Pricing Tables, Lottie Animations, Countdown, Testimonials.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 4.8.1
7
  Elementor tested up to: 3.5.3
8
  Elementor Pro tested up to: 3.5.2
9
  Author: Leap13
18
  }
19
 
20
  // Define Constants.
21
+ define( 'PREMIUM_ADDONS_VERSION', '4.8.1' );
22
  define( 'PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
23
  define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
24
  define( 'PREMIUM_ADDONS_FILE', __FILE__ );
25
  define( 'PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
26
+ define( 'PREMIUM_ADDONS_STABLE_VERSION', '4.8.0' );
27
 
28
  /*
29
  * Load plugin core file
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate Link: https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_c
5
  Requires at least: 5.0
6
  Tested Up To: 5.8.2
7
  Requires PHP: 5.4
8
- Stable Tag: 4.8.0
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -204,6 +204,10 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
204
 
205
  == Changelog ==
206
 
 
 
 
 
207
  = 4.8.0 =
208
 
209
  - Tweak: Cache time changed to Day instead of Hour in Video Box widget to prevent exceeding Google API quota in Video Box widget.
5
  Requires at least: 5.0
6
  Tested Up To: 5.8.2
7
  Requires PHP: 5.4
8
+ Stable Tag: 4.8.1
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
204
 
205
  == Changelog ==
206
 
207
+ = 4.8.1 =
208
+
209
+ - Tweak: PHP Code refactored for better performance and security.
210
+
211
  = 4.8.0 =
212
 
213
  - Tweak: Cache time changed to Day instead of Hour in Video Box widget to prevent exceeding Google API quota in Video Box widget.