Premium Addons for Elementor - Version 4.7.3

Version Description

  • Tweak: Added WooCommerce Total Amount In Cart and Current Product Stock options in Display Conditions feature.
  • Tweak: Added Custom Height option for multiple members in Team Members option.
  • Fixed: Compare value is printed while using Display Conditions feature.
  • Fixed: Metadata separator is not removed when more posts are loaded in Blog widget.
Download this release

Release Info

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

Code changes from version 4.7.2 to 4.7.3

admin/assets/js/pa-notice.js CHANGED
@@ -1,66 +1,65 @@
1
- (function ($) {
2
-
3
- var $noticeWrap = $(".pa-notice-wrap"),
4
- notice = $noticeWrap.data('notice');
5
-
6
- var adminNotices = {
7
- 'radius': 'radius_notice',
8
- 'bf21': 'bf21_notice',
9
- };
10
-
11
- if (undefined !== notice) {
12
-
13
- $noticeWrap.find('.pa-notice-reset').on(
14
- "click",
15
- function () {
16
-
17
- $noticeWrap.css('display', 'none');
18
-
19
- $.ajax(
20
- {
21
- url: ajaxurl,
22
- type: 'POST',
23
- data: {
24
- action: 'pa_reset_admin_notice',
25
- notice: $noticeWrap.data('notice'),
26
- nonce: PaNoticeSettings.nonce,
27
- }
28
- }
29
- );
30
-
31
- }
32
- );
33
- }
34
-
35
- $(".pa-notice-close").on(
36
- "click",
37
- function () {
38
-
39
- var noticeID = $(this).data('notice');
40
-
41
- if (noticeID) {
42
- $(this).closest('.pa-new-feature-notice').remove();
43
-
44
- $.ajax(
45
- {
46
- url: ajaxurl,
47
- type: 'POST',
48
- data: {
49
- action: 'pa_dismiss_admin_notice',
50
- notice: adminNotices[noticeID],
51
- nonce: PaNoticeSettings.nonce,
52
- },
53
- success: function (res) {
54
- console.log(res);
55
- },
56
- error: function (err) {
57
- console.log(err);
58
- }
59
- }
60
- );
61
- }
62
-
63
- }
64
- );
65
-
66
- })(jQuery);
1
+ (function ($) {
2
+
3
+ var $noticeWrap = $(".pa-notice-wrap"),
4
+ notice = $noticeWrap.data('notice');
5
+
6
+ var adminNotices = {
7
+ 'radius': 'radius_notice',
8
+ };
9
+
10
+ if (undefined !== notice) {
11
+
12
+ $noticeWrap.find('.pa-notice-reset').on(
13
+ "click",
14
+ function () {
15
+
16
+ $noticeWrap.css('display', 'none');
17
+
18
+ $.ajax(
19
+ {
20
+ url: ajaxurl,
21
+ type: 'POST',
22
+ data: {
23
+ action: 'pa_reset_admin_notice',
24
+ notice: $noticeWrap.data('notice'),
25
+ nonce: PaNoticeSettings.nonce,
26
+ }
27
+ }
28
+ );
29
+
30
+ }
31
+ );
32
+ }
33
+
34
+ $(".pa-notice-close").on(
35
+ "click",
36
+ function () {
37
+
38
+ var noticeID = $(this).data('notice');
39
+
40
+ if (noticeID) {
41
+ $(this).closest('.pa-new-feature-notice').remove();
42
+
43
+ $.ajax(
44
+ {
45
+ url: ajaxurl,
46
+ type: 'POST',
47
+ data: {
48
+ action: 'pa_dismiss_admin_notice',
49
+ notice: adminNotices[noticeID],
50
+ nonce: PaNoticeSettings.nonce,
51
+ },
52
+ success: function (res) {
53
+ console.log(res);
54
+ },
55
+ error: function (err) {
56
+ console.log(err);
57
+ }
58
+ }
59
+ );
60
+ }
61
+
62
+ }
63
+ );
64
+
65
+ })(jQuery);
 
admin/includes/admin-notices.php CHANGED
@@ -1,425 +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
- 'bf21_notice',
64
- 'pa-review',
65
- );
66
-
67
- delete_option( 'new_features_notice' );
68
-
69
- }
70
-
71
- /**
72
- * init required functions
73
- */
74
- public function init() {
75
-
76
- $this->handle_review_notice();
77
-
78
- $this->handle_bf_notice();
79
-
80
- }
81
-
82
- /**
83
- * init notices check functions
84
- */
85
- public function admin_notices() {
86
-
87
- $this->required_plugins_check();
88
-
89
- $cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
90
-
91
- $response = get_transient( $cache_key );
92
-
93
- $show_review = get_option( 'pa_review_notice' );
94
-
95
- // Make sure Already did was not clicked before.
96
- if ( '1' !== $show_review ) {
97
- if ( false == $response ) {
98
- $this->get_review_notice();
99
- }
100
- }
101
-
102
- $this->get_bf_notice();
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
- * Checks if Black Friday message is dismissed.
133
- *
134
- * @since 4.7.1
135
- * @access public
136
- *
137
- * @return void
138
- */
139
- public function handle_bf_notice() {
140
-
141
- if ( ! isset( $_GET['bf21'] ) ) {
142
- return;
143
- }
144
-
145
- if ( 'opt_out' === $_GET['bf21'] ) {
146
- check_admin_referer( 'opt_out' );
147
-
148
- update_option( 'bf21_notice', '1' );
149
- }
150
-
151
- wp_redirect( remove_query_arg( 'bf21' ) );
152
- exit;
153
- }
154
-
155
- /**
156
- * Required plugin check
157
- *
158
- * Shows an admin notice when Elementor is missing.
159
- *
160
- * @access public
161
- *
162
- * @return boolean
163
- */
164
- public function required_plugins_check() {
165
-
166
- $elementor_path = sprintf( '%1$s/%1$s.php', self::$elementor );
167
-
168
- if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
169
-
170
- if ( ! Helper_Functions::is_plugin_installed( $elementor_path ) ) {
171
-
172
- if ( Admin_Helper::check_user_can( 'install_plugins' ) ) {
173
-
174
- $install_url = wp_nonce_url( self_admin_url( sprintf( 'update.php?action=install-plugin&plugin=%s', self::$elementor ) ), 'install-plugin_elementor' );
175
-
176
- $message = sprintf( '<p>%s</p>', __( 'Premium Addons for Elementor is not working because you need to Install Elementor plugin.', 'premium-addons-for-elementor' ) );
177
-
178
- $message .= sprintf( '<p><a href="%s" class="button-primary">%s</a></p>', $install_url, __( 'Install Now', 'premium-addons-for-elementor' ) );
179
-
180
- }
181
- } else {
182
-
183
- if ( Admin_Helper::check_user_can( 'activate_plugins' ) ) {
184
-
185
- $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 );
186
-
187
- $message = '<p>' . __( 'Premium Addons for Elementor is not working because you need to activate Elementor plugin.', 'premium-addons-for-elementor' ) . '</p>';
188
-
189
- $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'premium-addons-for-elementor' ) ) . '</p>';
190
-
191
- }
192
- }
193
- $this->render_admin_notices( $message );
194
- }
195
- }
196
-
197
- /**
198
- * Gets admin review notice HTML
199
- *
200
- * @since 2.8.4
201
- * @return void
202
- */
203
- public function get_review_text( $review_url, $optout_url ) {
204
-
205
- $notice = sprintf(
206
- '<p>' . __( 'Can we take only 2 minutes of your time? We would be really grateful it if you give ', 'premium-addons-for-elementor' ) .
207
- '<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>
208
- <div>
209
- <a class="button button-primary" href="%s" target="_blank"><span>' . __( 'Leave a Review', 'premium-addons-for-elementor' ) . '</span></a>
210
- <a class="button" href="%2$s"><span>' . __( 'I Already Did', 'premium-addons-for-elementor' ) . '</span></a>
211
- <a class="button button-secondary pa-notice-reset"><span>' . __( 'Maybe Later', 'premium-addons-for-elementor' ) . '</span></a>
212
- </div>',
213
- $review_url,
214
- $optout_url
215
- );
216
-
217
- return $notice;
218
- }
219
-
220
- /**
221
- * Checks if review admin notice is dismissed
222
- *
223
- * @since 2.6.8
224
- * @return void
225
- */
226
- public function get_review_notice() {
227
-
228
- $review_url = 'https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/?filter=5';
229
-
230
- $optout_url = wp_nonce_url( add_query_arg( 'pa_review', 'opt_out' ), 'opt_out' );
231
- ?>
232
-
233
- <div class="error pa-notice-wrap pa-review-notice" data-notice="pa-review">
234
- <div class="pa-img-wrap">
235
- <img src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/pa-logo-symbol.png'; ?>">
236
- </div>
237
- <div class="pa-text-wrap">
238
- <?php echo $this->get_review_text( $review_url, $optout_url ); ?>
239
- </div>
240
- <div class="pa-notice-close">
241
- <a href="<?php echo esc_url( $optout_url ); ?>"><span class="dashicons dashicons-dismiss"></span></a>
242
- </div>
243
- </div>
244
-
245
- <?php
246
-
247
- }
248
-
249
- /**
250
- *
251
- * Shows admin notice for Black Friday Sale.
252
- *
253
- * @since 4.4.1
254
- * @access public
255
- *
256
- * @return void
257
- */
258
- public function get_bf_notice() {
259
-
260
- $papro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
261
-
262
- $is_papro_installed = Helper_Functions::is_plugin_installed( $papro_path );
263
-
264
- $license_status = get_option( 'papro_license_status' );
265
-
266
- $bf_notice = get_option( 'bf21_notice' );
267
-
268
- if ( ( $is_papro_installed && 'valid' === $license_status ) || '1' === $bf_notice ) {
269
- return;
270
- }
271
-
272
- $link = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/black-friday/', 'wp-dash', 'bf21-notification', 'bf21' );
273
-
274
- ?>
275
-
276
- <div class="error pa-notice-wrap pa-new-feature-notice pa-review-notice">
277
- <div class="pa-img-wrap">
278
- <img src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/pa-logo-symbol.png'; ?>">
279
- </div>
280
- <div class="pa-text-wrap">
281
- <p>
282
- <?php echo __( 'Black Friday! Get <b>25% Discount</b> for a Limited Time Only', 'premium-addons-for-elementor' ); ?>
283
- <a class="button button-primary" href="<?php echo esc_url( $link ); ?>" target="_blank">
284
- <span><?php echo __( 'Get The Deal', 'premium-addons-for-elementor' ); ?></span>
285
- </a>
286
- </p>
287
- </div>
288
- <div class="pa-notice-close" data-notice="bf21">
289
- <span class="dashicons dashicons-dismiss"></span>
290
- </div>
291
- </div>
292
-
293
- <?php
294
- }
295
-
296
- /**
297
- * Renders an admin notice error message
298
- *
299
- * @since 1.0.0
300
- * @access private
301
- *
302
- * @return void
303
- */
304
- private function render_admin_notices( $message, $class = '', $handle = '' ) {
305
- ?>
306
- <div class="error pa-new-feature-notice <?php echo $class; ?>" data-notice="<?php echo $handle; ?>">
307
- <?php echo $message; ?>
308
- </div>
309
- <?php
310
- }
311
-
312
- /*
313
- * Register admin scripts
314
- *
315
- * @since 3.2.8
316
- * @access public
317
- *
318
- */
319
- public function admin_enqueue_scripts() {
320
-
321
- wp_enqueue_script(
322
- 'pa-notice',
323
- PREMIUM_ADDONS_URL . 'admin/assets/js/pa-notice.js',
324
- array( 'jquery' ),
325
- PREMIUM_ADDONS_VERSION,
326
- true
327
- );
328
-
329
- wp_localize_script(
330
- 'pa-notice',
331
- 'PaNoticeSettings',
332
- array(
333
- 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
334
- 'nonce' => wp_create_nonce( 'pa-notice-nonce' ),
335
- )
336
- );
337
-
338
- }
339
-
340
- /**
341
- * Set transient for admin notice
342
- *
343
- * @since 3.2.8
344
- * @access public
345
- *
346
- * @return void
347
- */
348
- public function reset_admin_notice() {
349
-
350
- check_ajax_referer( 'pa-notice-nonce', 'nonce' );
351
-
352
- if ( ! Admin_Helper::check_user_can( 'manage_options' ) ) {
353
- wp_send_json_error();
354
- }
355
-
356
- $key = isset( $_POST['notice'] ) ? $_POST['notice'] : '';
357
-
358
- if ( ! empty( $key ) && in_array( $key, self::$notices, true ) ) {
359
-
360
- $cache_key = 'premium_notice_' . PREMIUM_ADDONS_VERSION;
361
-
362
- set_transient( $cache_key, true, WEEK_IN_SECONDS );
363
-
364
- wp_send_json_success();
365
-
366
- } else {
367
-
368
- wp_send_json_error();
369
-
370
- }
371
-
372
- }
373
-
374
- /**
375
- * Dismiss admin notice
376
- *
377
- * @since 3.11.7
378
- * @access public
379
- *
380
- * @return void
381
- */
382
- public function dismiss_admin_notice() {
383
-
384
- check_ajax_referer( 'pa-notice-nonce', 'nonce' );
385
-
386
- if ( ! current_user_can( 'manage_options' ) ) {
387
- wp_send_json_error();
388
- }
389
-
390
- $key = isset( $_POST['notice'] ) ? $_POST['notice'] : '';
391
-
392
- if ( ! empty( $key ) && in_array( $key, self::$notices, true ) ) {
393
-
394
- update_option( $key, '1' );
395
-
396
- wp_send_json_success();
397
-
398
- } else {
399
-
400
- wp_send_json_error();
401
-
402
- }
403
-
404
- }
405
-
406
- /**
407
- * Creates and returns an instance of the class
408
- *
409
- * @since 2.8.4
410
- * @access public
411
- *
412
- * @return object
413
- */
414
- public static function get_instance() {
415
-
416
- if ( self::$instance == null ) {
417
-
418
- self::$instance = new self();
419
-
420
- }
421
-
422
- return self::$instance;
423
- }
424
-
425
- }
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( 'bf21_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>' . __( '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
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/frontend/js/premium-addons.js CHANGED
@@ -1,2286 +1,2293 @@
1
- (function ($) {
2
-
3
- $(window).on('elementor/frontend/init', function () {
4
- var ModuleHandler = elementorModules.frontend.handlers.Base;
5
-
6
- /****** Premium Progress Bar Handler ******/
7
- var PremiumProgressBarWidgetHandler = function ($scope, trigger) {
8
-
9
- var $progressbarElem = $scope.find(".premium-progressbar-container"),
10
- settings = $progressbarElem.data("settings"),
11
- length = settings.progress_length,
12
- speed = settings.speed,
13
- type = settings.type;
14
-
15
-
16
- if ("line" === type) {
17
-
18
- var $progressbar = $progressbarElem.find(".premium-progressbar-bar");
19
-
20
- if (settings.gradient)
21
- $progressbar.css("background", "linear-gradient(-45deg, " + settings.gradient + ")");
22
-
23
- $progressbar.animate({
24
- width: length + "%"
25
- }, speed);
26
-
27
- } else if ("circle" === type) {
28
- if (length > 100)
29
- length = 100;
30
-
31
- $progressbarElem.prop({
32
- 'counter': 0
33
- }).animate({
34
- counter: length
35
- }, {
36
- duration: speed,
37
- easing: 'linear',
38
- step: function (counter) {
39
- var rotate = (counter * 3.6);
40
-
41
- $progressbarElem.find(".premium-progressbar-right-label span").text(Math.ceil(counter) + "%");
42
-
43
- $progressbarElem.find(".premium-progressbar-circle-left").css('transform', "rotate(" + rotate + "deg)");
44
- if (rotate > 180) {
45
-
46
- $progressbarElem.find(".premium-progressbar-circle").css({
47
- '-webkit-clip-path': 'inset(0)',
48
- 'clip-path': 'inset(0)',
49
- });
50
-
51
- $progressbarElem.find(".premium-progressbar-circle-right").css('visibility', 'visible');
52
- }
53
- }
54
- });
55
-
56
- } else {
57
-
58
- var $progressbar = $progressbarElem.find(".premium-progressbar-bar-wrap"),
59
- width = $progressbarElem.outerWidth(),
60
- dotSize = settings.dot || 25,
61
- dotSpacing = settings.spacing || 10,
62
- numberOfCircles = Math.ceil(width / (dotSize + dotSpacing)),
63
- circlesToFill = numberOfCircles * (length / 100),
64
- numberOfTotalFill = Math.floor(circlesToFill),
65
- fillPercent = 100 * (circlesToFill - numberOfTotalFill);
66
-
67
- $progressbar.attr('data-circles', numberOfCircles);
68
- $progressbar.attr('data-total-fill', numberOfTotalFill);
69
- $progressbar.attr('data-partial-fill', fillPercent);
70
-
71
- var className = "progress-segment";
72
- for (var i = 0; i < numberOfCircles; i++) {
73
- className = "progress-segment";
74
- var innerHTML = '';
75
-
76
- if (i < numberOfTotalFill) {
77
- innerHTML = "<div class='segment-inner'></div>";
78
- } else if (i === numberOfTotalFill) {
79
-
80
- innerHTML = "<div class='segment-inner'></div>";
81
- }
82
-
83
- $progressbar.append("<div class='" + className + "'>" + innerHTML + "</div>");
84
-
85
- }
86
-
87
- if ("frontend" !== trigger) {
88
- PremiumProgressDotsHandler($scope);
89
- }
90
-
91
- }
92
-
93
- };
94
-
95
- var PremiumProgressDotsHandler = function ($scope) {
96
-
97
- var $progressbarElem = $scope.find(".premium-progressbar-container"),
98
- settings = $progressbarElem.data("settings"),
99
- $progressbar = $scope.find(".premium-progressbar-bar-wrap"),
100
- data = $progressbar.data(),
101
- speed = settings.speed,
102
- increment = 0;
103
-
104
- var numberOfTotalFill = data.totalFill,
105
- numberOfCircles = data.circles,
106
- fillPercent = data.partialFill;
107
-
108
- dotIncrement(increment);
109
-
110
- function dotIncrement(inc) {
111
-
112
- var $dot = $progressbar.find(".progress-segment").eq(inc),
113
- dotWidth = 100;
114
-
115
- if (inc === numberOfTotalFill)
116
- dotWidth = fillPercent
117
-
118
- $dot.find(".segment-inner").animate({
119
- width: dotWidth + '%'
120
- }, speed / numberOfCircles, function () {
121
- increment++;
122
- if (increment <= numberOfTotalFill) {
123
- dotIncrement(increment);
124
- }
125
-
126
- });
127
- }
128
- };
129
-
130
- /****** Premium Progress Bar Scroll Handler *****/
131
- var PremiumProgressBarScrollWidgetHandler = function ($scope, $) {
132
-
133
- var $progressbarElem = $scope.find(".premium-progressbar-container"),
134
- settings = $progressbarElem.data("settings"),
135
- type = settings.type;
136
-
137
- if ("dots" === type) {
138
- PremiumProgressBarWidgetHandler($scope, "frontend");
139
- }
140
-
141
- elementorFrontend.waypoint($scope, function () {
142
- if ("dots" !== type) {
143
- PremiumProgressBarWidgetHandler($(this));
144
- } else {
145
- PremiumProgressDotsHandler($(this));
146
- }
147
-
148
- });
149
- };
150
-
151
- /****** Premium Video Box Handler ******/
152
- var PremiumVideoBoxWidgetHandler = function ($scope, $) {
153
-
154
- var $videoBoxElement = $scope.find(".premium-video-box-container"),
155
- $videoListElement = $scope.find(".premium-video-box-playlist-container"),
156
- $videoContainer = $videoBoxElement.find(".premium-video-box-video-container"), //should be clicked
157
- $videoInnerContainer = $videoBoxElement.find('.premium-video-box-inner-wrap'),
158
- $videoImageContainer = $videoInnerContainer.find('.premium-video-box-image-container'),
159
- type = $videoBoxElement.data("type"),
160
- thumbnail = $videoBoxElement.data("thumbnail"),
161
- sticky = $videoBoxElement.data('sticky'),
162
- stickyOnPlay = $videoBoxElement.data('sticky-play'),
163
- hoverEffect = $videoBoxElement.data("hover"),
164
- video, vidSrc;
165
-
166
- // Youtube playlist option
167
- if ($videoListElement.length) {
168
-
169
- //Make sure that video were pulled from the API.
170
- if (!$videoContainer.length)
171
- return;
172
-
173
- $videoContainer.each(function (index, item) {
174
-
175
- var vidSrc,
176
- $videoContainer = $(item),
177
- $videoBoxElement = $videoContainer.closest(".premium-video-box-container"),
178
- $trigger = $videoContainer.closest(".premium-video-box-trigger");
179
-
180
- vidSrc = $videoContainer.data("src");
181
- vidSrc = vidSrc + "&autoplay=1";
182
-
183
- $trigger.on("click", function () {
184
-
185
- var $iframe = $("<iframe/>");
186
-
187
- $iframe.attr({
188
- "src": vidSrc,
189
- "frameborder": "0",
190
- "allowfullscreen": "1",
191
- "allow": "autoplay;encrypted-media;"
192
- });
193
- $videoContainer.css("background", "#000");
194
- $videoContainer.html($iframe);
195
-
196
- $videoBoxElement.find(
197
- ".premium-video-box-image-container, .premium-video-box-play-icon-container"
198
- ).remove();
199
-
200
- });
201
-
202
- });
203
-
204
- return;
205
- }
206
-
207
- if ("self" === type) {
208
-
209
- video = $videoContainer.find("video");
210
- vidSrc = video.attr("src");
211
-
212
- } else {
213
-
214
- vidSrc = $videoContainer.data("src");
215
-
216
- if (!thumbnail || -1 !== vidSrc.indexOf("autoplay=1")) {
217
-
218
- //Check if Autoplay on viewport option is enabled
219
- if ($videoBoxElement.data("play-viewport")) {
220
- elementorFrontend.waypoint($videoBoxElement, function () {
221
- playVideo();
222
- });
223
- } else {
224
- playVideo();
225
- }
226
-
227
- } else {
228
- vidSrc = vidSrc + "&autoplay=1";
229
- }
230
-
231
- }
232
-
233
- function playVideo() {
234
-
235
- if ($videoBoxElement.hasClass("playing")) return;
236
-
237
- $videoBoxElement.addClass("playing");
238
-
239
- if (stickyOnPlay === 'yes')
240
- stickyOption();
241
-
242
- if ("self" === type) {
243
-
244
- $(video).get(0).play();
245
-
246
- $videoContainer.css({
247
- opacity: "1",
248
- visibility: "visible"
249
- });
250
-
251
- } else {
252
-
253
- var $iframe = $("<iframe/>");
254
-
255
- $iframe.attr({
256
- "src": vidSrc,
257
- "frameborder": "0",
258
- "allowfullscreen": "1",
259
- "allow": "autoplay;encrypted-media;"
260
- });
261
- $videoContainer.css("background", "#000");
262
- $videoContainer.html($iframe);
263
- }
264
-
265
- $videoBoxElement.find(
266
- ".premium-video-box-image-container, .premium-video-box-play-icon-container, .premium-video-box-description-container"
267
- ).remove();
268
-
269
- if ("vimeo" === type)
270
- $videoBoxElement.find(".premium-video-box-vimeo-wrap").remove();
271
- }
272
-
273
- $videoBoxElement.on("click", function () {
274
- playVideo();
275
- });
276
-
277
-
278
- if ("yes" !== sticky || "yes" === stickyOnPlay)
279
- return;
280
-
281
- stickyOption();
282
-
283
- function stickyOption() {
284
-
285
- var stickyDesktop = $videoBoxElement.data('hide-desktop'),
286
- stickyTablet = $videoBoxElement.data('hide-tablet'),
287
- stickyMobile = $videoBoxElement.data('hide-mobile'),
288
- stickyMargin = $videoBoxElement.data('sticky-margin');
289
-
290
- $videoBoxElement.off('click').on('click', function (e) {
291
- // if ('yes' === sticky) {
292
- var stickyTarget = e.target.className;
293
- if ((stickyTarget.toString().indexOf('premium-video-box-sticky-close') >= 0) || (stickyTarget.toString().indexOf('premium-video-box-sticky-close') >= 0)) {
294
- return false;
295
- }
296
- // }
297
- playVideo();
298
-
299
- });
300
-
301
- //Make sure Elementor Waypoint is defined
302
- if (typeof elementorFrontend.waypoint !== 'undefined') {
303
-
304
- var stickyWaypoint = elementorFrontend.waypoint(
305
- $videoBoxElement,
306
- function (direction) {
307
- if ('down' === direction) {
308
-
309
- $videoBoxElement.removeClass('premium-video-box-sticky-hide').addClass('premium-video-box-sticky-apply premium-video-box-filter-sticky');
310
-
311
- //Fix conflict with Elementor motion effects
312
- if ($scope.hasClass("elementor-motion-effects-parent")) {
313
- $scope.removeClass("elementor-motion-effects-perspective").find(".elementor-widget-container").addClass("premium-video-box-transform");
314
- }
315
-
316
- if ($videoBoxElement.data("mask")) {
317
- //Fix Sticky position issue when drop-shadow is applied
318
- $scope.find(".premium-video-box-mask-filter").removeClass("premium-video-box-mask-filter");
319
-
320
- $videoBoxElement.find(':first-child').removeClass('premium-video-box-mask-media');
321
-
322
- $videoImageContainer.removeClass(hoverEffect).removeClass('premium-video-box-mask-media').css({
323
- 'transition': 'width 0.2s, height 0.2s',
324
- '-webkit-transition': 'width 0.2s, height 0.2s'
325
- });
326
- }
327
-
328
- $(document).trigger('premium_after_sticky_applied', [$scope]);
329
-
330
- // Entrance Animation Option
331
- if ($videoInnerContainer.data("video-animation") && " " != $videoInnerContainer.data("video-animation")) {
332
- $videoInnerContainer.css("opacity", "0");
333
- var animationDelay = $videoInnerContainer.data('delay-animation');
334
- setTimeout(function () {
335
-
336
- $videoInnerContainer.css("opacity", "1").addClass("animated " + $videoInnerContainer.data("video-animation"));
337
-
338
- }, animationDelay * 1000);
339
- }
340
-
341
- } else {
342
-
343
- $videoBoxElement.removeClass('premium-video-box-sticky-apply premium-video-box-filter-sticky').addClass('premium-video-box-sticky-hide');
344
-
345
- //Fix conflict with Elementor motion effects
346
- if ($scope.hasClass("elementor-motion-effects-parent")) {
347
- $scope.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform");
348
- }
349
-
350
- if ($videoBoxElement.data("mask")) {
351
- //Fix Sticky position issue when drop-shadow is applied
352
- $videoBoxElement.parent().addClass("premium-video-box-mask-filter");
353
-
354
- $videoBoxElement.find(':first-child').eq(0).addClass('premium-video-box-mask-media');
355
- $videoImageContainer.addClass('premium-video-box-mask-media');
356
- }
357
-
358
- $videoImageContainer.addClass(hoverEffect).css({
359
- 'transition': 'all 0.2s',
360
- '-webkit-transition': 'all 0.2s'
361
- });
362
-
363
- $videoInnerContainer.removeClass("animated " + $videoInnerContainer.data("video-animation"));
364
- }
365
- }, {
366
- offset: 0 + '%',
367
- triggerOnce: false
368
- }
369
- );
370
- }
371
-
372
- var closeBtn = $scope.find('.premium-video-box-sticky-close');
373
-
374
- closeBtn.off('click.closetrigger').on('click.closetrigger', function (e) {
375
- stickyWaypoint[0].disable();
376
-
377
- $videoBoxElement.removeClass('premium-video-box-sticky-apply premium-video-box-sticky-hide');
378
-
379
- //Fix conflict with Elementor motion effects
380
- if ($scope.hasClass("elementor-motion-effects-parent")) {
381
- $scope.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform");
382
- }
383
-
384
- if ($videoBoxElement.data("mask")) {
385
- //Fix Sticky position issue when drop-shadow is applied
386
- $videoBoxElement.parent().addClass("premium-video-box-mask-filter");
387
-
388
- //Necessary classes for mask shape option
389
- $videoBoxElement.find(':first-child').eq(0).addClass('premium-video-box-mask-media');
390
- $videoImageContainer.addClass('premium-video-box-mask-media');
391
- }
392
-
393
-
394
- });
395
-
396
- checkResize(stickyWaypoint);
397
-
398
- checkScroll();
399
-
400
- window.addEventListener("scroll", checkScroll);
401
-
402
- $(window).resize(function (e) {
403
- checkResize(stickyWaypoint);
404
- });
405
-
406
- function checkResize(stickyWaypoint) {
407
- var currentDeviceMode = elementorFrontend.getCurrentDeviceMode();
408
-
409
- if ('' !== stickyDesktop && currentDeviceMode == stickyDesktop) {
410
- disableSticky(stickyWaypoint);
411
- } else if ('' !== stickyTablet && currentDeviceMode == stickyTablet) {
412
- disableSticky(stickyWaypoint);
413
- } else if ('' !== stickyMobile && currentDeviceMode == stickyMobile) {
414
- disableSticky(stickyWaypoint);
415
- } else {
416
- stickyWaypoint[0].enable();
417
- }
418
- }
419
-
420
- function disableSticky(stickyWaypoint) {
421
- stickyWaypoint[0].disable();
422
- $videoBoxElement.removeClass('premium-video-box-sticky-apply premium-video-box-sticky-hide');
423
- }
424
-
425
- function checkScroll() {
426
- if ($videoBoxElement.hasClass('premium-video-box-sticky-apply')) {
427
- $videoInnerContainer.draggable({
428
- start: function () {
429
- $(this).css({
430
- transform: "none",
431
- top: $(this).offset().top + "px",
432
- left: $(this).offset().left + "px"
433
- });
434
- },
435
- containment: 'window'
436
- });
437
- }
438
- }
439
-
440
- $(document).on('premium_after_sticky_applied', function (e, $scope) {
441
- var infobar = $scope.find('.premium-video-box-sticky-infobar');
442
-
443
- if (0 !== infobar.length) {
444
- var infobarHeight = infobar.outerHeight();
445
-
446
- if ($scope.hasClass('premium-video-sticky-center-left') || $scope.hasClass('premium-video-sticky-center-right')) {
447
- infobarHeight = Math.ceil(infobarHeight / 2);
448
- $videoInnerContainer.css('top', 'calc( 50% - ' + infobarHeight + 'px )');
449
- }
450
-
451
- if ($scope.hasClass('premium-video-sticky-bottom-left') || $scope.hasClass('premium-video-sticky-bottom-right')) {
452
- if ('' !== stickyMargin) {
453
- infobarHeight = Math.ceil(infobarHeight);
454
- var stickBottom = infobarHeight + stickyMargin;
455
- $videoInnerContainer.css('bottom', stickBottom);
456
- }
457
- }
458
- }
459
- });
460
-
461
- }
462
-
463
- };
464
-
465
- /****** Premium Media Grid Handler ******/
466
- var PremiumGridWidgetHandler = ModuleHandler.extend({
467
-
468
- settings: {},
469
-
470
- getDefaultSettings: function () {
471
- return {
472
- selectors: {
473
- galleryElement: '.premium-gallery-container',
474
- filters: '.premium-gallery-cats-container li',
475
- gradientLayer: '.premium-gallery-gradient-layer',
476
- loadMore: '.premium-gallery-load-more',
477
- loadMoreDiv: '.premium-gallery-load-more div',
478
- vidWrap: '.premium-gallery-video-wrap',
479
- }
480
- }
481
- },
482
-
483
- getDefaultElements: function () {
484
-
485
- var selectors = this.getSettings('selectors'),
486
- elements = {
487
- $galleryElement: this.$element.find(selectors.galleryElement),
488
- $filters: this.$element.find(selectors.filters),
489
- $gradientLayer: this.$element.find(selectors.gradientLayer),
490
- $vidWrap: this.$element.find(selectors.vidWrap)
491
- };
492
-
493
- elements.$loadMore = elements.$galleryElement.parent().find(selectors.loadMore)
494
- elements.$loadMoreDiv = elements.$galleryElement.parent().find(selectors.loadMoreDiv)
495
-
496
- return elements;
497
- },
498
-
499
- bindEvents: function () {
500
- this.getGlobalSettings();
501
- this.run();
502
- },
503
-
504
- getGlobalSettings: function () {
505
- var $galleryElement = this.elements.$galleryElement,
506
- settings = $galleryElement.data('settings');
507
-
508
- this.settings = {
509
- layout: settings.img_size,
510
- loadMore: settings.load_more,
511
- columnWidth: null,
512
- filter: null,
513
- isFilterClicked: false,
514
- minimum: settings.minimum,
515
- imageToShow: settings.click_images,
516
- counter: settings.minimum,
517
- ltrMode: settings.ltr_mode,
518
- shuffle: settings.shuffle,
519
- active_cat: settings.active_cat,
520
- theme: settings.theme,
521
- overlay: settings.overlay,
522
- sort_by: settings.sort_by,
523
- light_box: settings.light_box,
524
- flag: settings.flag,
525
- lightbox_type: settings.lightbox_type
526
- }
527
- },
528
-
529
- updateCounter: function () {
530
-
531
- if (this.settings.isFilterClicked) {
532
-
533
- this.settings.counter = this.settings.minimum;
534
-
535
- this.settings.isFilterClicked = false;
536
-
537
- } else {
538
- this.settings.counter = this.settings.counter;
539
- }
540
-
541
- this.settings.counter = this.settings.counter + this.settings.imageToShow;
542
- },
543
-
544
- updateGrid: function (gradHeight, $isotopeGallery, $loadMoreDiv) {
545
- $.ajax({
546
- url: this.appendItems(this.settings.counter, gradHeight, $isotopeGallery),
547
- beforeSend: function () {
548
- $loadMoreDiv.removeClass("premium-gallery-item-hidden");
549
- },
550
- success: function () {
551
- $loadMoreDiv.addClass("premium-gallery-item-hidden");
552
- }
553
- });
554
- },
555
-
556
- loadMore: function (gradHeight, $isotopeGallery) {
557
-
558
- var $galleryElement = this.elements.$galleryElement,
559
- $loadMoreDiv = this.elements.$loadMoreDiv,
560
- $loadMore = this.elements.$loadMore,
561
- _this = this;
562
-
563
- $loadMoreDiv.addClass("premium-gallery-item-hidden");
564
-
565
- if ($galleryElement.find(".premium-gallery-item").length > this.settings.minimum) {
566
-
567
- $loadMore.removeClass("premium-gallery-item-hidden");
568
-
569
- $galleryElement.parent().on("click", ".premium-gallery-load-less", function () {
570
- _this.settings.counter = _this.settings.counter - _this.settings.imageToShow;
571
- });
572
-
573
- $galleryElement.parent().on("click", ".premium-gallery-load-more-btn:not(.premium-gallery-load-less)", function () {
574
- _this.updateCounter();
575
- _this.updateGrid(gradHeight, $isotopeGallery, $loadMoreDiv);
576
- });
577
-
578
- }
579
-
580
- },
581
-
582
- getItemsToHide: function (instance, imagesToShow) {
583
- var items = instance.filteredItems.slice(imagesToShow, instance
584
- .filteredItems.length).map(function (item) {
585
- return item.element;
586
- });
587
-
588
- return items;
589
- },
590
-
591
- appendItems: function (imagesToShow, gradHeight, $isotopeGallery) {
592
-
593
- var $galleryElement = this.elements.$galleryElement,
594
- $gradientLayer = this.elements.$gradientLayer,
595
- instance = $galleryElement.data("isotope"),
596
- itemsToHide = this.getItemsToHide(instance, imagesToShow);
597
-
598
- $gradientLayer.outerHeight(gradHeight);
599
-
600
- $galleryElement.find(".premium-gallery-item-hidden").removeClass("premium-gallery-item-hidden");
601
-
602
- $galleryElement.parent().find(".premium-gallery-load-more").removeClass("premium-gallery-item-hidden");
603
-
604
- $(itemsToHide).addClass("premium-gallery-item-hidden");
605
-
606
- $isotopeGallery.isotope("layout");
607
-
608
- if (0 == itemsToHide) {
609
-
610
- $gradientLayer.addClass("premium-gallery-item-hidden");
611
-
612
- $galleryElement.parent().find(".premium-gallery-load-more").addClass("premium-gallery-item-hidden");
613
- }
614
- },
615
-
616
- triggerFilerTabs: function (url) {
617
- var filterIndex = url.searchParams.get(this.settings.flag),
618
- $filters = this.elements.$filters;
619
-
620
- if (filterIndex) {
621
-
622
- var $targetFilter = $filters.eq(filterIndex).find("a");
623
-
624
- $targetFilter.trigger('click');
625
-
626
- }
627
- },
628
-
629
- onReady: function ($isotopeGallery) {
630
- var _this = this;
631
-
632
- $isotopeGallery.isotope("layout");
633
-
634
- $isotopeGallery.isotope({
635
- filter: _this.settings.active_cat
636
- });
637
-
638
- var url = new URL(window.location.href);
639
-
640
- if (url)
641
- _this.triggerFilerTabs(url);
642
-
643
- },
644
-
645
- onResize: function ($isotopeGallery) {
646
- var _this = this;
647
-
648
- _this.setMetroLayout();
649
-
650
- $isotopeGallery.isotope({
651
- itemSelector: ".premium-gallery-item",
652
- masonry: {
653
- columnWidth: _this.settings.columnWidth
654
- },
655
- });
656
-
657
- },
658
-
659
- lightBoxDisabled: function () {
660
- var _this = this,
661
- $vidWrap = this.elements.$vidWrap;
662
-
663
- $vidWrap.each(function (index, item) {
664
- var type = $(item).data("type");
665
-
666
- $(item).closest(".premium-gallery-item").on("click", function () {
667
- var $this = $(this);
668
-
669
- $this.find(".pa-gallery-img-container").css("background", "#000");
670
-
671
- $this.find("img, .pa-gallery-icons-caption-container, .pa-gallery-icons-wrapper").css("visibility", "hidden");
672
-
673
- if ("style3" !== _this.settings.skin)
674
- $this.find(".premium-gallery-caption").css("visibility", "hidden");
675
-
676
- if ("hosted" !== type) {
677
- _this.playVid($this);
678
- } else {
679
- _this.playHostedVid(item);
680
- }
681
- });
682
- });
683
-
684
- },
685
-
686
- playVid: function ($this) {
687
- var $iframeWrap = $this.find(".premium-gallery-iframe-wrap"),
688
- src = $iframeWrap.data("src");
689
-
690
- src = src.replace("&mute", "&autoplay=1&mute");
691
-
692
- var $iframe = $("<iframe/>");
693
-
694
- $iframe.attr({
695
- "src": src,
696
- "frameborder": "0",
697
- "allowfullscreen": "1",
698
- "allow": "autoplay;encrypted-media;"
699
- });
700
-
701
- $iframeWrap.html($iframe);
702
-
703
- $iframe.css("visibility", "visible");
704
- },
705
-
706
- playHostedVid: function (item) {
707
- var $video = $(item).find("video");
708
-
709
- $video.get(0).play();
710
- $video.css("visibility", "visible");
711
- },
712
-
713
- run: function () {
714
-
715
- var $galleryElement = this.elements.$galleryElement,
716
- $vidWrap = this.elements.$vidWrap,
717
- $filters = this.elements.$filters,
718
- _this = this;
719
-
720
- if ('metro' === this.settings.layout) {
721
-
722
- this.setMetroLayout();
723
-
724
- this.settings.layout = "masonry";
725
-
726
- $(window).resize(function () { _this.onResize($isotopeGallery); });
727
- }
728
-
729
- var $isotopeGallery = $galleryElement.isotope(this.getIsoTopeSettings());
730
-
731
- $isotopeGallery.imagesLoaded().progress(function () {
732
- $isotopeGallery.isotope("layout");
733
- });
734
-
735
- $(document).ready(function () { _this.onReady($isotopeGallery); });
736
-
737
- if (this.settings.loadMore) {
738
-
739
- var $gradientLayer = this.elements.$gradientLayer,
740
- gradHeight = null;
741
-
742
- setTimeout(function () {
743
- gradHeight = $gradientLayer.outerHeight();
744
- }, 200);
745
-
746
- this.loadMore(gradHeight, $isotopeGallery);
747
- }
748
-
749
- if ("yes" !== this.settings.light_box)
750
- this.lightBoxDisabled();
751
-
752
- $filters.find("a").click(function (e) {
753
- e.preventDefault();
754
-
755
- _this.isFilterClicked = true;
756
-
757
- $filters.find(".active").removeClass("active");
758
-
759
- $(this).addClass("active");
760
-
761
- _this.settings.filter = $(this).attr("data-filter");
762
-
763
- $isotopeGallery.isotope({
764
- filter: _this.settings.filter
765
- });
766
-
767
- if (_this.settings.shuffle) $isotopeGallery.isotope("shuffle");
768
-
769
- if (_this.settings.loadMore) _this.appendItems(_this.settings.minimum, gradHeight, $isotopeGallery);
770
-
771
- return false;
772
- });
773
-
774
- if ("default" === this.settings.lightbox_type)
775
- this.$element.find(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto(this.getPrettyPhotoSettings());
776
- },
777
-
778
- getPrettyPhotoSettings: function () {
779
- return {
780
- theme: this.settings.theme,
781
- hook: "data-rel",
782
- opacity: 0.7,
783
- show_title: false,
784
- deeplinking: false,
785
- overlay_gallery: this.settings.overlay,
786
- custom_markup: "",
787
- default_width: 900,
788
- default_height: 506,
789
- social_tools: ""
790
- }
791
- },
792
-
793
- getIsoTopeSettings: function () {
794
- return {
795
- itemSelector: '.premium-gallery-item',
796
- percentPosition: true,
797
- animationOptions: {
798
- duration: 750,
799
- easing: 'linear'
800
- },
801
- filter: this.settings.active_cat,
802
- layoutMode: this.settings.layout,
803
- originLeft: this.settings.ltrMode,
804
- masonry: {
805
- columnWidth: this.settings.columnWidth
806
- },
807
- sortBy: this.settings.sort_by
808
- }
809
- },
810
-
811
- getRepeaterSettings: function () {
812
- return this.getElementSettings('premium_gallery_img_content');
813
- },
814
-
815
- setMetroLayout: function () {
816
-
817
- var $galleryElement = this.elements.$galleryElement,
818
- gridWidth = $galleryElement.width(),
819
- cellSize = Math.floor(gridWidth / 12),
820
- deviceType = elementorFrontend.getCurrentDeviceMode(),
821
- suffix = 'desktop' === deviceType ? '' : '_' + deviceType,
822
- repeater = this.getRepeaterSettings();
823
-
824
- $galleryElement.find(".premium-gallery-item").each(function (index, item) { //should be added to selectors and elements
825
-
826
- var cells = repeater[index]['premium_gallery_image_cell' + suffix].size,
827
- vCells = repeater[index]['premium_gallery_image_vcell' + suffix].size;
828
-
829
- if ("" === cells || undefined == cells) {
830
- cells = repeater[index].premium_gallery_image_cell;
831
- }
832
-
833
- if ("" === vCells || undefined == vCells) {
834
- vCells = repeater[index].premium_gallery_image_vcell;
835
- }
836
-
837
- $(item).css({
838
- width: Math.ceil(cells * cellSize),
839
- height: Math.ceil(vCells * cellSize)
840
- });
841
- });
842
-
843
- this.settings.columnWidth = cellSize;
844
- }
845
-
846
- });
847
-
848
- /****** Premium Counter Handler ******/
849
- var PremiumCounterHandler = function ($scope, $) {
850
-
851
- var $counterElement = $scope.find(".premium-counter");
852
-
853
- elementorFrontend.waypoint($counterElement, function () {
854
-
855
- var counterSettings = $counterElement.data(),
856
- incrementElement = $counterElement.find(".premium-counter-init"),
857
- iconElement = $counterElement.find(".icon");
858
-
859
- $(incrementElement).numerator(counterSettings);
860
-
861
- $(iconElement).addClass("animated " + iconElement.data("animation"));
862
-
863
- });
864
-
865
- };
866
-
867
- /****** Premium Fancy Text Handler ******/
868
- var PremiumFancyTextHandler = function ($scope, $) {
869
-
870
- var $elem = $scope.find(".premium-fancy-text-wrapper"),
871
- settings = $elem.data("settings"),
872
- loadingSpeed = settings.delay || 2500,
873
- itemCount = $elem.find('.premium-fancy-list-items').length,
874
- loopCount = ('' === settings.count && !['typing', 'slide', 'autofade'].includes(settings.effect)) ? 'infinite' : (settings.count * itemCount);
875
-
876
- function escapeHtml(unsafe) {
877
- return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
878
- /"/g, "&quot;").replace(/'/g, "&#039;");
879
- }
880
-
881
- if ("typing" === settings.effect) {
882
-
883
- var fancyStrings = [];
884
-
885
- settings.strings.forEach(function (item) {
886
- fancyStrings.push(escapeHtml(item));
887
- });
888
-
889
- $elem.find(".premium-fancy-text").typed({
890
- strings: fancyStrings,
891
- typeSpeed: settings.typeSpeed,
892
- backSpeed: settings.backSpeed,
893
- startDelay: settings.startDelay,
894
- backDelay: settings.backDelay,
895
- showCursor: settings.showCursor,
896
- cursorChar: settings.cursorChar,
897
- loop: settings.loop
898
- });
899
-
900
- } else if ("slide" === settings.effect) {
901
- loadingSpeed = settings.pause;
902
-
903
- $elem.find(".premium-fancy-text").vTicker({
904
- speed: settings.speed,
905
- showItems: settings.showItems,
906
- pause: settings.pause,
907
- mousePause: settings.mousePause,
908
- direction: "up"
909
- });
910
-
911
- } else if ('auto-fade' === settings.effect) {
912
- var $items = $elem.find(".premium-fancy-list-items"),
913
- len = $items.length;
914
-
915
- if (0 === len) {
916
- return;
917
- }
918
-
919
- var delay = settings.duration / len,
920
- itemDelay = 0;
921
-
922
- loadingSpeed = delay;
923
-
924
- $items.each(function ($index, $item) {
925
- $item.style.animationDelay = itemDelay + 'ms';
926
- itemDelay += delay;
927
- });
928
-
929
- } else {
930
-
931
- setFancyAnimation();
932
-
933
- function setFancyAnimation() {
934
-
935
- var $item = $elem.find(".premium-fancy-list-items"),
936
- current = 1;
937
-
938
- //Get effect settings
939
- var delay = settings.delay || 2500,
940
- loopCount = settings.count;
941
-
942
- //If Loop Count option is set
943
- if (loopCount) {
944
- var currentLoop = 1,
945
- fancyStringsCount = $elem.find(".premium-fancy-list-items").length;
946
- }
947
-
948
- var loopInterval = setInterval(function () {
949
-
950
- var animationClass = "";
951
-
952
- //Add animation class
953
- if (settings.effect === "custom")
954
- animationClass = "animated " + settings.animation;
955
-
956
- //Show current active item
957
- $item.eq(current).addClass("premium-fancy-item-visible " + animationClass).removeClass("premium-fancy-item-hidden");
958
-
959
- var $inactiveItems = $item.filter(function (index) {
960
- return index !== current;
961
- });
962
-
963
- //Hide inactive items
964
- $inactiveItems.addClass("premium-fancy-item-hidden").removeClass("premium-fancy-item-visible " + animationClass);
965
-
966
- current++;
967
-
968
- //Restart loop
969
- if ($item.length === current)
970
- current = 0;
971
-
972
- //Increment interval and check if loop count is reached
973
- if (loopCount) {
974
- currentLoop++;
975
-
976
- if ((fancyStringsCount * loopCount) === currentLoop)
977
- clearInterval(loopInterval);
978
- }
979
-
980
-
981
- }, delay);
982
-
983
- }
984
- }
985
-
986
- //Show the strings after the layout is set.
987
- if ("typing" !== settings.effect) {
988
- setTimeout(function () {
989
- $elem.find(".premium-fancy-text").css('opacity', '1');
990
- }, 500);
991
-
992
- }
993
-
994
- if ('loading' === settings.loading && 'typing' !== settings.effect) {
995
- $scope.find('.premium-fancy-text').append('<span class="premium-loading-bar"></span>');
996
- $scope.find('.premium-loading-bar').css({
997
- 'animation-iteration-count': loopCount,
998
- 'animation-duration': loadingSpeed + 'ms'
999
- });
1000
- }
1001
-
1002
- };
1003
-
1004
- /****** Premium Countdown Handler ******/
1005
- var PremiumCountDownHandler = function ($scope, $) {
1006
-
1007
- var $countDownElement = $scope.find(".premium-countdown"),
1008
- settings = $countDownElement.data("settings"),
1009
- id = $scope.data('id'),
1010
- label1 = settings.label1,
1011
- label2 = settings.label2,
1012
- newLabe1 = label1.split(","),
1013
- newLabel2 = label2.split(","),
1014
- timerType = settings.timerType,
1015
- until = 'evergreen' === timerType ? settings.until.date : settings.until,
1016
- layout = '',
1017
- map = {
1018
- y: { index: 0, oldVal: '' },
1019
- o: { index: 1, oldVal: '' },
1020
- w: { index: 2, oldVal: '' },
1021
- d: { index: 3, oldVal: '' },
1022
- h: { index: 4, oldVal: '' },
1023
- m: { index: 5, oldVal: '' },
1024
- s: { index: 6, oldVal: '' }
1025
- };
1026
-
1027
- if ($countDownElement.find('#countdown-' + id).hasClass('premium-countdown-flip')) {
1028
- settings.format.split('').forEach(function (unit) {
1029
- var lowercased = unit.toLowerCase();
1030
-
1031
- layout += '<div class="premium-countdown-block premium-countdown-' + lowercased + '"><div class="pre_time-mid"> <div class="premium-countdown-figure"><span class="top">{' + lowercased + 'nn}</span><span class="top-back"><span>{' + lowercased + 'nn}</span></span><span class="bottom">{' + lowercased + 'nn}</span><span class="bottom-back"><span>{' + lowercased + 'nn}</span></span></div><span class="premium-countdown-label">{' + lowercased + 'l}</span></div><span class="countdown_separator">{sep}</span></div>';
1032
- });
1033
- }
1034
-
1035
- $countDownElement.find('#countdown-' + id).countdown({
1036
- layout: layout,
1037
- labels: newLabel2,
1038
- labels1: newLabe1,
1039
- until: new Date(until),
1040
- format: settings.format,
1041
- padZeroes: true,
1042
- timeSeparator: settings.separator,
1043
- onTick: function (periods) {
1044
-
1045
- equalWidth();
1046
-
1047
- if ($countDownElement.find('#countdown-' + id).hasClass('premium-countdown-flip')) {
1048
- animateFigure(periods, map);
1049
- }
1050
- },
1051
- onExpiry: function () {
1052
- if ('onExpiry' === settings.event) {
1053
- $countDownElement.find('#countdown-' + id).html(settings.text);
1054
- }
1055
- },
1056
- serverSync: function () {
1057
- return new Date(settings.serverSync);
1058
- }
1059
- });
1060
-
1061
- if (settings.reset) {
1062
- $countDownElement.find('.premium-countdown-init').countdown('option', 'until', new Date(until));
1063
- }
1064
-
1065
- if ('expiryUrl' === settings.event) {
1066
- $countDownElement.find('#countdown-' + id).countdown('option', 'expiryUrl', (elementorFrontend.isEditMode()) ? '' : settings.text);
1067
- }
1068
-
1069
- function equalWidth() {
1070
- var width = 0;
1071
- $countDownElement.find('#countdown-' + id + ' .countdown-amount').each(function (index, slot) {
1072
- if (width < $(slot).outerWidth()) {
1073
- width = $(slot).outerWidth();
1074
- }
1075
- });
1076
-
1077
- $countDownElement.find('#countdown-' + id + ' .countdown-amount').css('width', width);
1078
- }
1079
-
1080
- function animateFigure(periods, map) {
1081
- settings.format.split('').forEach(function (unit) {
1082
-
1083
- var lowercased = unit.toLowerCase(),
1084
- index = map[lowercased].index,
1085
- oldVal = map[lowercased].oldVal;
1086
-
1087
- if (periods[index] !== oldVal) {
1088
-
1089
- map[lowercased].oldVal = periods[index];
1090
-
1091
- var $top = $('#countdown-' + id).find('.premium-countdown-' + lowercased + ' .top'),
1092
- $back_top = $('#countdown-' + id).find('.premium-countdown-' + lowercased + ' .top-back');
1093
-
1094
- TweenMax.to($top, 0.8, {
1095
- rotationX: '-180deg',
1096
- transformPerspective: 300,
1097
- ease: Quart.easeOut,
1098
- onComplete: function () {
1099
- TweenMax.set($top, { rotationX: 0 });
1100
- }
1101
- });
1102
-
1103
- TweenMax.to($back_top, 0.8, {
1104
- rotationX: 0,
1105
- transformPerspective: 300,
1106
- ease: Quart.easeOut,
1107
- clearProps: 'all'
1108
- });
1109
- }
1110
- });
1111
- }
1112
-
1113
- times = $countDownElement.find('#countdown-' + id).countdown("getTimes");
1114
-
1115
- function runTimer(el) {
1116
- return el == 0;
1117
- }
1118
-
1119
- if (times.every(runTimer)) {
1120
-
1121
- if ('onExpiry' === settings.event) {
1122
- $countDownElement.find('#countdown-' + id).html(settings.text);
1123
- } else if ('expiryUrl' === settings.event && !elementorFrontend.isEditMode()) {
1124
- var editMode = $('body').find('#elementor').length;
1125
- if (0 < editMode) {
1126
- $countDownElement.find('#countdown-' + id).html(
1127
- "<h1>You can not redirect url from elementor Editor!!</h1>");
1128
- } else {
1129
- if (!elementorFrontend.isEditMode()) {
1130
- window.location.href = settings.text;
1131
- }
1132
- }
1133
-
1134
- }
1135
- }
1136
-
1137
- };
1138
-
1139
- /****** Premium Carousel Handler ******/
1140
- var PremiumCarouselHandler = function ($scope, $) {
1141
-
1142
- var $carouselElem = $scope.find(".premium-carousel-wrapper"),
1143
- settings = $($carouselElem).data("settings"),
1144
- isEdit = elementorFrontend.isEditMode();
1145
-
1146
- function slideToShow(slick) {
1147
-
1148
- var slidesToShow = slick.options.slidesToShow,
1149
- windowWidth = $(window).width();
1150
- if (windowWidth > settings.tabletBreak) {
1151
- slidesToShow = settings.slidesDesk;
1152
- }
1153
- if (windowWidth <= settings.tabletBreak) {
1154
- slidesToShow = settings.slidesTab;
1155
- }
1156
- if (windowWidth <= settings.mobileBreak) {
1157
- slidesToShow = settings.slidesMob;
1158
- }
1159
- return slidesToShow;
1160
-
1161
- }
1162
-
1163
- //Get templates content on the editor page
1164
- if (isEdit) {
1165
-
1166
- $carouselElem.find(".item-wrapper").each(function (index, slide) {
1167
-
1168
- var templateID = $(slide).data("template");
1169
-
1170
- if (undefined !== templateID) {
1171
- $.ajax({
1172
- type: "GET",
1173
- url: PremiumSettings.ajaxurl,
1174
- dataType: "html",
1175
- data: {
1176
- action: "get_elementor_template_content",
1177
- templateID: templateID
1178
- }
1179
- }).success(function (response) {
1180
-
1181
- var data = JSON.parse(response).data;
1182
-
1183
- if (undefined !== data.template_content) {
1184
-
1185
- $(slide).html(data.template_content);
1186
- $carouselElem.find(".premium-carousel-inner").slick("refresh");
1187
-
1188
- }
1189
- });
1190
- }
1191
- });
1192
-
1193
- }
1194
-
1195
- $carouselElem.on("init", function (event) {
1196
-
1197
- event.preventDefault();
1198
-
1199
- setTimeout(function () {
1200
- resetAnimations("init");
1201
- }, 500);
1202
-
1203
- $(this).find("item-wrapper.slick-active").each(function () {
1204
- var $this = $(this);
1205
- $this.addClass($this.data("animation"));
1206
- });
1207
-
1208
- $(".slick-track").addClass("translate");
1209
-
1210
- });
1211
-
1212
- $carouselElem.find(".premium-carousel-inner").slick({
1213
- vertical: settings.vertical,
1214
- slidesToScroll: settings.slidesToScroll,
1215
- slidesToShow: settings.slidesToShow,
1216
- responsive: [{
1217
- breakpoint: settings.tabletBreak,
1218
- settings: {
1219
- slidesToShow: settings.slidesTab,
1220
- slidesToScroll: settings.slidesTab,
1221
- swipe: settings.touchMove,
1222
- }
1223
- },
1224
- {
1225
- breakpoint: settings.mobileBreak,
1226
- settings: {
1227
- slidesToShow: settings.slidesMob,
1228
- slidesToScroll: settings.slidesMob,
1229
- swipe: settings.touchMove,
1230
- }
1231
- }
1232
- ],
1233
- useTransform: true,
1234
- fade: settings.fade,
1235
- infinite: settings.infinite,
1236
- speed: settings.speed,
1237
- autoplay: settings.autoplay,
1238
- autoplaySpeed: settings.autoplaySpeed,
1239
- draggable: settings.draggable,
1240
- rtl: settings.rtl,
1241
- adaptiveHeight: settings.adaptiveHeight,
1242
- pauseOnHover: settings.pauseOnHover,
1243
- centerMode: settings.centerMode,
1244
- centerPadding: settings.centerPadding,
1245
- arrows: settings.arrows,
1246
- prevArrow: $carouselElem.find(".premium-carousel-nav-arrow-prev").html(),
1247
- nextArrow: $carouselElem.find(".premium-carousel-nav-arrow-next").html(),
1248
- dots: settings.dots,
1249
- customPaging: function () {
1250
- var customDot = $carouselElem.find(".premium-carousel-nav-dot").html();
1251
- return customDot;
1252
- }
1253
- });
1254
-
1255
- function resetAnimations(event) {
1256
-
1257
- var $slides = $carouselElem.find(".slick-slide");
1258
-
1259
- if ("init" === event)
1260
- $slides = $slides.not(".slick-current");
1261
-
1262
- $slides.find(".animated").each(function (index, elem) {
1263
-
1264
- var settings = $(elem).data("settings");
1265
-
1266
- if (!settings)
1267
- return;
1268
-
1269
- if (!settings._animation && !settings.animation)
1270
- return;
1271
-
1272
- var animation = settings._animation || settings.animation;
1273
-
1274
- $(elem).removeClass("animated " + animation).addClass("elementor-invisible");
1275
- });
1276
- };
1277
-
1278
- function triggerAnimation() {
1279
-
1280
- $carouselElem.find(".slick-active .elementor-invisible").each(function (index, elem) {
1281
-
1282
- var settings = $(elem).data("settings");
1283
-
1284
- if (!settings)
1285
- return;
1286
-
1287
- if (!settings._animation && !settings.animation)
1288
- return;
1289
-
1290
- var delay = settings._animation_delay ? settings._animation_delay : 0,
1291
- animation = settings._animation || settings.animation;
1292
-
1293
- setTimeout(function () {
1294
- $(elem).removeClass("elementor-invisible").addClass(animation +
1295
- ' animated');
1296
- }, delay);
1297
- });
1298
- }
1299
-
1300
- $carouselElem.on("afterChange", function (event, slick, currentSlide) {
1301
-
1302
- var slidesScrolled = slick.options.slidesToScroll,
1303
- slidesToShow = slideToShow(slick),
1304
- centerMode = slick.options.centerMode,
1305
- slideToAnimate = currentSlide + slidesToShow - 1;
1306
-
1307
- //Trigger Aniamtions for the current slide
1308
- triggerAnimation();
1309
-
1310
- if (slidesScrolled === 1) {
1311
- if (!centerMode === true) {
1312
- var $inViewPort = $(this).find("[data-slick-index='" + slideToAnimate +
1313
- "']");
1314
- if ("null" != settings.animation) {
1315
- $inViewPort.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
1316
- .addClass(settings.animation).removeClass(
1317
- "premium-carousel-content-hidden");
1318
- }
1319
- }
1320
- } else {
1321
- for (var i = slidesScrolled + currentSlide; i >= 0; i--) {
1322
- $inViewPort = $(this).find("[data-slick-index='" + i + "']");
1323
- if ("null" != settings.animation) {
1324
- $inViewPort.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
1325
- .addClass(settings.animation).removeClass(
1326
- "premium-carousel-content-hidden");
1327
- }
1328
- }
1329
- }
1330
- });
1331
-
1332
- $carouselElem.on("beforeChange", function (event, slick, currentSlide) {
1333
-
1334
- //Reset Aniamtions for the other slides
1335
- resetAnimations();
1336
-
1337
- var $inViewPort = $(this).find("[data-slick-index='" + currentSlide + "']");
1338
-
1339
- if ("null" != settings.animation) {
1340
- $inViewPort.siblings().find(
1341
- "p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").removeClass(
1342
- settings.animation).addClass(
1343
- "premium-carousel-content-hidden");
1344
- }
1345
- });
1346
-
1347
- if (settings.vertical) {
1348
-
1349
- var maxHeight = -1;
1350
-
1351
- elementorFrontend.elements.$window.on('load', function () {
1352
- $carouselElem.find(".slick-slide").each(function () {
1353
- if ($(this).height() > maxHeight) {
1354
- maxHeight = $(this).height();
1355
- }
1356
- });
1357
- $carouselElem.find(".slick-slide").each(function () {
1358
- if ($(this).height() < maxHeight) {
1359
- $(this).css("margin", Math.ceil(
1360
- (maxHeight - $(this).height()) / 2) + "px 0");
1361
- }
1362
- });
1363
- });
1364
- }
1365
- var marginFix = {
1366
- element: $("a.ver-carousel-arrow"),
1367
- getWidth: function () {
1368
- var width = this.element.outerWidth();
1369
- return width / 2;
1370
- },
1371
- setWidth: function (type) {
1372
- type = type || "vertical";
1373
- if (type == "vertical") {
1374
- this.element.css("margin-left", "-" + this.getWidth() + "px");
1375
- } else {
1376
- this.element.css("margin-top", "-" + this.getWidth() + "px");
1377
- }
1378
- }
1379
- };
1380
- marginFix.setWidth();
1381
- marginFix.element = $("a.carousel-arrow");
1382
- marginFix.setWidth("horizontal");
1383
-
1384
- $(document).ready(function () {
1385
-
1386
- settings.navigation.map(function (item, index) {
1387
-
1388
- if (item) {
1389
-
1390
- $(item).on("click", function () {
1391
-
1392
- var currentActive = $carouselElem.find(".premium-carousel-inner").slick("slickCurrentSlide");
1393
-
1394
- if (index !== currentActive) {
1395
- $carouselElem.find(".premium-carousel-inner").slick("slickGoTo", index)
1396
- }
1397
-
1398
- })
1399
- }
1400
-
1401
- })
1402
- })
1403
-
1404
- };
1405
-
1406
- var PremiumBannerHandler = ModuleHandler.extend({
1407
-
1408
- getDefaultSettings: function () {
1409
-
1410
- return {
1411
- selectors: {
1412
- bannerElement: '.premium-banner',
1413
- bannerImgWrap: '.premium-banner-ib',
1414
- bannerImg: 'img',
1415
- }
1416
- }
1417
-
1418
- },
1419
-
1420
- getDefaultElements: function () {
1421
-
1422
- var selectors = this.getSettings('selectors');
1423
-
1424
- return {
1425
- $bannerElement: this.$element.find(selectors.bannerElement),
1426
- $bannerImgWrap: this.$element.find(selectors.bannerImgWrap),
1427
- $bannerImg: this.$element.find(selectors.bannerImg)
1428
- }
1429
-
1430
- },
1431
-
1432
- bindEvents: function () {
1433
-
1434
- var _this = this;
1435
-
1436
- _this.elements.$bannerImgWrap.hover(function () {
1437
- _this.elements.$bannerImg.addClass("active");
1438
- }, function () {
1439
- _this.elements.$bannerImg.removeClass("active");
1440
- });
1441
-
1442
- this.run();
1443
- },
1444
-
1445
- run: function () {
1446
-
1447
- var $bannerElement = this.elements.$bannerElement;
1448
-
1449
- if ($bannerElement.data("box-tilt")) {
1450
- var reverse = $bannerElement.data("box-tilt-reverse");
1451
- UniversalTilt.init({
1452
- elements: $bannerElement,
1453
- settings: {
1454
- reverse: reverse
1455
- },
1456
- callbacks: {
1457
- onMouseLeave: function (el) {
1458
- el.style.boxShadow = "0 45px 100px rgba(255, 255, 255, 0)";
1459
- },
1460
- onDeviceMove: function (el) {
1461
- el.style.boxShadow = "0 45px 100px rgba(255, 255, 255, 0.3)";
1462
- }
1463
- }
1464
- });
1465
-
1466
- }
1467
- }
1468
-
1469
- });
1470
-
1471
- /****** Premium Modal Box Handler ******/
1472
- var PremiumModalBoxHandler = function ($scope, $) {
1473
-
1474
- var $modalElem = $scope.find(".premium-modal-box-container"),
1475
- settings = $modalElem.data("settings"),
1476
- $modal = $modalElem.find(".premium-modal-box-modal-dialog");
1477
-
1478
- if (!settings) {
1479
- return;
1480
- }
1481
-
1482
- if (settings.trigger === "pageload") {
1483
- $(document).ready(function ($) {
1484
- setTimeout(function () {
1485
- $modalElem.find(".premium-modal-box-modal").modal();
1486
- }, settings.delay * 1000);
1487
- });
1488
- }
1489
-
1490
- if ($modal.data("modal-animation") && " " != $modal.data("modal-animation")) {
1491
-
1492
- var animationDelay = $modal.data('delay-animation');
1493
-
1494
- new Waypoint({
1495
- element: $modal,
1496
- handler: function () {
1497
- setTimeout(function () {
1498
- $modal.css("opacity", "1").addClass("animated " + $modal.data("modal-animation"));
1499
- }, animationDelay * 1000);
1500
- this.destroy();
1501
- },
1502
- offset: Waypoint.viewportHeight() - 150,
1503
- });
1504
- }
1505
- };
1506
-
1507
- /****** Premium Blog Handler ******/
1508
- var PremiumBlogHandler = ModuleHandler.extend({
1509
-
1510
- settings: {},
1511
-
1512
- getDefaultSettings: function () {
1513
- return {
1514
- selectors: {
1515
- user: '.fa-user',
1516
- activeCat: '.category.active',
1517
- loading: '.premium-loading-feed',
1518
- blogElement: '.premium-blog-wrap',
1519
- blogFilterTabs: '.premium-blog-filter',
1520
- contentWrapper: '.premium-blog-content-wrapper',
1521
- blogPost: '.premium-blog-post-outer-container',
1522
- metaSeparators: '.premium-blog-meta-separator',
1523
- filterLinks: '.premium-blog-filters-container li a',
1524
- currentPage: '.premium-blog-pagination-container .page-numbers.current',
1525
- activeElememnt: '.premium-blog-filters-container li .active',
1526
- }
1527
- }
1528
- },
1529
-
1530
- getDefaultElements: function () {
1531
- var selectors = this.getSettings('selectors'),
1532
- elements = {
1533
- $blogElement: this.$element.find(selectors.blogElement),
1534
- $blogFilterTabs: this.$element.find(selectors.blogFilterTabs),
1535
- $activeCat: this.$element.find(selectors.activeCat),
1536
- $filterLinks: this.$element.find(selectors.filterLinks),
1537
- $blogPost: this.$element.find(selectors.blogPost),
1538
- $contentWrapper: this.$element.find(selectors.contentWrapper)
1539
- };
1540
-
1541
- elements.$metaSeparators = elements.$blogPost.first().find(selectors.metaSeparators);
1542
- elements.$user = elements.$blogPost.find(selectors.user);
1543
-
1544
- return elements;
1545
- },
1546
-
1547
- bindEvents: function () {
1548
- this.setLayoutSettings();
1549
- this.run();
1550
- },
1551
-
1552
- setLayoutSettings: function () {
1553
-
1554
- var settings = this.getElementSettings(),
1555
- $blogPost = this.elements.$blogPost;
1556
-
1557
- var layoutSettings = {
1558
- pageNumber: 1,
1559
- isLoaded: true,
1560
- count: 2,
1561
- equalHeight: settings.force_height,
1562
- layout: settings.premium_blog_layout,
1563
- carousel: 'yes' === settings.premium_blog_carousel ? true : false,
1564
- infinite: 'yes' === settings.premium_blog_infinite_scroll ? true : false,
1565
- scrollAfter: 'yes' === settings.scroll_to_offset ? true : false,
1566
- grid: 'yes' === settings.premium_blog_grid ? true : false,
1567
- total: $blogPost.data('total'),
1568
- };
1569
-
1570
-
1571
- if (layoutSettings.carousel) {
1572
-
1573
- layoutSettings.slidesToScroll = settings.slides_to_scroll;
1574
- layoutSettings.spacing = parseInt(settings.premium_blog_carousel_spacing);
1575
- layoutSettings.autoPlay = 'yes' === settings.premium_blog_carousel_play ? true : false;
1576
- layoutSettings.arrows = 'yes' === settings.premium_blog_carousel_arrows ? true : false;
1577
- layoutSettings.fade = 'yes' === settings.premium_blog_carousel_fade ? true : false;
1578
- layoutSettings.center = 'yes' === settings.premium_blog_carousel_center ? true : false;
1579
- layoutSettings.dots = 'yes' === settings.premium_blog_carousel_dots ? true : false;
1580
- layoutSettings.speed = '' !== settings.premium_blog_carousel_autoplay_speed ? parseInt(settings.premium_blog_carousel_autoplay_speed) : 5000;
1581
-
1582
- }
1583
-
1584
- this.settings = layoutSettings;
1585
-
1586
- },
1587
-
1588
- run: function () {
1589
-
1590
- var _this = this,
1591
- selectors = this.getSettings('selectors'),
1592
- $blogElement = this.elements.$blogElement,
1593
- $user = this.elements.$user,
1594
- $blogPost = this.elements.$blogPost,
1595
- $metaSeparators = this.elements.$metaSeparators,
1596
- $activeCategory = this.elements.$activeCat.data('filter'),
1597
- $filterTabs = this.elements.$blogFilterTabs.length,
1598
- pagination = $blogElement.data("pagination");
1599
-
1600
- this.settings.activeCategory = $activeCategory;
1601
- this.settings.filterTabs = $filterTabs;
1602
-
1603
- if (1 === $metaSeparators.length) {
1604
- //If two meta only are enabled. One of them is author meta.
1605
- if (!$user.length) {
1606
- $blogPost.find(selectors.metaSeparators).remove();
1607
- }
1608
-
1609
- } else {
1610
- if (!$user.length) {
1611
- $blogPost.each(function (index, post) {
1612
- $(post).find(selectors.metaSeparators).first().remove();
1613
- });
1614
- }
1615
- }
1616
-
1617
- if (this.settings.filterTabs) {
1618
- this.filterTabs();
1619
- }
1620
-
1621
- if (!this.settings.filterTabs || "*" === this.settings.activeCategory) {
1622
- if ("masonry" === this.settings.layout && !this.settings.carousel) {
1623
- $blogElement.imagesLoaded(function () {
1624
- $blogElement.isotope(_this.getIsoTopeSettings());
1625
- });
1626
- }
1627
- } else {
1628
- //If `All` categories not exist, then we need to get posts through AJAX.
1629
- this.getPostsByAjax(false);
1630
- }
1631
-
1632
- if (this.settings.carousel) {
1633
- $blogElement.slick(this.getSlickSettings());
1634
- }
1635
-
1636
- if ("even" === this.settings.layout && this.settings.equalHeight) {
1637
- $blogElement.imagesLoaded(function () {
1638
- _this.forceEqualHeight();
1639
- });
1640
- }
1641
-
1642
- if (pagination) {
1643
- this.paginate();
1644
- }
1645
-
1646
- if (this.settings.infinite && $blogElement.is(":visible")) {
1647
- this.getInfiniteScrollPosts();
1648
- }
1649
-
1650
- },
1651
-
1652
- paginate: function () {
1653
- var _this = this,
1654
- $scope = this.$element,
1655
- selectors = this.getSettings('selectors');
1656
-
1657
- $scope.on('click', '.premium-blog-pagination-container .page-numbers', function (e) {
1658
-
1659
- e.preventDefault();
1660
-
1661
- if ($(this).hasClass("current")) return;
1662
-
1663
- var currentPage = parseInt($scope.find(selectors.currentPage).html());
1664
-
1665
- if ($(this).hasClass('next')) {
1666
- _this.settings.pageNumber = currentPage + 1;
1667
- } else if ($(this).hasClass('prev')) {
1668
- _this.settings.pageNumber = currentPage - 1;
1669
- } else {
1670
- _this.settings.pageNumber = $(this).html();
1671
- }
1672
-
1673
- _this.getPostsByAjax(_this.settings.scrollAfter);
1674
-
1675
- })
1676
- },
1677
-
1678
- forceEqualHeight: function () {
1679
- var heights = new Array(),
1680
- contentWrapper = this.getSettings('selectors').contentWrapper,
1681
- $blogWrapper = this.$element.find(contentWrapper);
1682
-
1683
- $blogWrapper.each(function (index, post) {
1684
-
1685
- var height = $(post).outerHeight();
1686
-
1687
- heights.push(height);
1688
- });
1689
-
1690
- var maxHeight = Math.max.apply(null, heights);
1691
-
1692
- $blogWrapper.css("height", maxHeight + "px");
1693
- },
1694
-
1695
- getSlickSettings: function () {
1696
-
1697
- var settings = this.settings,
1698
- slickCols = settings.grid ? this.getSlickCols() : null,
1699
- cols = settings.grid ? slickCols.cols : 1,
1700
- colsTablet = settings.grid ? slickCols.colsTablet : 1,
1701
- colsMobile = settings.grid ? slickCols.colsMobile : 1,
1702
- prevArrow = settings.arrows ? '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Previous" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>' : '',
1703
- nextArrow = settings.arrows ? '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>' : '';
1704
-
1705
- return {
1706
- infinite: true,
1707
- slidesToShow: cols,
1708
- slidesToScroll: settings.slidesToScroll || cols,
1709
- responsive: [{
1710
- breakpoint: 1025,
1711
- settings: {
1712
- slidesToShow: colsTablet,
1713
- slidesToScroll: 1
1714
- }
1715
- },
1716
- {
1717
- breakpoint: 768,
1718
- settings: {
1719
- slidesToShow: colsMobile,
1720
- slidesToScroll: 1
1721
- }
1722
- }
1723
- ],
1724
- autoplay: settings.autoPlay,
1725
- rows: 0,
1726
- autoplaySpeed: settings.speed,
1727
- nextArrow: nextArrow,
1728
- prevArrow: prevArrow,
1729
- fade: settings.fade,
1730
- centerMode: settings.center,
1731
- centerPadding: settings.spacing + "px",
1732
- draggable: true,
1733
- dots: settings.dots,
1734
- customPaging: function () {
1735
- return '<i class="fas fa-circle"></i>';
1736
- }
1737
- }
1738
-
1739
- },
1740
-
1741
- getSlickCols: function () {
1742
- var slickCols = this.getElementSettings(),
1743
- cols = slickCols.premium_blog_columns_number,
1744
- colsTablet = slickCols.premium_blog_columns_number_tablet,
1745
- colsMobile = slickCols.premium_blog_columns_number_mobile;
1746
-
1747
- return {
1748
- cols: parseInt(100 / cols.substr(0, cols.indexOf('%'))),
1749
- colsTablet: parseInt(100 / colsTablet.substr(0, colsTablet.indexOf('%'))),
1750
- colsMobile: parseInt(100 / colsMobile.substr(0, colsMobile.indexOf('%'))),
1751
- }
1752
-
1753
- },
1754
-
1755
- getIsoTopeSettings: function () {
1756
- return {
1757
- itemSelector: ".premium-blog-post-outer-container",
1758
- percentPosition: true,
1759
- filter: this.settings.activeCategory,
1760
- animationOptions: {
1761
- duration: 750,
1762
- easing: "linear",
1763
- queue: false
1764
- }
1765
- }
1766
- },
1767
-
1768
- filterTabs: function () {
1769
-
1770
- var _this = this,
1771
- selectors = this.getSettings('selectors'),
1772
- $filterLinks = this.elements.$filterLinks;
1773
-
1774
- $filterLinks.click(function (e) {
1775
-
1776
- e.preventDefault();
1777
-
1778
- _this.$element.find(selectors.activeElememnt).removeClass("active");
1779
-
1780
- $(this).addClass("active");
1781
-
1782
- //Get clicked tab slug
1783
- _this.settings.activeCategory = $(this).attr("data-filter");
1784
-
1785
- _this.settings.pageNumber = 1;
1786
-
1787
- if (_this.settings.infinite) {
1788
- _this.getPostsByAjax(false);
1789
- _this.settings.count = 2;
1790
- _this.getInfiniteScrollPosts();
1791
- } else {
1792
- //Make sure to reset pagination before sending our AJAX request
1793
- _this.getPostsByAjax(_this.settings.scrollAfter);
1794
- }
1795
-
1796
- });
1797
- },
1798
-
1799
- getPostsByAjax: function (shouldScroll) {
1800
-
1801
- //If filter tabs is not enabled, then always set category to all.
1802
- if ('undefined' === typeof this.settings.activeCategory) {
1803
- this.settings.activeCategory = '*';
1804
- }
1805
-
1806
- var _this = this,
1807
- $blogElement = this.elements.$blogElement,
1808
- selectors = this.getSettings('selectors');
1809
-
1810
- $.ajax({
1811
- url: PremiumSettings.ajaxurl,
1812
- dataType: 'json',
1813
- type: 'POST',
1814
- data: {
1815
- action: 'pa_get_posts',
1816
- page_id: $blogElement.data('page'),
1817
- widget_id: _this.$element.data('id'),
1818
- page_number: _this.settings.pageNumber,
1819
- category: _this.settings.activeCategory,
1820
- nonce: PremiumSettings.nonce,
1821
- },
1822
- beforeSend: function () {
1823
-
1824
- $blogElement.append('<div class="premium-loading-feed"><div class="premium-loader"></div></div>');
1825
-
1826
- if (shouldScroll) {
1827
- $('html, body').animate({
1828
- scrollTop: (($blogElement.offset().top) - 50)
1829
- }, 'slow');
1830
- }
1831
-
1832
- },
1833
- success: function (res) {
1834
- if (!res.data)
1835
- return;
1836
-
1837
- $blogElement.find(selectors.loading).remove();
1838
-
1839
- var posts = res.data.posts,
1840
- paging = res.data.paging;
1841
-
1842
- if (_this.settings.infinite) {
1843
- _this.settings.isLoaded = true;
1844
- if (_this.settings.filterTabs && _this.settings.pageNumber === 1) {
1845
- $blogElement.html(posts);
1846
- } else {
1847
- $blogElement.append(posts);
1848
- }
1849
- } else {
1850
- //Render the new markup into the widget
1851
- $blogElement.html(posts);
1852
-
1853
- _this.$element.find(".premium-blog-footer").html(paging);
1854
- }
1855
-
1856
- //Make sure grid option is enabled.
1857
- if (_this.settings.layout) {
1858
- if ("even" === _this.settings.layout) {
1859
- if (_this.settings.equalHeight)
1860
- _this.forceEqualHeight();
1861
-
1862
- } else {
1863
-
1864
- $blogElement.imagesLoaded(function () {
1865
-
1866
- $blogElement.isotope('reloadItems');
1867
- $blogElement.isotope({
1868
- itemSelector: ".premium-blog-post-outer-container",
1869
- animate: false
1870
- });
1871
- });
1872
- }
1873
- }
1874
-
1875
- },
1876
- error: function (err) {
1877
- console.log(err);
1878
- }
1879
-
1880
- });
1881
- },
1882
-
1883
- getInfiniteScrollPosts: function () {
1884
- var windowHeight = jQuery(window).outerHeight() / 1.25,
1885
- _this = this;
1886
-
1887
- $(window).scroll(function () {
1888
-
1889
- if (_this.settings.filterTabs) {
1890
- $blogPost = _this.elements.$blogElement.find(".premium-blog-post-outer-container");
1891
- _this.settings.total = $blogPost.data('total');
1892
- }
1893
-
1894
- if (_this.settings.count <= _this.settings.total) {
1895
- if (($(window).scrollTop() + windowHeight) >= (_this.$element.find('.premium-blog-post-outer-container:last').offset().top)) {
1896
- if (true == _this.settings.isLoaded) {
1897
- _this.settings.pageNumber = _this.settings.count;
1898
- _this.getPostsByAjax(false);
1899
- _this.settings.count++;
1900
- _this.settings.isLoaded = false;
1901
- }
1902
-
1903
- }
1904
- }
1905
- });
1906
- },
1907
-
1908
- });
1909
-
1910
- /****** Premium Image Scroll Handler ******/
1911
- var PremiumImageScrollHandler = function ($scope, $) {
1912
- var scrollElement = $scope.find(".premium-image-scroll-container"),
1913
- scrollOverlay = scrollElement.find(".premium-image-scroll-overlay"),
1914
- scrollVertical = scrollElement.find(".premium-image-scroll-vertical"),
1915
- dataElement = scrollElement.data("settings"),
1916
- imageScroll = scrollElement.find("img"),
1917
- direction = dataElement["direction"],
1918
- reverse = dataElement["reverse"],
1919
- transformOffset = null;
1920
-
1921
- function startTransform() {
1922
- imageScroll.css("transform", (direction === "vertical" ? "translateY" : "translateX") + "( -" +
1923
- transformOffset + "px)");
1924
- }
1925
-
1926
- function endTransform() {
1927
- imageScroll.css("transform", (direction === "vertical" ? "translateY" : "translateX") + "(0px)");
1928
- }
1929
-
1930
- function setTransform() {
1931
- if (direction === "vertical") {
1932
- transformOffset = imageScroll.height() - scrollElement.height();
1933
- } else {
1934
- transformOffset = imageScroll.width() - scrollElement.width();
1935
- }
1936
- }
1937
- if (dataElement["trigger"] === "scroll") {
1938
- scrollElement.addClass("premium-container-scroll");
1939
- if (direction === "vertical") {
1940
- scrollVertical.addClass("premium-image-scroll-ver");
1941
- } else {
1942
- scrollElement.imagesLoaded(function () {
1943
- scrollOverlay.css({
1944
- width: imageScroll.width(),
1945
- height: imageScroll.height()
1946
- });
1947
- });
1948
- }
1949
- } else {
1950
- if (reverse === "yes") {
1951
- scrollElement.imagesLoaded(function () {
1952
- scrollElement.addClass("premium-container-scroll-instant");
1953
- setTransform();
1954
- startTransform();
1955
- });
1956
- }
1957
- if (direction === "vertical") {
1958
- scrollVertical.removeClass("premium-image-scroll-ver");
1959
- }
1960
- scrollElement.mouseenter(function () {
1961
- scrollElement.removeClass("premium-container-scroll-instant");
1962
- setTransform();
1963
- reverse === "yes" ? endTransform() : startTransform();
1964
- });
1965
- scrollElement.mouseleave(function () {
1966
- reverse === "yes" ? startTransform() : endTransform();
1967
- });
1968
- }
1969
- };
1970
-
1971
-
1972
- /****** Premium Contact Form 7 Handler ******/
1973
- var PremiumContactFormHandler = function ($scope, $) {
1974
-
1975
- var $contactForm = $scope.find(".premium-cf7-container");
1976
- var $input = $contactForm.find(
1977
- 'input[type="text"], input[type="email"], textarea, input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="file"], input[type="url"]'
1978
- );
1979
-
1980
- $input.wrap("<span class='wpcf7-span'>");
1981
-
1982
- $input.on("focus blur", function () {
1983
- $(this).closest(".wpcf7-span").toggleClass("is-focused");
1984
- });
1985
- };
1986
-
1987
- /****** Premium Team Members Handler ******/
1988
- var PremiumTeamMembersHandler = ModuleHandler.extend({
1989
-
1990
- getDefaultSettings: function () {
1991
-
1992
- return {
1993
- slick: {
1994
- infinite: true,
1995
- rows: 0,
1996
- prevArrow: '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>',
1997
- nextArrow: '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>',
1998
- draggable: true,
1999
- pauseOnHover: true,
2000
- },
2001
- selectors: {
2002
- multiplePersons: '.multiple-persons',
2003
- person: '.premium-person-container',
2004
- imgContainer: '.premium-person-image-container',
2005
- imgWrap: '.premium-person-image-wrap'
2006
-
2007
- }
2008
- }
2009
- },
2010
-
2011
- getDefaultElements: function () {
2012
-
2013
- var selectors = this.getSettings('selectors');
2014
-
2015
- return {
2016
- $multiplePersons: this.$element.find(selectors.multiplePersons),
2017
- $persons: this.$element.find(selectors.person),
2018
- $imgWrap: this.$element.find(selectors.imgWrap),
2019
- }
2020
-
2021
- },
2022
- bindEvents: function () {
2023
- this.run();
2024
- },
2025
- getSlickSettings: function () {
2026
-
2027
- var settings = this.getElementSettings(),
2028
- rtl = this.elements.$multiplePersons.data("rtl"),
2029
- colsNumber = settings.persons_per_row,
2030
- colsTablet = settings.persons_per_row_tablet,
2031
- colsMobile = settings.persons_per_row_mobile;
2032
-
2033
- return Object.assign(this.getSettings('slick'), {
2034
-
2035
- slidesToShow: parseInt(100 / colsNumber.substr(0, colsNumber.indexOf('%'))),
2036
- slidesToScroll: parseInt(100 / colsNumber.substr(0, colsNumber.indexOf('%'))),
2037
- responsive: [{
2038
- breakpoint: 1025,
2039
- settings: {
2040
- slidesToShow: parseInt(100 / colsTablet.substr(0, colsTablet.indexOf('%'))),
2041
- slidesToScroll: 1
2042
- }
2043
- },
2044
- {
2045
- breakpoint: 768,
2046
- settings: {
2047
- slidesToShow: parseInt(100 / colsMobile.substr(0, colsMobile.indexOf('%'))),
2048
- slidesToScroll: 1
2049
- }
2050
- }
2051
- ],
2052
- autoplay: settings.carousel_play,
2053
- rtl: rtl ? true : false,
2054
- autoplaySpeed: settings.speed || 5000,
2055
-
2056
- });
2057
-
2058
-
2059
- },
2060
-
2061
- runEqualHeight: function () {
2062
-
2063
- var $persons = this.elements.$persons,
2064
- $imgWrap = this.elements.$imgWrap;
2065
-
2066
- var selectors = this.getSettings('selectors'),
2067
- heights = new Array();
2068
-
2069
- $persons.each(function (index, person) {
2070
- $(person).imagesLoaded(function () { }).done(function () {
2071
-
2072
- var imageHeight = $(person).find(selectors.imgContainer).outerHeight();
2073
-
2074
- heights.push(imageHeight);
2075
- });
2076
- });
2077
-
2078
- $persons.imagesLoaded(function () { }).done(function () {
2079
- var maxHeight = Math.max.apply(null, heights);
2080
- $imgWrap.css("height", maxHeight + "px");
2081
- });
2082
-
2083
- },
2084
-
2085
- run: function () {
2086
-
2087
- var $multiplePersons = this.elements.$multiplePersons;
2088
-
2089
- if (!$multiplePersons.length) return;
2090
-
2091
- var carousel = this.getElementSettings('carousel');
2092
-
2093
- if (carousel)
2094
- $multiplePersons.slick(this.getSlickSettings());
2095
-
2096
- if ($multiplePersons.hasClass("premium-person-style1")) return;
2097
-
2098
- if ("yes" !== $multiplePersons.data("persons-equal")) return;
2099
-
2100
- this.runEqualHeight();
2101
-
2102
- }
2103
-
2104
- });
2105
-
2106
- /****** Premium Title Handler ******/
2107
- var PremiumTitleHandler = function ($scope, $) {
2108
-
2109
- var $titleContainer = $scope.find(".premium-title-container"),
2110
- $titleElement = $titleContainer.find('.premium-title-text');
2111
-
2112
- if ($titleContainer.hasClass('style9')) {
2113
- var $style9 = $scope.find(".premium-title-style9");
2114
-
2115
- $style9.each(function () {
2116
- var elm = $(this);
2117
- var holdTime = elm.attr('data-blur-delay') * 1000;
2118
- elm.attr('data-animation-blur', 'process')
2119
- elm.find('.premium-title-style9-letter').each(function (index, letter) {
2120
- index += 1;
2121
- var animateDelay;
2122
- if ($('body').hasClass('rtl')) {
2123
- animateDelay = 0.2 / index + 's';
2124
- } else {
2125
- animateDelay = index / 20 + 's';
2126
- }
2127
- $(letter).css({
2128
- '-webkit-animation-delay': animateDelay,
2129
- 'animation-delay': animateDelay
2130
- });
2131
- })
2132
- setInterval(function () {
2133
- elm.attr('data-animation-blur', 'done')
2134
- setTimeout(function () {
2135
- elm.attr('data-animation-blur', 'process')
2136
- }, 150);
2137
- }, holdTime);
2138
- });
2139
- }
2140
-
2141
-
2142
- if ($titleContainer.hasClass('style8')) {
2143
-
2144
- var holdTime = $titleElement.attr('data-shiny-delay') * 1000,
2145
- duration = $titleElement.attr('data-shiny-dur') * 1000;
2146
-
2147
- function shinyEffect() {
2148
- $titleElement.get(0).setAttribute('data-animation', 'shiny');
2149
- setTimeout(function () {
2150
- $titleElement.removeAttr('data-animation')
2151
- }, duration);
2152
- }
2153
-
2154
- (function repeat() {
2155
- shinyEffect();
2156
- setTimeout(repeat, holdTime);
2157
- })();
2158
- }
2159
-
2160
- };
2161
-
2162
- /****** Premium Bullet List Handler ******/
2163
- var PremiumBulletListHandler = function ($scope, $) {
2164
-
2165
- var $listItems = $scope.find(".premium-bullet-list-box"),
2166
- items = $listItems.find(".premium-bullet-list-content");
2167
-
2168
- items.each(function (index, item) {
2169
-
2170
- if ($listItems.data("list-animation") && " " != $listItems.data("list-animation")) {
2171
- elementorFrontend.waypoint($(item), function () {
2172
-
2173
- var element = $(item),
2174
- delay = element.data('delay');
2175
-
2176
- setTimeout(function () {
2177
- element.next('.premium-bullet-list-divider , .premium-bullet-list-divider-inline').css("opacity", "1");
2178
- element.next('.premium-bullet-list-divider-inline , .premium-bullet-list-divider').addClass("animated " + $listItems.data("list-animation"));
2179
-
2180
- element.css("opacity", "1").addClass("animated " + $listItems.data("list-animation"));
2181
- }, delay);
2182
-
2183
- });
2184
- }
2185
-
2186
- });
2187
- };
2188
-
2189
- /****** Premium Grow Effect Handler ******/
2190
- var PremiumButtonHandler = function ($scope, $) {
2191
-
2192
- var $btnGrow = $scope.find('.premium-button-style6-bg');
2193
-
2194
- if ($btnGrow.length !== 0 && $scope.hasClass('premium-mouse-detect-yes')) {
2195
- $scope.on('mouseenter mouseleave', '.premium-button-style6', function (e) {
2196
-
2197
- var parentOffset = $(this).offset(),
2198
- left = e.pageX - parentOffset.left,
2199
- top = e.pageY - parentOffset.top;
2200
-
2201
- $btnGrow.css({
2202
- top: top,
2203
- left: left,
2204
- });
2205
-
2206
- });
2207
- }
2208
-
2209
- };
2210
-
2211
- var PremiumMaskHandler = function ($scope, $) {
2212
- var mask = $scope.hasClass('premium-mask-yes');
2213
-
2214
- if (!mask) return;
2215
-
2216
- if ('premium-addon-title.default' === $scope.data('widget_type')) {
2217
- var target = '.premium-title-header';
2218
- $scope.find(target).find('.premium-title-icon, .premium-title-img').addClass('premium-mask-span');
2219
- } else {
2220
- var target = '.premium-dual-header-first-header';
2221
- }
2222
-
2223
- $scope.find(target).find('span:not(.premium-title-style7-stripe-wrap):not(.premium-title-img)').each(function (index, span) {
2224
- var html = '';
2225
-
2226
- $(this).text().split(' ').forEach(function (item) {
2227
- if ('' !== item) {
2228
- html += ' <span class="premium-mask-span">' + item + '</span>';
2229
- }
2230
- });
2231
-
2232
- $(this).text('').append(html);
2233
- });
2234
-
2235
- elementorFrontend.waypoint($scope, function () {
2236
- $($scope).addClass('premium-mask-active');
2237
- });
2238
- };
2239
-
2240
-
2241
- var functionalHandlers = {
2242
- 'premium-addon-dual-header.default': PremiumMaskHandler,
2243
- 'premium-addon-video-box.default': PremiumVideoBoxWidgetHandler,
2244
- 'premium-addon-fancy-text.default': PremiumFancyTextHandler,
2245
- 'premium-counter.default': PremiumCounterHandler,
2246
- 'premium-addon-title.default': [PremiumTitleHandler, PremiumMaskHandler],
2247
- 'premium-countdown-timer.default': PremiumCountDownHandler,
2248
- 'premium-carousel-widget.default': PremiumCarouselHandler,
2249
- 'premium-addon-modal-box.default': PremiumModalBoxHandler,
2250
- 'premium-image-scroll.default': PremiumImageScrollHandler,
2251
- 'premium-contact-form.default': PremiumContactFormHandler,
2252
- 'premium-icon-list.default': PremiumBulletListHandler,
2253
- 'premium-addon-button.default': PremiumButtonHandler,
2254
- 'premium-addon-image-button.default': PremiumButtonHandler
2255
- };
2256
-
2257
- var classHandlers = {
2258
- 'premium-addon-person': PremiumTeamMembersHandler,
2259
- 'premium-addon-blog': PremiumBlogHandler,
2260
- 'premium-img-gallery': PremiumGridWidgetHandler,
2261
- 'premium-addon-banner': PremiumBannerHandler,
2262
- };
2263
-
2264
- $.each(functionalHandlers, function (elemName, func) {
2265
- if ('object' === typeof func) {
2266
- $.each(func, function (index, handler) {
2267
- elementorFrontend.hooks.addAction('frontend/element_ready/' + elemName, handler);
2268
- })
2269
- } else {
2270
- elementorFrontend.hooks.addAction('frontend/element_ready/' + elemName, func);
2271
- }
2272
-
2273
- });
2274
-
2275
- $.each(classHandlers, function (elemName, clas) {
2276
- elementorFrontend.elementsHandler.attachHandler(elemName, clas);
2277
- });
2278
-
2279
-
2280
- if (elementorFrontend.isEditMode()) {
2281
- elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default", PremiumProgressBarWidgetHandler);
2282
- } else {
2283
- elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default", PremiumProgressBarScrollWidgetHandler);
2284
- }
2285
- });
 
 
 
 
 
 
 
2286
  })(jQuery);
1
+ (function ($) {
2
+
3
+ $(window).on('elementor/frontend/init', function () {
4
+ var ModuleHandler = elementorModules.frontend.handlers.Base;
5
+
6
+ /****** Premium Progress Bar Handler ******/
7
+ var PremiumProgressBarWidgetHandler = function ($scope, trigger) {
8
+
9
+ var $progressbarElem = $scope.find(".premium-progressbar-container"),
10
+ settings = $progressbarElem.data("settings"),
11
+ length = settings.progress_length,
12
+ speed = settings.speed,
13
+ type = settings.type;
14
+
15
+
16
+ if ("line" === type) {
17
+
18
+ var $progressbar = $progressbarElem.find(".premium-progressbar-bar");
19
+
20
+ if (settings.gradient)
21
+ $progressbar.css("background", "linear-gradient(-45deg, " + settings.gradient + ")");
22
+
23
+ $progressbar.animate({
24
+ width: length + "%"
25
+ }, speed);
26
+
27
+ } else if ("circle" === type) {
28
+ if (length > 100)
29
+ length = 100;
30
+
31
+ $progressbarElem.prop({
32
+ 'counter': 0
33
+ }).animate({
34
+ counter: length
35
+ }, {
36
+ duration: speed,
37
+ easing: 'linear',
38
+ step: function (counter) {
39
+ var rotate = (counter * 3.6);
40
+
41
+ $progressbarElem.find(".premium-progressbar-right-label span").text(Math.ceil(counter) + "%");
42
+
43
+ $progressbarElem.find(".premium-progressbar-circle-left").css('transform', "rotate(" + rotate + "deg)");
44
+ if (rotate > 180) {
45
+
46
+ $progressbarElem.find(".premium-progressbar-circle").css({
47
+ '-webkit-clip-path': 'inset(0)',
48
+ 'clip-path': 'inset(0)',
49
+ });
50
+
51
+ $progressbarElem.find(".premium-progressbar-circle-right").css('visibility', 'visible');
52
+ }
53
+ }
54
+ });
55
+
56
+ } else {
57
+
58
+ var $progressbar = $progressbarElem.find(".premium-progressbar-bar-wrap"),
59
+ width = $progressbarElem.outerWidth(),
60
+ dotSize = settings.dot || 25,
61
+ dotSpacing = settings.spacing || 10,
62
+ numberOfCircles = Math.ceil(width / (dotSize + dotSpacing)),
63
+ circlesToFill = numberOfCircles * (length / 100),
64
+ numberOfTotalFill = Math.floor(circlesToFill),
65
+ fillPercent = 100 * (circlesToFill - numberOfTotalFill);
66
+
67
+ $progressbar.attr('data-circles', numberOfCircles);
68
+ $progressbar.attr('data-total-fill', numberOfTotalFill);
69
+ $progressbar.attr('data-partial-fill', fillPercent);
70
+
71
+ var className = "progress-segment";
72
+ for (var i = 0; i < numberOfCircles; i++) {
73
+ className = "progress-segment";
74
+ var innerHTML = '';
75
+
76
+ if (i < numberOfTotalFill) {
77
+ innerHTML = "<div class='segment-inner'></div>";
78
+ } else if (i === numberOfTotalFill) {
79
+
80
+ innerHTML = "<div class='segment-inner'></div>";
81
+ }
82
+
83
+ $progressbar.append("<div class='" + className + "'>" + innerHTML + "</div>");
84
+
85
+ }
86
+
87
+ if ("frontend" !== trigger) {
88
+ PremiumProgressDotsHandler($scope);
89
+ }
90
+
91
+ }
92
+
93
+ };
94
+
95
+ var PremiumProgressDotsHandler = function ($scope) {
96
+
97
+ var $progressbarElem = $scope.find(".premium-progressbar-container"),
98
+ settings = $progressbarElem.data("settings"),
99
+ $progressbar = $scope.find(".premium-progressbar-bar-wrap"),
100
+ data = $progressbar.data(),
101
+ speed = settings.speed,
102
+ increment = 0;
103
+
104
+ var numberOfTotalFill = data.totalFill,
105
+ numberOfCircles = data.circles,
106
+ fillPercent = data.partialFill;
107
+
108
+ dotIncrement(increment);
109
+
110
+ function dotIncrement(inc) {
111
+
112
+ var $dot = $progressbar.find(".progress-segment").eq(inc),
113
+ dotWidth = 100;
114
+
115
+ if (inc === numberOfTotalFill)
116
+ dotWidth = fillPercent
117
+
118
+ $dot.find(".segment-inner").animate({
119
+ width: dotWidth + '%'
120
+ }, speed / numberOfCircles, function () {
121
+ increment++;
122
+ if (increment <= numberOfTotalFill) {
123
+ dotIncrement(increment);
124
+ }
125
+
126
+ });
127
+ }
128
+ };
129
+
130
+ /****** Premium Progress Bar Scroll Handler *****/
131
+ var PremiumProgressBarScrollWidgetHandler = function ($scope, $) {
132
+
133
+ var $progressbarElem = $scope.find(".premium-progressbar-container"),
134
+ settings = $progressbarElem.data("settings"),
135
+ type = settings.type;
136
+
137
+ if ("dots" === type) {
138
+ PremiumProgressBarWidgetHandler($scope, "frontend");
139
+ }
140
+
141
+ elementorFrontend.waypoint($scope, function () {
142
+ if ("dots" !== type) {
143
+ PremiumProgressBarWidgetHandler($(this));
144
+ } else {
145
+ PremiumProgressDotsHandler($(this));
146
+ }
147
+
148
+ });
149
+ };
150
+
151
+ /****** Premium Video Box Handler ******/
152
+ var PremiumVideoBoxWidgetHandler = function ($scope, $) {
153
+
154
+ var $videoBoxElement = $scope.find(".premium-video-box-container"),
155
+ $videoListElement = $scope.find(".premium-video-box-playlist-container"),
156
+ $videoContainer = $videoBoxElement.find(".premium-video-box-video-container"), //should be clicked
157
+ $videoInnerContainer = $videoBoxElement.find('.premium-video-box-inner-wrap'),
158
+ $videoImageContainer = $videoInnerContainer.find('.premium-video-box-image-container'),
159
+ type = $videoBoxElement.data("type"),
160
+ thumbnail = $videoBoxElement.data("thumbnail"),
161
+ sticky = $videoBoxElement.data('sticky'),
162
+ stickyOnPlay = $videoBoxElement.data('sticky-play'),
163
+ hoverEffect = $videoBoxElement.data("hover"),
164
+ video, vidSrc;
165
+
166
+ // Youtube playlist option
167
+ if ($videoListElement.length) {
168
+
169
+ //Make sure that video were pulled from the API.
170
+ if (!$videoContainer.length)
171
+ return;
172
+
173
+ $videoContainer.each(function (index, item) {
174
+
175
+ var vidSrc,
176
+ $videoContainer = $(item),
177
+ $videoBoxElement = $videoContainer.closest(".premium-video-box-container"),
178
+ $trigger = $videoContainer.closest(".premium-video-box-trigger");
179
+
180
+ vidSrc = $videoContainer.data("src");
181
+ vidSrc = vidSrc + "&autoplay=1";
182
+
183
+ $trigger.on("click", function () {
184
+
185
+ var $iframe = $("<iframe/>");
186
+
187
+ $iframe.attr({
188
+ "src": vidSrc,
189
+ "frameborder": "0",
190
+ "allowfullscreen": "1",
191
+ "allow": "autoplay;encrypted-media;"
192
+ });
193
+ $videoContainer.css("background", "#000");
194
+ $videoContainer.html($iframe);
195
+
196
+ $videoBoxElement.find(
197
+ ".premium-video-box-image-container, .premium-video-box-play-icon-container"
198
+ ).remove();
199
+
200
+ });
201
+
202
+ });
203
+
204
+ return;
205
+ }
206
+
207
+ if ("self" === type) {
208
+
209
+ video = $videoContainer.find("video");
210
+ vidSrc = video.attr("src");
211
+
212
+ } else {
213
+
214
+ vidSrc = $videoContainer.data("src");
215
+
216
+ if (!thumbnail || -1 !== vidSrc.indexOf("autoplay=1")) {
217
+
218
+ //Check if Autoplay on viewport option is enabled
219
+ if ($videoBoxElement.data("play-viewport")) {
220
+ elementorFrontend.waypoint($videoBoxElement, function () {
221
+ playVideo();
222
+ });
223
+ } else {
224
+ playVideo();
225
+ }
226
+
227
+ } else {
228
+ vidSrc = vidSrc + "&autoplay=1";
229
+ }
230
+
231
+ }
232
+
233
+ function playVideo() {
234
+
235
+ if ($videoBoxElement.hasClass("playing")) return;
236
+
237
+ $videoBoxElement.addClass("playing");
238
+
239
+ if (stickyOnPlay === 'yes')
240
+ stickyOption();
241
+
242
+ if ("self" === type) {
243
+
244
+ $(video).get(0).play();
245
+
246
+ $videoContainer.css({
247
+ opacity: "1",
248
+ visibility: "visible"
249
+ });
250
+
251
+ } else {
252
+
253
+ var $iframe = $("<iframe/>");
254
+
255
+ $iframe.attr({
256
+ "src": vidSrc,
257
+ "frameborder": "0",
258
+ "allowfullscreen": "1",
259
+ "allow": "autoplay;encrypted-media;"
260
+ });
261
+ $videoContainer.css("background", "#000");
262
+ $videoContainer.html($iframe);
263
+ }
264
+
265
+ $videoBoxElement.find(
266
+ ".premium-video-box-image-container, .premium-video-box-play-icon-container, .premium-video-box-description-container"
267
+ ).remove();
268
+
269
+ if ("vimeo" === type)
270
+ $videoBoxElement.find(".premium-video-box-vimeo-wrap").remove();
271
+ }
272
+
273
+ $videoBoxElement.on("click", function () {
274
+ playVideo();
275
+ });
276
+
277
+
278
+ if ("yes" !== sticky || "yes" === stickyOnPlay)
279
+ return;
280
+
281
+ stickyOption();
282
+
283
+ function stickyOption() {
284
+
285
+ var stickyDesktop = $videoBoxElement.data('hide-desktop'),
286
+ stickyTablet = $videoBoxElement.data('hide-tablet'),
287
+ stickyMobile = $videoBoxElement.data('hide-mobile'),
288
+ stickyMargin = $videoBoxElement.data('sticky-margin');
289
+
290
+ $videoBoxElement.off('click').on('click', function (e) {
291
+ // if ('yes' === sticky) {
292
+ var stickyTarget = e.target.className;
293
+ if ((stickyTarget.toString().indexOf('premium-video-box-sticky-close') >= 0) || (stickyTarget.toString().indexOf('premium-video-box-sticky-close') >= 0)) {
294
+ return false;
295
+ }
296
+ // }
297
+ playVideo();
298
+
299
+ });
300
+
301
+ //Make sure Elementor Waypoint is defined
302
+ if (typeof elementorFrontend.waypoint !== 'undefined') {
303
+
304
+ var stickyWaypoint = elementorFrontend.waypoint(
305
+ $videoBoxElement,
306
+ function (direction) {
307
+ if ('down' === direction) {
308
+
309
+ $videoBoxElement.removeClass('premium-video-box-sticky-hide').addClass('premium-video-box-sticky-apply premium-video-box-filter-sticky');
310
+
311
+ //Fix conflict with Elementor motion effects
312
+ if ($scope.hasClass("elementor-motion-effects-parent")) {
313
+ $scope.removeClass("elementor-motion-effects-perspective").find(".elementor-widget-container").addClass("premium-video-box-transform");
314
+ }
315
+
316
+ if ($videoBoxElement.data("mask")) {
317
+ //Fix Sticky position issue when drop-shadow is applied
318
+ $scope.find(".premium-video-box-mask-filter").removeClass("premium-video-box-mask-filter");
319
+
320
+ $videoBoxElement.find(':first-child').removeClass('premium-video-box-mask-media');
321
+
322
+ $videoImageContainer.removeClass(hoverEffect).removeClass('premium-video-box-mask-media').css({
323
+ 'transition': 'width 0.2s, height 0.2s',
324
+ '-webkit-transition': 'width 0.2s, height 0.2s'
325
+ });
326
+ }
327
+
328
+ $(document).trigger('premium_after_sticky_applied', [$scope]);
329
+
330
+ // Entrance Animation Option
331
+ if ($videoInnerContainer.data("video-animation") && " " != $videoInnerContainer.data("video-animation")) {
332
+ $videoInnerContainer.css("opacity", "0");
333
+ var animationDelay = $videoInnerContainer.data('delay-animation');
334
+ setTimeout(function () {
335
+
336
+ $videoInnerContainer.css("opacity", "1").addClass("animated " + $videoInnerContainer.data("video-animation"));
337
+
338
+ }, animationDelay * 1000);
339
+ }
340
+
341
+ } else {
342
+
343
+ $videoBoxElement.removeClass('premium-video-box-sticky-apply premium-video-box-filter-sticky').addClass('premium-video-box-sticky-hide');
344
+
345
+ //Fix conflict with Elementor motion effects
346
+ if ($scope.hasClass("elementor-motion-effects-parent")) {
347
+ $scope.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform");
348
+ }
349
+
350
+ if ($videoBoxElement.data("mask")) {
351
+ //Fix Sticky position issue when drop-shadow is applied
352
+ $videoBoxElement.parent().addClass("premium-video-box-mask-filter");
353
+
354
+ $videoBoxElement.find(':first-child').eq(0).addClass('premium-video-box-mask-media');
355
+ $videoImageContainer.addClass('premium-video-box-mask-media');
356
+ }
357
+
358
+ $videoImageContainer.addClass(hoverEffect).css({
359
+ 'transition': 'all 0.2s',
360
+ '-webkit-transition': 'all 0.2s'
361
+ });
362
+
363
+ $videoInnerContainer.removeClass("animated " + $videoInnerContainer.data("video-animation"));
364
+ }
365
+ }, {
366
+ offset: 0 + '%',
367
+ triggerOnce: false
368
+ }
369
+ );
370
+ }
371
+
372
+ var closeBtn = $scope.find('.premium-video-box-sticky-close');
373
+
374
+ closeBtn.off('click.closetrigger').on('click.closetrigger', function (e) {
375
+ stickyWaypoint[0].disable();
376
+
377
+ $videoBoxElement.removeClass('premium-video-box-sticky-apply premium-video-box-sticky-hide');
378
+
379
+ //Fix conflict with Elementor motion effects
380
+ if ($scope.hasClass("elementor-motion-effects-parent")) {
381
+ $scope.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform");
382
+ }
383
+
384
+ if ($videoBoxElement.data("mask")) {
385
+ //Fix Sticky position issue when drop-shadow is applied
386
+ $videoBoxElement.parent().addClass("premium-video-box-mask-filter");
387
+
388
+ //Necessary classes for mask shape option
389
+ $videoBoxElement.find(':first-child').eq(0).addClass('premium-video-box-mask-media');
390
+ $videoImageContainer.addClass('premium-video-box-mask-media');
391
+ }
392
+
393
+
394
+ });
395
+
396
+ checkResize(stickyWaypoint);
397
+
398
+ checkScroll();
399
+
400
+ window.addEventListener("scroll", checkScroll);
401
+
402
+ $(window).resize(function (e) {
403
+ checkResize(stickyWaypoint);
404
+ });
405
+
406
+ function checkResize(stickyWaypoint) {
407
+ var currentDeviceMode = elementorFrontend.getCurrentDeviceMode();
408
+
409
+ if ('' !== stickyDesktop && currentDeviceMode == stickyDesktop) {
410
+ disableSticky(stickyWaypoint);
411
+ } else if ('' !== stickyTablet && currentDeviceMode == stickyTablet) {
412
+ disableSticky(stickyWaypoint);
413
+ } else if ('' !== stickyMobile && currentDeviceMode == stickyMobile) {
414
+ disableSticky(stickyWaypoint);
415
+ } else {
416
+ stickyWaypoint[0].enable();
417
+ }
418
+ }
419
+
420
+ function disableSticky(stickyWaypoint) {
421
+ stickyWaypoint[0].disable();
422
+ $videoBoxElement.removeClass('premium-video-box-sticky-apply premium-video-box-sticky-hide');
423
+ }
424
+
425
+ function checkScroll() {
426
+ if ($videoBoxElement.hasClass('premium-video-box-sticky-apply')) {
427
+ $videoInnerContainer.draggable({
428
+ start: function () {
429
+ $(this).css({
430
+ transform: "none",
431
+ top: $(this).offset().top + "px",
432
+ left: $(this).offset().left + "px"
433
+ });
434
+ },
435
+ containment: 'window'
436
+ });
437
+ }
438
+ }
439
+
440
+ $(document).on('premium_after_sticky_applied', function (e, $scope) {
441
+ var infobar = $scope.find('.premium-video-box-sticky-infobar');
442
+
443
+ if (0 !== infobar.length) {
444
+ var infobarHeight = infobar.outerHeight();
445
+
446
+ if ($scope.hasClass('premium-video-sticky-center-left') || $scope.hasClass('premium-video-sticky-center-right')) {
447
+ infobarHeight = Math.ceil(infobarHeight / 2);
448
+ $videoInnerContainer.css('top', 'calc( 50% - ' + infobarHeight + 'px )');
449
+ }
450
+
451
+ if ($scope.hasClass('premium-video-sticky-bottom-left') || $scope.hasClass('premium-video-sticky-bottom-right')) {
452
+ if ('' !== stickyMargin) {
453
+ infobarHeight = Math.ceil(infobarHeight);
454
+ var stickBottom = infobarHeight + stickyMargin;
455
+ $videoInnerContainer.css('bottom', stickBottom);
456
+ }
457
+ }
458
+ }
459
+ });
460
+
461
+ }
462
+
463
+ };
464
+
465
+ /****** Premium Media Grid Handler ******/
466
+ var PremiumGridWidgetHandler = ModuleHandler.extend({
467
+
468
+ settings: {},
469
+
470
+ getDefaultSettings: function () {
471
+ return {
472
+ selectors: {
473
+ galleryElement: '.premium-gallery-container',
474
+ filters: '.premium-gallery-cats-container li',
475
+ gradientLayer: '.premium-gallery-gradient-layer',
476
+ loadMore: '.premium-gallery-load-more',
477
+ loadMoreDiv: '.premium-gallery-load-more div',
478
+ vidWrap: '.premium-gallery-video-wrap',
479
+ }
480
+ }
481
+ },
482
+
483
+ getDefaultElements: function () {
484
+
485
+ var selectors = this.getSettings('selectors'),
486
+ elements = {
487
+ $galleryElement: this.$element.find(selectors.galleryElement),
488
+ $filters: this.$element.find(selectors.filters),
489
+ $gradientLayer: this.$element.find(selectors.gradientLayer),
490
+ $vidWrap: this.$element.find(selectors.vidWrap)
491
+ };
492
+
493
+ elements.$loadMore = elements.$galleryElement.parent().find(selectors.loadMore)
494
+ elements.$loadMoreDiv = elements.$galleryElement.parent().find(selectors.loadMoreDiv)
495
+
496
+ return elements;
497
+ },
498
+
499
+ bindEvents: function () {
500
+ this.getGlobalSettings();
501
+ this.run();
502
+ },
503
+
504
+ getGlobalSettings: function () {
505
+ var $galleryElement = this.elements.$galleryElement,
506
+ settings = $galleryElement.data('settings');
507
+
508
+ this.settings = {
509
+ layout: settings.img_size,
510
+ loadMore: settings.load_more,
511
+ columnWidth: null,
512
+ filter: null,
513
+ isFilterClicked: false,
514
+ minimum: settings.minimum,
515
+ imageToShow: settings.click_images,
516
+ counter: settings.minimum,
517
+ ltrMode: settings.ltr_mode,
518
+ shuffle: settings.shuffle,
519
+ active_cat: settings.active_cat,
520
+ theme: settings.theme,
521
+ overlay: settings.overlay,
522
+ sort_by: settings.sort_by,
523
+ light_box: settings.light_box,
524
+ flag: settings.flag,
525
+ lightbox_type: settings.lightbox_type
526
+ }
527
+ },
528
+
529
+ updateCounter: function () {
530
+
531
+ if (this.settings.isFilterClicked) {
532
+
533
+ this.settings.counter = this.settings.minimum;
534
+
535
+ this.settings.isFilterClicked = false;
536
+
537
+ } else {
538
+ this.settings.counter = this.settings.counter;
539
+ }
540
+
541
+ this.settings.counter = this.settings.counter + this.settings.imageToShow;
542
+ },
543
+
544
+ updateGrid: function (gradHeight, $isotopeGallery, $loadMoreDiv) {
545
+ $.ajax({
546
+ url: this.appendItems(this.settings.counter, gradHeight, $isotopeGallery),
547
+ beforeSend: function () {
548
+ $loadMoreDiv.removeClass("premium-gallery-item-hidden");
549
+ },
550
+ success: function () {
551
+ $loadMoreDiv.addClass("premium-gallery-item-hidden");
552
+ }
553
+ });
554
+ },
555
+
556
+ loadMore: function (gradHeight, $isotopeGallery) {
557
+
558
+ var $galleryElement = this.elements.$galleryElement,
559
+ $loadMoreDiv = this.elements.$loadMoreDiv,
560
+ $loadMore = this.elements.$loadMore,
561
+ _this = this;
562
+
563
+ $loadMoreDiv.addClass("premium-gallery-item-hidden");
564
+
565
+ if ($galleryElement.find(".premium-gallery-item").length > this.settings.minimum) {
566
+
567
+ $loadMore.removeClass("premium-gallery-item-hidden");
568
+
569
+ $galleryElement.parent().on("click", ".premium-gallery-load-less", function () {
570
+ _this.settings.counter = _this.settings.counter - _this.settings.imageToShow;
571
+ });
572
+
573
+ $galleryElement.parent().on("click", ".premium-gallery-load-more-btn:not(.premium-gallery-load-less)", function () {
574
+ _this.updateCounter();
575
+ _this.updateGrid(gradHeight, $isotopeGallery, $loadMoreDiv);
576
+ });
577
+
578
+ }
579
+
580
+ },
581
+
582
+ getItemsToHide: function (instance, imagesToShow) {
583
+ var items = instance.filteredItems.slice(imagesToShow, instance
584
+ .filteredItems.length).map(function (item) {
585
+ return item.element;
586
+ });
587
+
588
+ return items;
589
+ },
590
+
591
+ appendItems: function (imagesToShow, gradHeight, $isotopeGallery) {
592
+
593
+ var $galleryElement = this.elements.$galleryElement,
594
+ $gradientLayer = this.elements.$gradientLayer,
595
+ instance = $galleryElement.data("isotope"),
596
+ itemsToHide = this.getItemsToHide(instance, imagesToShow);
597
+
598
+ $gradientLayer.outerHeight(gradHeight);
599
+
600
+ $galleryElement.find(".premium-gallery-item-hidden").removeClass("premium-gallery-item-hidden");
601
+
602
+ $galleryElement.parent().find(".premium-gallery-load-more").removeClass("premium-gallery-item-hidden");
603
+
604
+ $(itemsToHide).addClass("premium-gallery-item-hidden");
605
+
606
+ $isotopeGallery.isotope("layout");
607
+
608
+ if (0 == itemsToHide) {
609
+
610
+ $gradientLayer.addClass("premium-gallery-item-hidden");
611
+
612
+ $galleryElement.parent().find(".premium-gallery-load-more").addClass("premium-gallery-item-hidden");
613
+ }
614
+ },
615
+
616
+ triggerFilerTabs: function (url) {
617
+ var filterIndex = url.searchParams.get(this.settings.flag),
618
+ $filters = this.elements.$filters;
619
+
620
+ if (filterIndex) {
621
+
622
+ var $targetFilter = $filters.eq(filterIndex).find("a");
623
+
624
+ $targetFilter.trigger('click');
625
+
626
+ }
627
+ },
628
+
629
+ onReady: function ($isotopeGallery) {
630
+ var _this = this;
631
+
632
+ $isotopeGallery.isotope("layout");
633
+
634
+ $isotopeGallery.isotope({
635
+ filter: _this.settings.active_cat
636
+ });
637
+
638
+ var url = new URL(window.location.href);
639
+
640
+ if (url)
641
+ _this.triggerFilerTabs(url);
642
+
643
+ },
644
+
645
+ onResize: function ($isotopeGallery) {
646
+ var _this = this;
647
+
648
+ _this.setMetroLayout();
649
+
650
+ $isotopeGallery.isotope({
651
+ itemSelector: ".premium-gallery-item",
652
+ masonry: {
653
+ columnWidth: _this.settings.columnWidth
654
+ },
655
+ });
656
+
657
+ },
658
+
659
+ lightBoxDisabled: function () {
660
+ var _this = this,
661
+ $vidWrap = this.elements.$vidWrap;
662
+
663
+ $vidWrap.each(function (index, item) {
664
+ var type = $(item).data("type");
665
+
666
+ $(item).closest(".premium-gallery-item").on("click", function () {
667
+ var $this = $(this);
668
+
669
+ $this.find(".pa-gallery-img-container").css("background", "#000");
670
+
671
+ $this.find("img, .pa-gallery-icons-caption-container, .pa-gallery-icons-wrapper").css("visibility", "hidden");
672
+
673
+ if ("style3" !== _this.settings.skin)
674
+ $this.find(".premium-gallery-caption").css("visibility", "hidden");
675
+
676
+ if ("hosted" !== type) {
677
+ _this.playVid($this);
678
+ } else {
679
+ _this.playHostedVid(item);
680
+ }
681
+ });
682
+ });
683
+
684
+ },
685
+
686
+ playVid: function ($this) {
687
+ var $iframeWrap = $this.find(".premium-gallery-iframe-wrap"),
688
+ src = $iframeWrap.data("src");
689
+
690
+ src = src.replace("&mute", "&autoplay=1&mute");
691
+
692
+ var $iframe = $("<iframe/>");
693
+
694
+ $iframe.attr({
695
+ "src": src,
696
+ "frameborder": "0",
697
+ "allowfullscreen": "1",
698
+ "allow": "autoplay;encrypted-media;"
699
+ });
700
+
701
+ $iframeWrap.html($iframe);
702
+
703
+ $iframe.css("visibility", "visible");
704
+ },
705
+
706
+ playHostedVid: function (item) {
707
+ var $video = $(item).find("video");
708
+
709
+ $video.get(0).play();
710
+ $video.css("visibility", "visible");
711
+ },
712
+
713
+ run: function () {
714
+
715
+ var $galleryElement = this.elements.$galleryElement,
716
+ $vidWrap = this.elements.$vidWrap,
717
+ $filters = this.elements.$filters,
718
+ _this = this;
719
+
720
+ if ('metro' === this.settings.layout) {
721
+
722
+ this.setMetroLayout();
723
+
724
+ this.settings.layout = "masonry";
725
+
726
+ $(window).resize(function () { _this.onResize($isotopeGallery); });
727
+ }
728
+
729
+ var $isotopeGallery = $galleryElement.isotope(this.getIsoTopeSettings());
730
+
731
+ $isotopeGallery.imagesLoaded().progress(function () {
732
+ $isotopeGallery.isotope("layout");
733
+ });
734
+
735
+ $(document).ready(function () { _this.onReady($isotopeGallery); });
736
+
737
+ if (this.settings.loadMore) {
738
+
739
+ var $gradientLayer = this.elements.$gradientLayer,
740
+ gradHeight = null;
741
+
742
+ setTimeout(function () {
743
+ gradHeight = $gradientLayer.outerHeight();
744
+ }, 200);
745
+
746
+ this.loadMore(gradHeight, $isotopeGallery);
747
+ }
748
+
749
+ if ("yes" !== this.settings.light_box)
750
+ this.lightBoxDisabled();
751
+
752
+ $filters.find("a").click(function (e) {
753
+ e.preventDefault();
754
+
755
+ _this.isFilterClicked = true;
756
+
757
+ $filters.find(".active").removeClass("active");
758
+
759
+ $(this).addClass("active");
760
+
761
+ _this.settings.filter = $(this).attr("data-filter");
762
+
763
+ $isotopeGallery.isotope({
764
+ filter: _this.settings.filter
765
+ });
766
+
767
+ if (_this.settings.shuffle) $isotopeGallery.isotope("shuffle");
768
+
769
+ if (_this.settings.loadMore) _this.appendItems(_this.settings.minimum, gradHeight, $isotopeGallery);
770
+
771
+ return false;
772
+ });
773
+
774
+ if ("default" === this.settings.lightbox_type)
775
+ this.$element.find(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto(this.getPrettyPhotoSettings());
776
+ },
777
+
778
+ getPrettyPhotoSettings: function () {
779
+ return {
780
+ theme: this.settings.theme,
781
+ hook: "data-rel",
782
+ opacity: 0.7,
783
+ show_title: false,
784
+ deeplinking: false,
785
+ overlay_gallery: this.settings.overlay,
786
+ custom_markup: "",
787
+ default_width: 900,
788
+ default_height: 506,
789
+ social_tools: ""
790
+ }
791
+ },
792
+
793
+ getIsoTopeSettings: function () {
794
+ return {
795
+ itemSelector: '.premium-gallery-item',
796
+ percentPosition: true,
797
+ animationOptions: {
798
+ duration: 750,
799
+ easing: 'linear'
800
+ },
801
+ filter: this.settings.active_cat,
802
+ layoutMode: this.settings.layout,
803
+ originLeft: this.settings.ltrMode,
804
+ masonry: {
805
+ columnWidth: this.settings.columnWidth
806
+ },
807
+ sortBy: this.settings.sort_by
808
+ }
809
+ },
810
+
811
+ getRepeaterSettings: function () {
812
+ return this.getElementSettings('premium_gallery_img_content');
813
+ },
814
+
815
+ setMetroLayout: function () {
816
+
817
+ var $galleryElement = this.elements.$galleryElement,
818
+ gridWidth = $galleryElement.width(),
819
+ cellSize = Math.floor(gridWidth / 12),
820
+ deviceType = elementorFrontend.getCurrentDeviceMode(),
821
+ suffix = 'desktop' === deviceType ? '' : '_' + deviceType,
822
+ repeater = this.getRepeaterSettings();
823
+
824
+ $galleryElement.find(".premium-gallery-item").each(function (index, item) { //should be added to selectors and elements
825
+
826
+ var cells = repeater[index]['premium_gallery_image_cell' + suffix].size,
827
+ vCells = repeater[index]['premium_gallery_image_vcell' + suffix].size;
828
+
829
+ if ("" === cells || undefined == cells) {
830
+ cells = repeater[index].premium_gallery_image_cell;
831
+ }
832
+
833
+ if ("" === vCells || undefined == vCells) {
834
+ vCells = repeater[index].premium_gallery_image_vcell;
835
+ }
836
+
837
+ $(item).css({
838
+ width: Math.ceil(cells * cellSize),
839
+ height: Math.ceil(vCells * cellSize)
840
+ });
841
+ });
842
+
843
+ this.settings.columnWidth = cellSize;
844
+ }
845
+
846
+ });
847
+
848
+ /****** Premium Counter Handler ******/
849
+ var PremiumCounterHandler = function ($scope, $) {
850
+
851
+ var $counterElement = $scope.find(".premium-counter");
852
+
853
+ elementorFrontend.waypoint($counterElement, function () {
854
+
855
+ var counterSettings = $counterElement.data(),
856
+ incrementElement = $counterElement.find(".premium-counter-init"),
857
+ iconElement = $counterElement.find(".icon");
858
+
859
+ $(incrementElement).numerator(counterSettings);
860
+
861
+ $(iconElement).addClass("animated " + iconElement.data("animation"));
862
+
863
+ });
864
+
865
+ };
866
+
867
+ /****** Premium Fancy Text Handler ******/
868
+ var PremiumFancyTextHandler = function ($scope, $) {
869
+
870
+ var $elem = $scope.find(".premium-fancy-text-wrapper"),
871
+ settings = $elem.data("settings"),
872
+ loadingSpeed = settings.delay || 2500,
873
+ itemCount = $elem.find('.premium-fancy-list-items').length,
874
+ loopCount = ('' === settings.count && !['typing', 'slide', 'autofade'].includes(settings.effect)) ? 'infinite' : (settings.count * itemCount);
875
+
876
+ function escapeHtml(unsafe) {
877
+ return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
878
+ /"/g, "&quot;").replace(/'/g, "&#039;");
879
+ }
880
+
881
+ if ("typing" === settings.effect) {
882
+
883
+ var fancyStrings = [];
884
+
885
+ settings.strings.forEach(function (item) {
886
+ fancyStrings.push(escapeHtml(item));
887
+ });
888
+
889
+ $elem.find(".premium-fancy-text").typed({
890
+ strings: fancyStrings,
891
+ typeSpeed: settings.typeSpeed,
892
+ backSpeed: settings.backSpeed,
893
+ startDelay: settings.startDelay,
894
+ backDelay: settings.backDelay,
895
+ showCursor: settings.showCursor,
896
+ cursorChar: settings.cursorChar,
897
+ loop: settings.loop
898
+ });
899
+
900
+ } else if ("slide" === settings.effect) {
901
+ loadingSpeed = settings.pause;
902
+
903
+ $elem.find(".premium-fancy-text").vTicker({
904
+ speed: settings.speed,
905
+ showItems: settings.showItems,
906
+ pause: settings.pause,
907
+ mousePause: settings.mousePause,
908
+ direction: "up"
909
+ });
910
+
911
+ } else if ('auto-fade' === settings.effect) {
912
+ var $items = $elem.find(".premium-fancy-list-items"),
913
+ len = $items.length;
914
+
915
+ if (0 === len) {
916
+ return;
917
+ }
918
+
919
+ var delay = settings.duration / len,
920
+ itemDelay = 0;
921
+
922
+ loadingSpeed = delay;
923
+
924
+ $items.each(function ($index, $item) {
925
+ $item.style.animationDelay = itemDelay + 'ms';
926
+ itemDelay += delay;
927
+ });
928
+
929
+ } else {
930
+
931
+ setFancyAnimation();
932
+
933
+ function setFancyAnimation() {
934
+
935
+ var $item = $elem.find(".premium-fancy-list-items"),
936
+ current = 1;
937
+
938
+ //Get effect settings
939
+ var delay = settings.delay || 2500,
940
+ loopCount = settings.count;
941
+
942
+ //If Loop Count option is set
943
+ if (loopCount) {
944
+ var currentLoop = 1,
945
+ fancyStringsCount = $elem.find(".premium-fancy-list-items").length;
946
+ }
947
+
948
+ var loopInterval = setInterval(function () {
949
+
950
+ var animationClass = "";
951
+
952
+ //Add animation class
953
+ if (settings.effect === "custom")
954
+ animationClass = "animated " + settings.animation;
955
+
956
+ //Show current active item
957
+ $item.eq(current).addClass("premium-fancy-item-visible " + animationClass).removeClass("premium-fancy-item-hidden");
958
+
959
+ var $inactiveItems = $item.filter(function (index) {
960
+ return index !== current;
961
+ });
962
+
963
+ //Hide inactive items
964
+ $inactiveItems.addClass("premium-fancy-item-hidden").removeClass("premium-fancy-item-visible " + animationClass);
965
+
966
+ current++;
967
+
968
+ //Restart loop
969
+ if ($item.length === current)
970
+ current = 0;
971
+
972
+ //Increment interval and check if loop count is reached
973
+ if (loopCount) {
974
+ currentLoop++;
975
+
976
+ if ((fancyStringsCount * loopCount) === currentLoop)
977
+ clearInterval(loopInterval);
978
+ }
979
+
980
+
981
+ }, delay);
982
+
983
+ }
984
+ }
985
+
986
+ //Show the strings after the layout is set.
987
+ if ("typing" !== settings.effect) {
988
+ setTimeout(function () {
989
+ $elem.find(".premium-fancy-text").css('opacity', '1');
990
+ }, 500);
991
+
992
+ }
993
+
994
+ if ('loading' === settings.loading && 'typing' !== settings.effect) {
995
+ $scope.find('.premium-fancy-text').append('<span class="premium-loading-bar"></span>');
996
+ $scope.find('.premium-loading-bar').css({
997
+ 'animation-iteration-count': loopCount,
998
+ 'animation-duration': loadingSpeed + 'ms'
999
+ });
1000
+ }
1001
+
1002
+ };
1003
+
1004
+ /****** Premium Countdown Handler ******/
1005
+ var PremiumCountDownHandler = function ($scope, $) {
1006
+
1007
+ var $countDownElement = $scope.find(".premium-countdown"),
1008
+ settings = $countDownElement.data("settings"),
1009
+ id = $scope.data('id'),
1010
+ label1 = settings.label1,
1011
+ label2 = settings.label2,
1012
+ newLabe1 = label1.split(","),
1013
+ newLabel2 = label2.split(","),
1014
+ timerType = settings.timerType,
1015
+ until = 'evergreen' === timerType ? settings.until.date : settings.until,
1016
+ layout = '',
1017
+ map = {
1018
+ y: { index: 0, oldVal: '' },
1019
+ o: { index: 1, oldVal: '' },
1020
+ w: { index: 2, oldVal: '' },
1021
+ d: { index: 3, oldVal: '' },
1022
+ h: { index: 4, oldVal: '' },
1023
+ m: { index: 5, oldVal: '' },
1024
+ s: { index: 6, oldVal: '' }
1025
+ };
1026
+
1027
+ if ($countDownElement.find('#countdown-' + id).hasClass('premium-countdown-flip')) {
1028
+ settings.format.split('').forEach(function (unit) {
1029
+ var lowercased = unit.toLowerCase();
1030
+
1031
+ layout += '<div class="premium-countdown-block premium-countdown-' + lowercased + '"><div class="pre_time-mid"> <div class="premium-countdown-figure"><span class="top">{' + lowercased + 'nn}</span><span class="top-back"><span>{' + lowercased + 'nn}</span></span><span class="bottom">{' + lowercased + 'nn}</span><span class="bottom-back"><span>{' + lowercased + 'nn}</span></span></div><span class="premium-countdown-label">{' + lowercased + 'l}</span></div><span class="countdown_separator">{sep}</span></div>';
1032
+ });
1033
+ }
1034
+
1035
+ $countDownElement.find('#countdown-' + id).countdown({
1036
+ layout: layout,
1037
+ labels: newLabel2,
1038
+ labels1: newLabe1,
1039
+ until: new Date(until),
1040
+ format: settings.format,
1041
+ padZeroes: true,
1042
+ timeSeparator: settings.separator,
1043
+ onTick: function (periods) {
1044
+
1045
+ equalWidth();
1046
+
1047
+ if ($countDownElement.find('#countdown-' + id).hasClass('premium-countdown-flip')) {
1048
+ animateFigure(periods, map);
1049
+ }
1050
+ },
1051
+ onExpiry: function () {
1052
+ if ('onExpiry' === settings.event) {
1053
+ $countDownElement.find('#countdown-' + id).html(settings.text);
1054
+ }
1055
+ },
1056
+ serverSync: function () {
1057
+ return new Date(settings.serverSync);
1058
+ }
1059
+ });
1060
+
1061
+ if (settings.reset) {
1062
+ $countDownElement.find('.premium-countdown-init').countdown('option', 'until', new Date(until));
1063
+ }
1064
+
1065
+ if ('expiryUrl' === settings.event) {
1066
+ $countDownElement.find('#countdown-' + id).countdown('option', 'expiryUrl', (elementorFrontend.isEditMode()) ? '' : settings.text);
1067
+ }
1068
+
1069
+ function equalWidth() {
1070
+ var width = 0;
1071
+ $countDownElement.find('#countdown-' + id + ' .countdown-amount').each(function (index, slot) {
1072
+ if (width < $(slot).outerWidth()) {
1073
+ width = $(slot).outerWidth();
1074
+ }
1075
+ });
1076
+
1077
+ $countDownElement.find('#countdown-' + id + ' .countdown-amount').css('width', width);
1078
+ }
1079
+
1080
+ function animateFigure(periods, map) {
1081
+ settings.format.split('').forEach(function (unit) {
1082
+
1083
+ var lowercased = unit.toLowerCase(),
1084
+ index = map[lowercased].index,
1085
+ oldVal = map[lowercased].oldVal;
1086
+
1087
+ if (periods[index] !== oldVal) {
1088
+
1089
+ map[lowercased].oldVal = periods[index];
1090
+
1091
+ var $top = $('#countdown-' + id).find('.premium-countdown-' + lowercased + ' .top'),
1092
+ $back_top = $('#countdown-' + id).find('.premium-countdown-' + lowercased + ' .top-back');
1093
+
1094
+ TweenMax.to($top, 0.8, {
1095
+ rotationX: '-180deg',
1096
+ transformPerspective: 300,
1097
+ ease: Quart.easeOut,
1098
+ onComplete: function () {
1099
+ TweenMax.set($top, { rotationX: 0 });
1100
+ }
1101
+ });
1102
+
1103
+ TweenMax.to($back_top, 0.8, {
1104
+ rotationX: 0,
1105
+ transformPerspective: 300,
1106
+ ease: Quart.easeOut,
1107
+ clearProps: 'all'
1108
+ });
1109
+ }
1110
+ });
1111
+ }
1112
+
1113
+ times = $countDownElement.find('#countdown-' + id).countdown("getTimes");
1114
+
1115
+ function runTimer(el) {
1116
+ return el == 0;
1117
+ }
1118
+
1119
+ if (times.every(runTimer)) {
1120
+
1121
+ if ('onExpiry' === settings.event) {
1122
+ $countDownElement.find('#countdown-' + id).html(settings.text);
1123
+ } else if ('expiryUrl' === settings.event && !elementorFrontend.isEditMode()) {
1124
+ var editMode = $('body').find('#elementor').length;
1125
+ if (0 < editMode) {
1126
+ $countDownElement.find('#countdown-' + id).html(
1127
+ "<h1>You can not redirect url from elementor Editor!!</h1>");
1128
+ } else {
1129
+ if (!elementorFrontend.isEditMode()) {
1130
+ window.location.href = settings.text;
1131
+ }
1132
+ }
1133
+
1134
+ }
1135
+ }
1136
+
1137
+ };
1138
+
1139
+ /****** Premium Carousel Handler ******/
1140
+ var PremiumCarouselHandler = function ($scope, $) {
1141
+
1142
+ var $carouselElem = $scope.find(".premium-carousel-wrapper"),
1143
+ settings = $($carouselElem).data("settings"),
1144
+ isEdit = elementorFrontend.isEditMode();
1145
+
1146
+ function slideToShow(slick) {
1147
+
1148
+ var slidesToShow = slick.options.slidesToShow,
1149
+ windowWidth = $(window).width();
1150
+ if (windowWidth > settings.tabletBreak) {
1151
+ slidesToShow = settings.slidesDesk;
1152
+ }
1153
+ if (windowWidth <= settings.tabletBreak) {
1154
+ slidesToShow = settings.slidesTab;
1155
+ }
1156
+ if (windowWidth <= settings.mobileBreak) {
1157
+ slidesToShow = settings.slidesMob;
1158
+ }
1159
+ return slidesToShow;
1160
+
1161
+ }
1162
+
1163
+ //Get templates content on the editor page
1164
+ if (isEdit) {
1165
+
1166
+ $carouselElem.find(".item-wrapper").each(function (index, slide) {
1167
+
1168
+ var templateID = $(slide).data("template");
1169
+
1170
+ if (undefined !== templateID) {
1171
+ $.ajax({
1172
+ type: "GET",
1173
+ url: PremiumSettings.ajaxurl,
1174
+ dataType: "html",
1175
+ data: {
1176
+ action: "get_elementor_template_content",
1177
+ templateID: templateID
1178
+ }
1179
+ }).success(function (response) {
1180
+
1181
+ var data = JSON.parse(response).data;
1182
+
1183
+ if (undefined !== data.template_content) {
1184
+
1185
+ $(slide).html(data.template_content);
1186
+ $carouselElem.find(".premium-carousel-inner").slick("refresh");
1187
+
1188
+ }
1189
+ });
1190
+ }
1191
+ });
1192
+
1193
+ }
1194
+
1195
+ $carouselElem.on("init", function (event) {
1196
+
1197
+ event.preventDefault();
1198
+
1199
+ setTimeout(function () {
1200
+ resetAnimations("init");
1201
+ }, 500);
1202
+
1203
+ $(this).find("item-wrapper.slick-active").each(function () {
1204
+ var $this = $(this);
1205
+ $this.addClass($this.data("animation"));
1206
+ });
1207
+
1208
+ $(".slick-track").addClass("translate");
1209
+
1210
+ });
1211
+
1212
+ $carouselElem.find(".premium-carousel-inner").slick({
1213
+ vertical: settings.vertical,
1214
+ slidesToScroll: settings.slidesToScroll,
1215
+ slidesToShow: settings.slidesToShow,
1216
+ responsive: [{
1217
+ breakpoint: settings.tabletBreak,
1218
+ settings: {
1219
+ slidesToShow: settings.slidesTab,
1220
+ slidesToScroll: settings.slidesTab,
1221
+ swipe: settings.touchMove,
1222
+ }
1223
+ },
1224
+ {
1225
+ breakpoint: settings.mobileBreak,
1226
+ settings: {
1227
+ slidesToShow: settings.slidesMob,
1228
+ slidesToScroll: settings.slidesMob,
1229
+ swipe: settings.touchMove,
1230
+ }
1231
+ }
1232
+ ],
1233
+ useTransform: true,
1234
+ fade: settings.fade,
1235
+ infinite: settings.infinite,
1236
+ speed: settings.speed,
1237
+ autoplay: settings.autoplay,
1238
+ autoplaySpeed: settings.autoplaySpeed,
1239
+ draggable: settings.draggable,
1240
+ rtl: settings.rtl,
1241
+ adaptiveHeight: settings.adaptiveHeight,
1242
+ pauseOnHover: settings.pauseOnHover,
1243
+ centerMode: settings.centerMode,
1244
+ centerPadding: settings.centerPadding,
1245
+ arrows: settings.arrows,
1246
+ prevArrow: $carouselElem.find(".premium-carousel-nav-arrow-prev").html(),
1247
+ nextArrow: $carouselElem.find(".premium-carousel-nav-arrow-next").html(),
1248
+ dots: settings.dots,
1249
+ customPaging: function () {
1250
+ var customDot = $carouselElem.find(".premium-carousel-nav-dot").html();
1251
+ return customDot;
1252
+ }
1253
+ });
1254
+
1255
+ function resetAnimations(event) {
1256
+
1257
+ var $slides = $carouselElem.find(".slick-slide");
1258
+
1259
+ if ("init" === event)
1260
+ $slides = $slides.not(".slick-current");
1261
+
1262
+ $slides.find(".animated").each(function (index, elem) {
1263
+
1264
+ var settings = $(elem).data("settings");
1265
+
1266
+ if (!settings)
1267
+ return;
1268
+
1269
+ if (!settings._animation && !settings.animation)
1270
+ return;
1271
+
1272
+ var animation = settings._animation || settings.animation;
1273
+
1274
+ $(elem).removeClass("animated " + animation).addClass("elementor-invisible");
1275
+ });
1276
+ };
1277
+
1278
+ function triggerAnimation() {
1279
+
1280
+ $carouselElem.find(".slick-active .elementor-invisible").each(function (index, elem) {
1281
+
1282
+ var settings = $(elem).data("settings");
1283
+
1284
+ if (!settings)
1285
+ return;
1286
+
1287
+ if (!settings._animation && !settings.animation)
1288
+ return;
1289
+
1290
+ var delay = settings._animation_delay ? settings._animation_delay : 0,
1291
+ animation = settings._animation || settings.animation;
1292
+
1293
+ setTimeout(function () {
1294
+ $(elem).removeClass("elementor-invisible").addClass(animation +
1295
+ ' animated');
1296
+ }, delay);
1297
+ });
1298
+ }
1299
+
1300
+ $carouselElem.on("afterChange", function (event, slick, currentSlide) {
1301
+
1302
+ var slidesScrolled = slick.options.slidesToScroll,
1303
+ slidesToShow = slideToShow(slick),
1304
+ centerMode = slick.options.centerMode,
1305
+ slideToAnimate = currentSlide + slidesToShow - 1;
1306
+
1307
+ //Trigger Aniamtions for the current slide
1308
+ triggerAnimation();
1309
+
1310
+ if (slidesScrolled === 1) {
1311
+ if (!centerMode === true) {
1312
+ var $inViewPort = $(this).find("[data-slick-index='" + slideToAnimate +
1313
+ "']");
1314
+ if ("null" != settings.animation) {
1315
+ $inViewPort.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
1316
+ .addClass(settings.animation).removeClass(
1317
+ "premium-carousel-content-hidden");
1318
+ }
1319
+ }
1320
+ } else {
1321
+ for (var i = slidesScrolled + currentSlide; i >= 0; i--) {
1322
+ $inViewPort = $(this).find("[data-slick-index='" + i + "']");
1323
+ if ("null" != settings.animation) {
1324
+ $inViewPort.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
1325
+ .addClass(settings.animation).removeClass(
1326
+ "premium-carousel-content-hidden");
1327
+ }
1328
+ }
1329
+ }
1330
+ });
1331
+
1332
+ $carouselElem.on("beforeChange", function (event, slick, currentSlide) {
1333
+
1334
+ //Reset Aniamtions for the other slides
1335
+ resetAnimations();
1336
+
1337
+ var $inViewPort = $(this).find("[data-slick-index='" + currentSlide + "']");
1338
+
1339
+ if ("null" != settings.animation) {
1340
+ $inViewPort.siblings().find(
1341
+ "p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").removeClass(
1342
+ settings.animation).addClass(
1343
+ "premium-carousel-content-hidden");
1344
+ }
1345
+ });
1346
+
1347
+ if (settings.vertical) {
1348
+
1349
+ var maxHeight = -1;
1350
+
1351
+ elementorFrontend.elements.$window.on('load', function () {
1352
+ $carouselElem.find(".slick-slide").each(function () {
1353
+ if ($(this).height() > maxHeight) {
1354
+ maxHeight = $(this).height();
1355
+ }
1356
+ });
1357
+ $carouselElem.find(".slick-slide").each(function () {
1358
+ if ($(this).height() < maxHeight) {
1359
+ $(this).css("margin", Math.ceil(
1360
+ (maxHeight - $(this).height()) / 2) + "px 0");
1361
+ }
1362
+ });
1363
+ });
1364
+ }
1365
+ var marginFix = {
1366
+ element: $("a.ver-carousel-arrow"),
1367
+ getWidth: function () {
1368
+ var width = this.element.outerWidth();
1369
+ return width / 2;
1370
+ },
1371
+ setWidth: function (type) {
1372
+ type = type || "vertical";
1373
+ if (type == "vertical") {
1374
+ this.element.css("margin-left", "-" + this.getWidth() + "px");
1375
+ } else {
1376
+ this.element.css("margin-top", "-" + this.getWidth() + "px");
1377
+ }
1378
+ }
1379
+ };
1380
+ marginFix.setWidth();
1381
+ marginFix.element = $("a.carousel-arrow");
1382
+ marginFix.setWidth("horizontal");
1383
+
1384
+ $(document).ready(function () {
1385
+
1386
+ settings.navigation.map(function (item, index) {
1387
+
1388
+ if (item) {
1389
+
1390
+ $(item).on("click", function () {
1391
+
1392
+ var currentActive = $carouselElem.find(".premium-carousel-inner").slick("slickCurrentSlide");
1393
+
1394
+ if (index !== currentActive) {
1395
+ $carouselElem.find(".premium-carousel-inner").slick("slickGoTo", index)
1396
+ }
1397
+
1398
+ })
1399
+ }
1400
+
1401
+ })
1402
+ })
1403
+
1404
+ };
1405
+
1406
+ var PremiumBannerHandler = ModuleHandler.extend({
1407
+
1408
+ getDefaultSettings: function () {
1409
+
1410
+ return {
1411
+ selectors: {
1412
+ bannerElement: '.premium-banner',
1413
+ bannerImgWrap: '.premium-banner-ib',
1414
+ bannerImg: 'img',
1415
+ }
1416
+ }
1417
+
1418
+ },
1419
+
1420
+ getDefaultElements: function () {
1421
+
1422
+ var selectors = this.getSettings('selectors');
1423
+
1424
+ return {
1425
+ $bannerElement: this.$element.find(selectors.bannerElement),
1426
+ $bannerImgWrap: this.$element.find(selectors.bannerImgWrap),
1427
+ $bannerImg: this.$element.find(selectors.bannerImg)
1428
+ }
1429
+
1430
+ },
1431
+
1432
+ bindEvents: function () {
1433
+
1434
+ var _this = this;
1435
+
1436
+ _this.elements.$bannerImgWrap.hover(function () {
1437
+ _this.elements.$bannerImg.addClass("active");
1438
+ }, function () {
1439
+ _this.elements.$bannerImg.removeClass("active");
1440
+ });
1441
+
1442
+ this.run();
1443
+ },
1444
+
1445
+ run: function () {
1446
+
1447
+ var $bannerElement = this.elements.$bannerElement;
1448
+
1449
+ if ($bannerElement.data("box-tilt")) {
1450
+ var reverse = $bannerElement.data("box-tilt-reverse");
1451
+ UniversalTilt.init({
1452
+ elements: $bannerElement,
1453
+ settings: {
1454
+ reverse: reverse
1455
+ },
1456
+ callbacks: {
1457
+ onMouseLeave: function (el) {
1458
+ el.style.boxShadow = "0 45px 100px rgba(255, 255, 255, 0)";
1459
+ },
1460
+ onDeviceMove: function (el) {
1461
+ el.style.boxShadow = "0 45px 100px rgba(255, 255, 255, 0.3)";
1462
+ }
1463
+ }
1464
+ });
1465
+
1466
+ }
1467
+ }
1468
+
1469
+ });
1470
+
1471
+ /****** Premium Modal Box Handler ******/
1472
+ var PremiumModalBoxHandler = function ($scope, $) {
1473
+
1474
+ var $modalElem = $scope.find(".premium-modal-box-container"),
1475
+ settings = $modalElem.data("settings"),
1476
+ $modal = $modalElem.find(".premium-modal-box-modal-dialog");
1477
+
1478
+ if (!settings) {
1479
+ return;
1480
+ }
1481
+
1482
+ if (settings.trigger === "pageload") {
1483
+ $(document).ready(function ($) {
1484
+ setTimeout(function () {
1485
+ $modalElem.find(".premium-modal-box-modal").modal();
1486
+ }, settings.delay * 1000);
1487
+ });
1488
+ }
1489
+
1490
+ if ($modal.data("modal-animation") && " " != $modal.data("modal-animation")) {
1491
+
1492
+ var animationDelay = $modal.data('delay-animation');
1493
+
1494
+ new Waypoint({
1495
+ element: $modal,
1496
+ handler: function () {
1497
+ setTimeout(function () {
1498
+ $modal.css("opacity", "1").addClass("animated " + $modal.data("modal-animation"));
1499
+ }, animationDelay * 1000);
1500
+ this.destroy();
1501
+ },
1502
+ offset: Waypoint.viewportHeight() - 150,
1503
+ });
1504
+ }
1505
+ };
1506
+
1507
+ /****** Premium Blog Handler ******/
1508
+ var PremiumBlogHandler = ModuleHandler.extend({
1509
+
1510
+ settings: {},
1511
+
1512
+ getDefaultSettings: function () {
1513
+ return {
1514
+ selectors: {
1515
+ user: '.fa-user',
1516
+ activeCat: '.category.active',
1517
+ loading: '.premium-loading-feed',
1518
+ blogElement: '.premium-blog-wrap',
1519
+ blogFilterTabs: '.premium-blog-filter',
1520
+ contentWrapper: '.premium-blog-content-wrapper',
1521
+ blogPost: '.premium-blog-post-outer-container',
1522
+ metaSeparators: '.premium-blog-meta-separator',
1523
+ filterLinks: '.premium-blog-filters-container li a',
1524
+ currentPage: '.premium-blog-pagination-container .page-numbers.current',
1525
+ activeElememnt: '.premium-blog-filters-container li .active',
1526
+ }
1527
+ }
1528
+ },
1529
+
1530
+ getDefaultElements: function () {
1531
+ var selectors = this.getSettings('selectors'),
1532
+ elements = {
1533
+ $blogElement: this.$element.find(selectors.blogElement),
1534
+ $blogFilterTabs: this.$element.find(selectors.blogFilterTabs),
1535
+ $activeCat: this.$element.find(selectors.activeCat),
1536
+ $filterLinks: this.$element.find(selectors.filterLinks),
1537
+ $blogPost: this.$element.find(selectors.blogPost),
1538
+ $contentWrapper: this.$element.find(selectors.contentWrapper)
1539
+ };
1540
+
1541
+ return elements;
1542
+ },
1543
+
1544
+ bindEvents: function () {
1545
+ this.setLayoutSettings();
1546
+ this.removeMetaSeparators();
1547
+ this.run();
1548
+ },
1549
+
1550
+ setLayoutSettings: function () {
1551
+
1552
+ var settings = this.getElementSettings(),
1553
+ $blogPost = this.elements.$blogPost;
1554
+
1555
+ var layoutSettings = {
1556
+ pageNumber: 1,
1557
+ isLoaded: true,
1558
+ count: 2,
1559
+ equalHeight: settings.force_height,
1560
+ layout: settings.premium_blog_layout,
1561
+ carousel: 'yes' === settings.premium_blog_carousel ? true : false,
1562
+ infinite: 'yes' === settings.premium_blog_infinite_scroll ? true : false,
1563
+ scrollAfter: 'yes' === settings.scroll_to_offset ? true : false,
1564
+ grid: 'yes' === settings.premium_blog_grid ? true : false,
1565
+ total: $blogPost.data('total'),
1566
+ };
1567
+
1568
+
1569
+ if (layoutSettings.carousel) {
1570
+
1571
+ layoutSettings.slidesToScroll = settings.slides_to_scroll;
1572
+ layoutSettings.spacing = parseInt(settings.premium_blog_carousel_spacing);
1573
+ layoutSettings.autoPlay = 'yes' === settings.premium_blog_carousel_play ? true : false;
1574
+ layoutSettings.arrows = 'yes' === settings.premium_blog_carousel_arrows ? true : false;
1575
+ layoutSettings.fade = 'yes' === settings.premium_blog_carousel_fade ? true : false;
1576
+ layoutSettings.center = 'yes' === settings.premium_blog_carousel_center ? true : false;
1577
+ layoutSettings.dots = 'yes' === settings.premium_blog_carousel_dots ? true : false;
1578
+ layoutSettings.speed = '' !== settings.premium_blog_carousel_autoplay_speed ? parseInt(settings.premium_blog_carousel_autoplay_speed) : 5000;
1579
+
1580
+ }
1581
+
1582
+ this.settings = layoutSettings;
1583
+
1584
+ },
1585
+
1586
+ removeMetaSeparators: function () {
1587
+
1588
+ var selectors = this.getSettings('selectors'),
1589
+ $blogPost = this.$element.find(selectors.blogPost);
1590
+
1591
+ var $metaSeparators = $blogPost.first().find(selectors.metaSeparators),
1592
+ $user = $blogPost.find(selectors.user);
1593
+
1594
+ if (1 === $metaSeparators.length) {
1595
+ //If two meta only are enabled. One of them is author meta.
1596
+ if (!$user.length) {
1597
+ $blogPost.find(selectors.metaSeparators).remove();
1598
+ }
1599
+
1600
+ } else {
1601
+ if (!$user.length) {
1602
+ $blogPost.each(function (index, post) {
1603
+ $(post).find(selectors.metaSeparators).first().remove();
1604
+ });
1605
+ }
1606
+ }
1607
+
1608
+ },
1609
+ run: function () {
1610
+
1611
+ var _this = this,
1612
+ $blogElement = this.elements.$blogElement,
1613
+ $activeCategory = this.elements.$activeCat.data('filter'),
1614
+ $filterTabs = this.elements.$blogFilterTabs.length,
1615
+ pagination = $blogElement.data("pagination");
1616
+
1617
+ this.settings.activeCategory = $activeCategory;
1618
+ this.settings.filterTabs = $filterTabs;
1619
+
1620
+
1621
+
1622
+ if (this.settings.filterTabs) {
1623
+ this.filterTabs();
1624
+ }
1625
+
1626
+ if (!this.settings.filterTabs || "*" === this.settings.activeCategory) {
1627
+ if ("masonry" === this.settings.layout && !this.settings.carousel) {
1628
+ $blogElement.imagesLoaded(function () {
1629
+ $blogElement.isotope(_this.getIsoTopeSettings());
1630
+ });
1631
+ }
1632
+ } else {
1633
+ //If `All` categories not exist, then we need to get posts through AJAX.
1634
+ this.getPostsByAjax(false);
1635
+ }
1636
+
1637
+ if (this.settings.carousel) {
1638
+ $blogElement.slick(this.getSlickSettings());
1639
+ }
1640
+
1641
+ if ("even" === this.settings.layout && this.settings.equalHeight) {
1642
+ $blogElement.imagesLoaded(function () {
1643
+ _this.forceEqualHeight();
1644
+ });
1645
+ }
1646
+
1647
+ if (pagination) {
1648
+ this.paginate();
1649
+ }
1650
+
1651
+ if (this.settings.infinite && $blogElement.is(":visible")) {
1652
+ this.getInfiniteScrollPosts();
1653
+ }
1654
+
1655
+ },
1656
+
1657
+ paginate: function () {
1658
+ var _this = this,
1659
+ $scope = this.$element,
1660
+ selectors = this.getSettings('selectors');
1661
+
1662
+ $scope.on('click', '.premium-blog-pagination-container .page-numbers', function (e) {
1663
+
1664
+ e.preventDefault();
1665
+
1666
+ if ($(this).hasClass("current")) return;
1667
+
1668
+ var currentPage = parseInt($scope.find(selectors.currentPage).html());
1669
+
1670
+ if ($(this).hasClass('next')) {
1671
+ _this.settings.pageNumber = currentPage + 1;
1672
+ } else if ($(this).hasClass('prev')) {
1673
+ _this.settings.pageNumber = currentPage - 1;
1674
+ } else {
1675
+ _this.settings.pageNumber = $(this).html();
1676
+ }
1677
+
1678
+ _this.getPostsByAjax(_this.settings.scrollAfter);
1679
+
1680
+ })
1681
+ },
1682
+
1683
+ forceEqualHeight: function () {
1684
+ var heights = new Array(),
1685
+ contentWrapper = this.getSettings('selectors').contentWrapper,
1686
+ $blogWrapper = this.$element.find(contentWrapper);
1687
+
1688
+ $blogWrapper.each(function (index, post) {
1689
+
1690
+ var height = $(post).outerHeight();
1691
+
1692
+ heights.push(height);
1693
+ });
1694
+
1695
+ var maxHeight = Math.max.apply(null, heights);
1696
+
1697
+ $blogWrapper.css("height", maxHeight + "px");
1698
+ },
1699
+
1700
+ getSlickSettings: function () {
1701
+
1702
+ var settings = this.settings,
1703
+ slickCols = settings.grid ? this.getSlickCols() : null,
1704
+ cols = settings.grid ? slickCols.cols : 1,
1705
+ colsTablet = settings.grid ? slickCols.colsTablet : 1,
1706
+ colsMobile = settings.grid ? slickCols.colsMobile : 1,
1707
+ prevArrow = settings.arrows ? '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Previous" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>' : '',
1708
+ nextArrow = settings.arrows ? '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>' : '';
1709
+
1710
+ return {
1711
+ infinite: true,
1712
+ slidesToShow: cols,
1713
+ slidesToScroll: settings.slidesToScroll || cols,
1714
+ responsive: [{
1715
+ breakpoint: 1025,
1716
+ settings: {
1717
+ slidesToShow: colsTablet,
1718
+ slidesToScroll: 1
1719
+ }
1720
+ },
1721
+ {
1722
+ breakpoint: 768,
1723
+ settings: {
1724
+ slidesToShow: colsMobile,
1725
+ slidesToScroll: 1
1726
+ }
1727
+ }
1728
+ ],
1729
+ autoplay: settings.autoPlay,
1730
+ rows: 0,
1731
+ autoplaySpeed: settings.speed,
1732
+ nextArrow: nextArrow,
1733
+ prevArrow: prevArrow,
1734
+ fade: settings.fade,
1735
+ centerMode: settings.center,
1736
+ centerPadding: settings.spacing + "px",
1737
+ draggable: true,
1738
+ dots: settings.dots,
1739
+ customPaging: function () {
1740
+ return '<i class="fas fa-circle"></i>';
1741
+ }
1742
+ }
1743
+
1744
+ },
1745
+
1746
+ getSlickCols: function () {
1747
+ var slickCols = this.getElementSettings(),
1748
+ cols = slickCols.premium_blog_columns_number,
1749
+ colsTablet = slickCols.premium_blog_columns_number_tablet,
1750
+ colsMobile = slickCols.premium_blog_columns_number_mobile;
1751
+
1752
+ return {
1753
+ cols: parseInt(100 / cols.substr(0, cols.indexOf('%'))),
1754
+ colsTablet: parseInt(100 / colsTablet.substr(0, colsTablet.indexOf('%'))),
1755
+ colsMobile: parseInt(100 / colsMobile.substr(0, colsMobile.indexOf('%'))),
1756
+ }
1757
+
1758
+ },
1759
+
1760
+ getIsoTopeSettings: function () {
1761
+ return {
1762
+ itemSelector: ".premium-blog-post-outer-container",
1763
+ percentPosition: true,
1764
+ filter: this.settings.activeCategory,
1765
+ animationOptions: {
1766
+ duration: 750,
1767
+ easing: "linear",
1768
+ queue: false
1769
+ }
1770
+ }
1771
+ },
1772
+
1773
+ filterTabs: function () {
1774
+
1775
+ var _this = this,
1776
+ selectors = this.getSettings('selectors'),
1777
+ $filterLinks = this.elements.$filterLinks;
1778
+
1779
+ $filterLinks.click(function (e) {
1780
+
1781
+ e.preventDefault();
1782
+
1783
+ _this.$element.find(selectors.activeElememnt).removeClass("active");
1784
+
1785
+ $(this).addClass("active");
1786
+
1787
+ //Get clicked tab slug
1788
+ _this.settings.activeCategory = $(this).attr("data-filter");
1789
+
1790
+ _this.settings.pageNumber = 1;
1791
+
1792
+ if (_this.settings.infinite) {
1793
+ _this.getPostsByAjax(false);
1794
+ _this.settings.count = 2;
1795
+ _this.getInfiniteScrollPosts();
1796
+ } else {
1797
+ //Make sure to reset pagination before sending our AJAX request
1798
+ _this.getPostsByAjax(_this.settings.scrollAfter);
1799
+ }
1800
+
1801
+ });
1802
+ },
1803
+
1804
+ getPostsByAjax: function (shouldScroll) {
1805
+
1806
+ //If filter tabs is not enabled, then always set category to all.
1807
+ if ('undefined' === typeof this.settings.activeCategory) {
1808
+ this.settings.activeCategory = '*';
1809
+ }
1810
+
1811
+ var _this = this,
1812
+ $blogElement = this.elements.$blogElement,
1813
+ selectors = this.getSettings('selectors');
1814
+
1815
+ $.ajax({
1816
+ url: PremiumSettings.ajaxurl,
1817
+ dataType: 'json',
1818
+ type: 'POST',
1819
+ data: {
1820
+ action: 'pa_get_posts',
1821
+ page_id: $blogElement.data('page'),
1822
+ widget_id: _this.$element.data('id'),
1823
+ page_number: _this.settings.pageNumber,
1824
+ category: _this.settings.activeCategory,
1825
+ nonce: PremiumSettings.nonce,
1826
+ },
1827
+ beforeSend: function () {
1828
+
1829
+ $blogElement.append('<div class="premium-loading-feed"><div class="premium-loader"></div></div>');
1830
+
1831
+ if (shouldScroll) {
1832
+ $('html, body').animate({
1833
+ scrollTop: (($blogElement.offset().top) - 50)
1834
+ }, 'slow');
1835
+ }
1836
+
1837
+ },
1838
+ success: function (res) {
1839
+ if (!res.data)
1840
+ return;
1841
+
1842
+ $blogElement.find(selectors.loading).remove();
1843
+
1844
+ var posts = res.data.posts,
1845
+ paging = res.data.paging;
1846
+
1847
+ if (_this.settings.infinite) {
1848
+ _this.settings.isLoaded = true;
1849
+ if (_this.settings.filterTabs && _this.settings.pageNumber === 1) {
1850
+ $blogElement.html(posts);
1851
+ } else {
1852
+ $blogElement.append(posts);
1853
+ }
1854
+ } else {
1855
+ //Render the new markup into the widget
1856
+ $blogElement.html(posts);
1857
+
1858
+ _this.$element.find(".premium-blog-footer").html(paging);
1859
+ }
1860
+
1861
+ _this.removeMetaSeparators();
1862
+
1863
+ //Make sure grid option is enabled.
1864
+ if (_this.settings.layout) {
1865
+ if ("even" === _this.settings.layout) {
1866
+ if (_this.settings.equalHeight)
1867
+ _this.forceEqualHeight();
1868
+
1869
+ } else {
1870
+
1871
+ $blogElement.imagesLoaded(function () {
1872
+
1873
+ $blogElement.isotope('reloadItems');
1874
+ $blogElement.isotope({
1875
+ itemSelector: ".premium-blog-post-outer-container",
1876
+ animate: false
1877
+ });
1878
+ });
1879
+ }
1880
+ }
1881
+
1882
+ },
1883
+ error: function (err) {
1884
+ console.log(err);
1885
+ }
1886
+
1887
+ });
1888
+ },
1889
+
1890
+ getInfiniteScrollPosts: function () {
1891
+ var windowHeight = jQuery(window).outerHeight() / 1.25,
1892
+ _this = this;
1893
+
1894
+ $(window).scroll(function () {
1895
+
1896
+ if (_this.settings.filterTabs) {
1897
+ $blogPost = _this.elements.$blogElement.find(".premium-blog-post-outer-container");
1898
+ _this.settings.total = $blogPost.data('total');
1899
+ }
1900
+
1901
+ if (_this.settings.count <= _this.settings.total) {
1902
+ if (($(window).scrollTop() + windowHeight) >= (_this.$element.find('.premium-blog-post-outer-container:last').offset().top)) {
1903
+ if (true == _this.settings.isLoaded) {
1904
+ _this.settings.pageNumber = _this.settings.count;
1905
+ _this.getPostsByAjax(false);
1906
+ _this.settings.count++;
1907
+ _this.settings.isLoaded = false;
1908
+ }
1909
+
1910
+ }
1911
+ }
1912
+ });
1913
+ },
1914
+
1915
+ });
1916
+
1917
+ /****** Premium Image Scroll Handler ******/
1918
+ var PremiumImageScrollHandler = function ($scope, $) {
1919
+ var scrollElement = $scope.find(".premium-image-scroll-container"),
1920
+ scrollOverlay = scrollElement.find(".premium-image-scroll-overlay"),
1921
+ scrollVertical = scrollElement.find(".premium-image-scroll-vertical"),
1922
+ dataElement = scrollElement.data("settings"),
1923
+ imageScroll = scrollElement.find("img"),
1924
+ direction = dataElement["direction"],
1925
+ reverse = dataElement["reverse"],
1926
+ transformOffset = null;
1927
+
1928
+ function startTransform() {
1929
+ imageScroll.css("transform", (direction === "vertical" ? "translateY" : "translateX") + "( -" +
1930
+ transformOffset + "px)");
1931
+ }
1932
+
1933
+ function endTransform() {
1934
+ imageScroll.css("transform", (direction === "vertical" ? "translateY" : "translateX") + "(0px)");
1935
+ }
1936
+
1937
+ function setTransform() {
1938
+ if (direction === "vertical") {
1939
+ transformOffset = imageScroll.height() - scrollElement.height();
1940
+ } else {
1941
+ transformOffset = imageScroll.width() - scrollElement.width();
1942
+ }
1943
+ }
1944
+ if (dataElement["trigger"] === "scroll") {
1945
+ scrollElement.addClass("premium-container-scroll");
1946
+ if (direction === "vertical") {
1947
+ scrollVertical.addClass("premium-image-scroll-ver");
1948
+ } else {
1949
+ scrollElement.imagesLoaded(function () {
1950
+ scrollOverlay.css({
1951
+ width: imageScroll.width(),
1952
+ height: imageScroll.height()
1953
+ });
1954
+ });
1955
+ }
1956
+ } else {
1957
+ if (reverse === "yes") {
1958
+ scrollElement.imagesLoaded(function () {
1959
+ scrollElement.addClass("premium-container-scroll-instant");
1960
+ setTransform();
1961
+ startTransform();
1962
+ });
1963
+ }
1964
+ if (direction === "vertical") {
1965
+ scrollVertical.removeClass("premium-image-scroll-ver");
1966
+ }
1967
+ scrollElement.mouseenter(function () {
1968
+ scrollElement.removeClass("premium-container-scroll-instant");
1969
+ setTransform();
1970
+ reverse === "yes" ? endTransform() : startTransform();
1971
+ });
1972
+ scrollElement.mouseleave(function () {
1973
+ reverse === "yes" ? startTransform() : endTransform();
1974
+ });
1975
+ }
1976
+ };
1977
+
1978
+
1979
+ /****** Premium Contact Form 7 Handler ******/
1980
+ var PremiumContactFormHandler = function ($scope, $) {
1981
+
1982
+ var $contactForm = $scope.find(".premium-cf7-container");
1983
+ var $input = $contactForm.find(
1984
+ 'input[type="text"], input[type="email"], textarea, input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="file"], input[type="url"]'
1985
+ );
1986
+
1987
+ $input.wrap("<span class='wpcf7-span'>");
1988
+
1989
+ $input.on("focus blur", function () {
1990
+ $(this).closest(".wpcf7-span").toggleClass("is-focused");
1991
+ });
1992
+ };
1993
+
1994
+ /****** Premium Team Members Handler ******/
1995
+ var PremiumTeamMembersHandler = ModuleHandler.extend({
1996
+
1997
+ getDefaultSettings: function () {
1998
+
1999
+ return {
2000
+ slick: {
2001
+ infinite: true,
2002
+ rows: 0,
2003
+ prevArrow: '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>',
2004
+ nextArrow: '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>',
2005
+ draggable: true,
2006
+ pauseOnHover: true,
2007
+ },
2008
+ selectors: {
2009
+ multiplePersons: '.multiple-persons',
2010
+ person: '.premium-person-container',
2011
+ imgContainer: '.premium-person-image-container',
2012
+ imgWrap: '.premium-person-image-wrap'
2013
+
2014
+ }
2015
+ }
2016
+ },
2017
+
2018
+ getDefaultElements: function () {
2019
+
2020
+ var selectors = this.getSettings('selectors');
2021
+
2022
+ return {
2023
+ $multiplePersons: this.$element.find(selectors.multiplePersons),
2024
+ $persons: this.$element.find(selectors.person),
2025
+ $imgWrap: this.$element.find(selectors.imgWrap),
2026
+ }
2027
+
2028
+ },
2029
+ bindEvents: function () {
2030
+ this.run();
2031
+ },
2032
+ getSlickSettings: function () {
2033
+
2034
+ var settings = this.getElementSettings(),
2035
+ rtl = this.elements.$multiplePersons.data("rtl"),
2036
+ colsNumber = settings.persons_per_row,
2037
+ colsTablet = settings.persons_per_row_tablet,
2038
+ colsMobile = settings.persons_per_row_mobile;
2039
+
2040
+ return Object.assign(this.getSettings('slick'), {
2041
+
2042
+ slidesToShow: parseInt(100 / colsNumber.substr(0, colsNumber.indexOf('%'))),
2043
+ slidesToScroll: parseInt(100 / colsNumber.substr(0, colsNumber.indexOf('%'))),
2044
+ responsive: [{
2045
+ breakpoint: 1025,
2046
+ settings: {
2047
+ slidesToShow: parseInt(100 / colsTablet.substr(0, colsTablet.indexOf('%'))),
2048
+ slidesToScroll: 1
2049
+ }
2050
+ },
2051
+ {
2052
+ breakpoint: 768,
2053
+ settings: {
2054
+ slidesToShow: parseInt(100 / colsMobile.substr(0, colsMobile.indexOf('%'))),
2055
+ slidesToScroll: 1
2056
+ }
2057
+ }
2058
+ ],
2059
+ autoplay: settings.carousel_play,
2060
+ rtl: rtl ? true : false,
2061
+ autoplaySpeed: settings.speed || 5000,
2062
+
2063
+ });
2064
+
2065
+
2066
+ },
2067
+
2068
+ runEqualHeight: function () {
2069
+
2070
+ var $persons = this.elements.$persons,
2071
+ $imgWrap = this.elements.$imgWrap;
2072
+
2073
+ var selectors = this.getSettings('selectors'),
2074
+ heights = new Array();
2075
+
2076
+ $persons.each(function (index, person) {
2077
+ $(person).imagesLoaded(function () { }).done(function () {
2078
+
2079
+ var imageHeight = $(person).find(selectors.imgContainer).outerHeight();
2080
+
2081
+ heights.push(imageHeight);
2082
+ });
2083
+ });
2084
+
2085
+ $persons.imagesLoaded(function () { }).done(function () {
2086
+ var maxHeight = Math.max.apply(null, heights);
2087
+ $imgWrap.css("height", maxHeight + "px");
2088
+ });
2089
+
2090
+ },
2091
+
2092
+ run: function () {
2093
+
2094
+ var $multiplePersons = this.elements.$multiplePersons;
2095
+
2096
+ if (!$multiplePersons.length) return;
2097
+
2098
+ var carousel = this.getElementSettings('carousel');
2099
+
2100
+ if (carousel)
2101
+ $multiplePersons.slick(this.getSlickSettings());
2102
+
2103
+ if ($multiplePersons.hasClass("premium-person-style1")) return;
2104
+
2105
+ if ("yes" !== $multiplePersons.data("persons-equal")) return;
2106
+
2107
+ this.runEqualHeight();
2108
+
2109
+ }
2110
+
2111
+ });
2112
+
2113
+ /****** Premium Title Handler ******/
2114
+ var PremiumTitleHandler = function ($scope, $) {
2115
+
2116
+ var $titleContainer = $scope.find(".premium-title-container"),
2117
+ $titleElement = $titleContainer.find('.premium-title-text');
2118
+
2119
+ if ($titleContainer.hasClass('style9')) {
2120
+ var $style9 = $scope.find(".premium-title-style9");
2121
+
2122
+ $style9.each(function () {
2123
+ var elm = $(this);
2124
+ var holdTime = elm.attr('data-blur-delay') * 1000;
2125
+ elm.attr('data-animation-blur', 'process')
2126
+ elm.find('.premium-title-style9-letter').each(function (index, letter) {
2127
+ index += 1;
2128
+ var animateDelay;
2129
+ if ($('body').hasClass('rtl')) {
2130
+ animateDelay = 0.2 / index + 's';
2131
+ } else {
2132
+ animateDelay = index / 20 + 's';
2133
+ }
2134
+ $(letter).css({
2135
+ '-webkit-animation-delay': animateDelay,
2136
+ 'animation-delay': animateDelay
2137
+ });
2138
+ })
2139
+ setInterval(function () {
2140
+ elm.attr('data-animation-blur', 'done')
2141
+ setTimeout(function () {
2142
+ elm.attr('data-animation-blur', 'process')
2143
+ }, 150);
2144
+ }, holdTime);
2145
+ });
2146
+ }
2147
+
2148
+
2149
+ if ($titleContainer.hasClass('style8')) {
2150
+
2151
+ var holdTime = $titleElement.attr('data-shiny-delay') * 1000,
2152
+ duration = $titleElement.attr('data-shiny-dur') * 1000;
2153
+
2154
+ function shinyEffect() {
2155
+ $titleElement.get(0).setAttribute('data-animation', 'shiny');
2156
+ setTimeout(function () {
2157
+ $titleElement.removeAttr('data-animation')
2158
+ }, duration);
2159
+ }
2160
+
2161
+ (function repeat() {
2162
+ shinyEffect();
2163
+ setTimeout(repeat, holdTime);
2164
+ })();
2165
+ }
2166
+
2167
+ };
2168
+
2169
+ /****** Premium Bullet List Handler ******/
2170
+ var PremiumBulletListHandler = function ($scope, $) {
2171
+
2172
+ var $listItems = $scope.find(".premium-bullet-list-box"),
2173
+ items = $listItems.find(".premium-bullet-list-content");
2174
+
2175
+ items.each(function (index, item) {
2176
+
2177
+ if ($listItems.data("list-animation") && " " != $listItems.data("list-animation")) {
2178
+ elementorFrontend.waypoint($(item), function () {
2179
+
2180
+ var element = $(item),
2181
+ delay = element.data('delay');
2182
+
2183
+ setTimeout(function () {
2184
+ element.next('.premium-bullet-list-divider , .premium-bullet-list-divider-inline').css("opacity", "1");
2185
+ element.next('.premium-bullet-list-divider-inline , .premium-bullet-list-divider').addClass("animated " + $listItems.data("list-animation"));
2186
+
2187
+ element.css("opacity", "1").addClass("animated " + $listItems.data("list-animation"));
2188
+ }, delay);
2189
+
2190
+ });
2191
+ }
2192
+
2193
+ });
2194
+ };
2195
+
2196
+ /****** Premium Grow Effect Handler ******/
2197
+ var PremiumButtonHandler = function ($scope, $) {
2198
+
2199
+ var $btnGrow = $scope.find('.premium-button-style6-bg');
2200
+
2201
+ if ($btnGrow.length !== 0 && $scope.hasClass('premium-mouse-detect-yes')) {
2202
+ $scope.on('mouseenter mouseleave', '.premium-button-style6', function (e) {
2203
+
2204
+ var parentOffset = $(this).offset(),
2205
+ left = e.pageX - parentOffset.left,
2206
+ top = e.pageY - parentOffset.top;
2207
+
2208
+ $btnGrow.css({
2209
+ top: top,
2210
+ left: left,
2211
+ });
2212
+
2213
+ });
2214
+ }
2215
+
2216
+ };
2217
+
2218
+ var PremiumMaskHandler = function ($scope, $) {
2219
+ var mask = $scope.hasClass('premium-mask-yes');
2220
+
2221
+ if (!mask) return;
2222
+
2223
+ if ('premium-addon-title.default' === $scope.data('widget_type')) {
2224
+ var target = '.premium-title-header';
2225
+ $scope.find(target).find('.premium-title-icon, .premium-title-img').addClass('premium-mask-span');
2226
+ } else {
2227
+ var target = '.premium-dual-header-first-header';
2228
+ }
2229
+
2230
+ $scope.find(target).find('span:not(.premium-title-style7-stripe-wrap):not(.premium-title-img)').each(function (index, span) {
2231
+ var html = '';
2232
+
2233
+ $(this).text().split(' ').forEach(function (item) {
2234
+ if ('' !== item) {
2235
+ html += ' <span class="premium-mask-span">' + item + '</span>';
2236
+ }
2237
+ });
2238
+
2239
+ $(this).text('').append(html);
2240
+ });
2241
+
2242
+ elementorFrontend.waypoint($scope, function () {
2243
+ $($scope).addClass('premium-mask-active');
2244
+ });
2245
+ };
2246
+
2247
+
2248
+ var functionalHandlers = {
2249
+ 'premium-addon-dual-header.default': PremiumMaskHandler,
2250
+ 'premium-addon-video-box.default': PremiumVideoBoxWidgetHandler,
2251
+ 'premium-addon-fancy-text.default': PremiumFancyTextHandler,
2252
+ 'premium-counter.default': PremiumCounterHandler,
2253
+ 'premium-addon-title.default': [PremiumTitleHandler, PremiumMaskHandler],
2254
+ 'premium-countdown-timer.default': PremiumCountDownHandler,
2255
+ 'premium-carousel-widget.default': PremiumCarouselHandler,
2256
+ 'premium-addon-modal-box.default': PremiumModalBoxHandler,
2257
+ 'premium-image-scroll.default': PremiumImageScrollHandler,
2258
+ 'premium-contact-form.default': PremiumContactFormHandler,
2259
+ 'premium-icon-list.default': PremiumBulletListHandler,
2260
+ 'premium-addon-button.default': PremiumButtonHandler,
2261
+ 'premium-addon-image-button.default': PremiumButtonHandler
2262
+ };
2263
+
2264
+ var classHandlers = {
2265
+ 'premium-addon-person': PremiumTeamMembersHandler,
2266
+ 'premium-addon-blog': PremiumBlogHandler,
2267
+ 'premium-img-gallery': PremiumGridWidgetHandler,
2268
+ 'premium-addon-banner': PremiumBannerHandler,
2269
+ };
2270
+
2271
+ $.each(functionalHandlers, function (elemName, func) {
2272
+ if ('object' === typeof func) {
2273
+ $.each(func, function (index, handler) {
2274
+ elementorFrontend.hooks.addAction('frontend/element_ready/' + elemName, handler);
2275
+ })
2276
+ } else {
2277
+ elementorFrontend.hooks.addAction('frontend/element_ready/' + elemName, func);
2278
+ }
2279
+
2280
+ });
2281
+
2282
+ $.each(classHandlers, function (elemName, clas) {
2283
+ elementorFrontend.elementsHandler.attachHandler(elemName, clas);
2284
+ });
2285
+
2286
+
2287
+ if (elementorFrontend.isEditMode()) {
2288
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default", PremiumProgressBarWidgetHandler);
2289
+ } else {
2290
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default", PremiumProgressBarScrollWidgetHandler);
2291
+ }
2292
+ });
2293
  })(jQuery);
assets/frontend/min-js/premium-addons.min.js CHANGED
@@ -1 +1 @@
1
- !function(m){m(window).on("elementor/frontend/init",function(){function n(e,t){var i=e.find(".premium-progressbar-container"),n=i.data("settings"),a=n.progress_length,s=n.speed,o=n.type;if("line"===o){var r=i.find(".premium-progressbar-bar");n.gradient&&r.css("background","linear-gradient(-45deg, "+n.gradient+")"),r.animate({width:a+"%"},s)}else if("circle"===o)100<a&&(a=100),i.prop({counter:0}).animate({counter:a},{duration:s,easing:"linear",step:function(e){var t=3.6*e;i.find(".premium-progressbar-right-label span").text(Math.ceil(e)+"%"),i.find(".premium-progressbar-circle-left").css("transform","rotate("+t+"deg)"),180<t&&(i.find(".premium-progressbar-circle").css({"-webkit-clip-path":"inset(0)","clip-path":"inset(0)"}),i.find(".premium-progressbar-circle-right").css("visibility","visible"))}});else{r=i.find(".premium-progressbar-bar-wrap");var l=i.outerWidth(),m=n.dot||25,d=n.spacing||10,u=Math.ceil(l/(m+d)),c=u*(a/100),p=Math.floor(c),f=100*(c-p);r.attr("data-circles",u),r.attr("data-total-fill",p),r.attr("data-partial-fill",f);for(var g="progress-segment",h=0;h<u;h++){g="progress-segment";var v="";h<p?v="<div class='segment-inner'></div>":h===p&&(v="<div class='segment-inner'></div>"),r.append("<div class='"+g+"'>"+v+"</div>")}"frontend"!==t&&y(e)}}function e(e,a){var s=e.find(".premium-button-style6-bg");0!==s.length&&e.hasClass("premium-mouse-detect-yes")&&e.on("mouseenter mouseleave",".premium-button-style6",function(e){var t=a(this).offset(),i=e.pageX-t.left,n=e.pageY-t.top;s.css({top:n,left:i})})}function t(e,n){if(e.hasClass("premium-mask-yes")){if("premium-addon-title.default"===e.data("widget_type")){var t=".premium-title-header";e.find(t).find(".premium-title-icon, .premium-title-img").addClass("premium-mask-span")}else t=".premium-dual-header-first-header";e.find(t).find("span:not(.premium-title-style7-stripe-wrap):not(.premium-title-img)").each(function(e,t){var i="";n(this).text().split(" ").forEach(function(e){""!==e&&(i+=' <span class="premium-mask-span">'+e+"</span>")}),n(this).text("").append(i)}),elementorFrontend.waypoint(e,function(){n(e).addClass("premium-mask-active")})}}var i=elementorModules.frontend.handlers.Base,y=function(e){var t=e.find(".premium-progressbar-container").data("settings"),a=e.find(".premium-progressbar-bar-wrap"),i=a.data(),s=t.speed,o=0,r=i.totalFill,l=i.circles,m=i.partialFill;!function e(t){var i=a.find(".progress-segment").eq(t),n=100;t===r&&(n=m);i.find(".segment-inner").animate({width:n+"%"},s/l,function(){++o<=r&&e(o)})}(o)},a=i.extend({settings:{},getDefaultSettings:function(){return{selectors:{galleryElement:".premium-gallery-container",filters:".premium-gallery-cats-container li",gradientLayer:".premium-gallery-gradient-layer",loadMore:".premium-gallery-load-more",loadMoreDiv:".premium-gallery-load-more div",vidWrap:".premium-gallery-video-wrap"}}},getDefaultElements:function(){var e=this.getSettings("selectors"),t={$galleryElement:this.$element.find(e.galleryElement),$filters:this.$element.find(e.filters),$gradientLayer:this.$element.find(e.gradientLayer),$vidWrap:this.$element.find(e.vidWrap)};return t.$loadMore=t.$galleryElement.parent().find(e.loadMore),t.$loadMoreDiv=t.$galleryElement.parent().find(e.loadMoreDiv),t},bindEvents:function(){this.getGlobalSettings(),this.run()},getGlobalSettings:function(){var e=this.elements.$galleryElement.data("settings");this.settings={layout:e.img_size,loadMore:e.load_more,columnWidth:null,filter:null,isFilterClicked:!1,minimum:e.minimum,imageToShow:e.click_images,counter:e.minimum,ltrMode:e.ltr_mode,shuffle:e.shuffle,active_cat:e.active_cat,theme:e.theme,overlay:e.overlay,sort_by:e.sort_by,light_box:e.light_box,flag:e.flag,lightbox_type:e.lightbox_type}},updateCounter:function(){this.settings.isFilterClicked?(this.settings.counter=this.settings.minimum,this.settings.isFilterClicked=!1):this.settings.counter=this.settings.counter,this.settings.counter=this.settings.counter+this.settings.imageToShow},updateGrid:function(e,t,i){m.ajax({url:this.appendItems(this.settings.counter,e,t),beforeSend:function(){i.removeClass("premium-gallery-item-hidden")},success:function(){i.addClass("premium-gallery-item-hidden")}})},loadMore:function(e,t){var i=this.elements.$galleryElement,n=this.elements.$loadMoreDiv,a=this.elements.$loadMore,s=this;n.addClass("premium-gallery-item-hidden"),i.find(".premium-gallery-item").length>this.settings.minimum&&(a.removeClass("premium-gallery-item-hidden"),i.parent().on("click",".premium-gallery-load-less",function(){s.settings.counter=s.settings.counter-s.settings.imageToShow}),i.parent().on("click",".premium-gallery-load-more-btn:not(.premium-gallery-load-less)",function(){s.updateCounter(),s.updateGrid(e,t,n)}))},getItemsToHide:function(e,t){return e.filteredItems.slice(t,e.filteredItems.length).map(function(e){return e.element})},appendItems:function(e,t,i){var n=this.elements.$galleryElement,a=this.elements.$gradientLayer,s=n.data("isotope"),o=this.getItemsToHide(s,e);a.outerHeight(t),n.find(".premium-gallery-item-hidden").removeClass("premium-gallery-item-hidden"),n.parent().find(".premium-gallery-load-more").removeClass("premium-gallery-item-hidden"),m(o).addClass("premium-gallery-item-hidden"),i.isotope("layout"),0==o&&(a.addClass("premium-gallery-item-hidden"),n.parent().find(".premium-gallery-load-more").addClass("premium-gallery-item-hidden"))},triggerFilerTabs:function(e){var t=e.searchParams.get(this.settings.flag),i=this.elements.$filters;t&&i.eq(t).find("a").trigger("click")},onReady:function(e){e.isotope("layout"),e.isotope({filter:this.settings.active_cat});var t=new URL(window.location.href);t&&this.triggerFilerTabs(t)},onResize:function(e){this.setMetroLayout(),e.isotope({itemSelector:".premium-gallery-item",masonry:{columnWidth:this.settings.columnWidth}})},lightBoxDisabled:function(){var n=this;this.elements.$vidWrap.each(function(e,t){var i=m(t).data("type");m(t).closest(".premium-gallery-item").on("click",function(){var e=m(this);e.find(".pa-gallery-img-container").css("background","#000"),e.find("img, .pa-gallery-icons-caption-container, .pa-gallery-icons-wrapper").css("visibility","hidden"),"style3"!==n.settings.skin&&e.find(".premium-gallery-caption").css("visibility","hidden"),"hosted"!==i?n.playVid(e):n.playHostedVid(t)})})},playVid:function(e){var t=e.find(".premium-gallery-iframe-wrap"),i=t.data("src");i=i.replace("&mute","&autoplay=1&mute");var n=m("<iframe/>");n.attr({src:i,frameborder:"0",allowfullscreen:"1",allow:"autoplay;encrypted-media;"}),t.html(n),n.css("visibility","visible")},playHostedVid:function(e){var t=m(e).find("video");t.get(0).play(),t.css("visibility","visible")},run:function(){var e=this.elements.$galleryElement,t=(this.elements.$vidWrap,this.elements.$filters),i=this;"metro"===this.settings.layout&&(this.setMetroLayout(),this.settings.layout="masonry",m(window).resize(function(){i.onResize(n)}));var n=e.isotope(this.getIsoTopeSettings());if(n.imagesLoaded().progress(function(){n.isotope("layout")}),m(document).ready(function(){i.onReady(n)}),this.settings.loadMore){var a=this.elements.$gradientLayer,s=null;setTimeout(function(){s=a.outerHeight()},200),this.loadMore(s,n)}"yes"!==this.settings.light_box&&this.lightBoxDisabled(),t.find("a").click(function(e){return e.preventDefault(),i.isFilterClicked=!0,t.find(".active").removeClass("active"),m(this).addClass("active"),i.settings.filter=m(this).attr("data-filter"),n.isotope({filter:i.settings.filter}),i.settings.shuffle&&n.isotope("shuffle"),i.settings.loadMore&&i.appendItems(i.settings.minimum,s,n),!1}),"default"===this.settings.lightbox_type&&this.$element.find(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto(this.getPrettyPhotoSettings())},getPrettyPhotoSettings:function(){return{theme:this.settings.theme,hook:"data-rel",opacity:.7,show_title:!1,deeplinking:!1,overlay_gallery:this.settings.overlay,custom_markup:"",default_width:900,default_height:506,social_tools:""}},getIsoTopeSettings:function(){return{itemSelector:".premium-gallery-item",percentPosition:!0,animationOptions:{duration:750,easing:"linear"},filter:this.settings.active_cat,layoutMode:this.settings.layout,originLeft:this.settings.ltrMode,masonry:{columnWidth:this.settings.columnWidth},sortBy:this.settings.sort_by}},getRepeaterSettings:function(){return this.getElementSettings("premium_gallery_img_content")},setMetroLayout:function(){var e=this.elements.$galleryElement,t=e.width(),a=Math.floor(t/12),i=elementorFrontend.getCurrentDeviceMode(),s="desktop"===i?"":"_"+i,o=this.getRepeaterSettings();e.find(".premium-gallery-item").each(function(e,t){var i=o[e]["premium_gallery_image_cell"+s].size,n=o[e]["premium_gallery_image_vcell"+s].size;""!==i&&null!=i||(i=o[e].premium_gallery_image_cell),""!==n&&null!=n||(n=o[e].premium_gallery_image_vcell),m(t).css({width:Math.ceil(i*a),height:Math.ceil(n*a)})}),this.settings.columnWidth=a}}),s=i.extend({getDefaultSettings:function(){return{selectors:{bannerElement:".premium-banner",bannerImgWrap:".premium-banner-ib",bannerImg:"img"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$bannerElement:this.$element.find(e.bannerElement),$bannerImgWrap:this.$element.find(e.bannerImgWrap),$bannerImg:this.$element.find(e.bannerImg)}},bindEvents:function(){var e=this;e.elements.$bannerImgWrap.hover(function(){e.elements.$bannerImg.addClass("active")},function(){e.elements.$bannerImg.removeClass("active")}),this.run()},run:function(){var e=this.elements.$bannerElement;if(e.data("box-tilt")){var t=e.data("box-tilt-reverse");UniversalTilt.init({elements:e,settings:{reverse:t},callbacks:{onMouseLeave:function(e){e.style.boxShadow="0 45px 100px rgba(255, 255, 255, 0)"},onDeviceMove:function(e){e.style.boxShadow="0 45px 100px rgba(255, 255, 255, 0.3)"}}})}}}),o=i.extend({settings:{},getDefaultSettings:function(){return{selectors:{user:".fa-user",activeCat:".category.active",loading:".premium-loading-feed",blogElement:".premium-blog-wrap",blogFilterTabs:".premium-blog-filter",contentWrapper:".premium-blog-content-wrapper",blogPost:".premium-blog-post-outer-container",metaSeparators:".premium-blog-meta-separator",filterLinks:".premium-blog-filters-container li a",currentPage:".premium-blog-pagination-container .page-numbers.current",activeElememnt:".premium-blog-filters-container li .active"}}},getDefaultElements:function(){var e=this.getSettings("selectors"),t={$blogElement:this.$element.find(e.blogElement),$blogFilterTabs:this.$element.find(e.blogFilterTabs),$activeCat:this.$element.find(e.activeCat),$filterLinks:this.$element.find(e.filterLinks),$blogPost:this.$element.find(e.blogPost),$contentWrapper:this.$element.find(e.contentWrapper)};return t.$metaSeparators=t.$blogPost.first().find(e.metaSeparators),t.$user=t.$blogPost.find(e.user),t},bindEvents:function(){this.setLayoutSettings(),this.run()},setLayoutSettings:function(){var e=this.getElementSettings(),t=this.elements.$blogPost,i={pageNumber:1,isLoaded:!0,count:2,equalHeight:e.force_height,layout:e.premium_blog_layout,carousel:"yes"===e.premium_blog_carousel,infinite:"yes"===e.premium_blog_infinite_scroll,scrollAfter:"yes"===e.scroll_to_offset,grid:"yes"===e.premium_blog_grid,total:t.data("total")};i.carousel&&(i.slidesToScroll=e.slides_to_scroll,i.spacing=parseInt(e.premium_blog_carousel_spacing),i.autoPlay="yes"===e.premium_blog_carousel_play,i.arrows="yes"===e.premium_blog_carousel_arrows,i.fade="yes"===e.premium_blog_carousel_fade,i.center="yes"===e.premium_blog_carousel_center,i.dots="yes"===e.premium_blog_carousel_dots,i.speed=""!==e.premium_blog_carousel_autoplay_speed?parseInt(e.premium_blog_carousel_autoplay_speed):5e3),this.settings=i},run:function(){var e=this,i=this.getSettings("selectors"),t=this.elements.$blogElement,n=this.elements.$user,a=this.elements.$blogPost,s=this.elements.$metaSeparators,o=this.elements.$activeCat.data("filter"),r=this.elements.$blogFilterTabs.length,l=t.data("pagination");this.settings.activeCategory=o,this.settings.filterTabs=r,1===s.length?n.length||a.find(i.metaSeparators).remove():n.length||a.each(function(e,t){m(t).find(i.metaSeparators).first().remove()}),this.settings.filterTabs&&this.filterTabs(),this.settings.filterTabs&&"*"!==this.settings.activeCategory?this.getPostsByAjax(!1):"masonry"!==this.settings.layout||this.settings.carousel||t.imagesLoaded(function(){t.isotope(e.getIsoTopeSettings())}),this.settings.carousel&&t.slick(this.getSlickSettings()),"even"===this.settings.layout&&this.settings.equalHeight&&t.imagesLoaded(function(){e.forceEqualHeight()}),l&&this.paginate(),this.settings.infinite&&t.is(":visible")&&this.getInfiniteScrollPosts()},paginate:function(){var i=this,n=this.$element,a=this.getSettings("selectors");n.on("click",".premium-blog-pagination-container .page-numbers",function(e){if(e.preventDefault(),!m(this).hasClass("current")){var t=parseInt(n.find(a.currentPage).html());m(this).hasClass("next")?i.settings.pageNumber=t+1:m(this).hasClass("prev")?i.settings.pageNumber=t-1:i.settings.pageNumber=m(this).html(),i.getPostsByAjax(i.settings.scrollAfter)}})},forceEqualHeight:function(){var n=new Array,e=this.getSettings("selectors").contentWrapper,t=this.$element.find(e);t.each(function(e,t){var i=m(t).outerHeight();n.push(i)});var i=Math.max.apply(null,n);t.css("height",i+"px")},getSlickSettings:function(){var e=this.settings,t=e.grid?this.getSlickCols():null,i=e.grid?t.cols:1,n=e.grid?t.colsTablet:1,a=e.grid?t.colsMobile:1,s=e.arrows?'<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Previous" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>':"",o=e.arrows?'<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>':"";return{infinite:!0,slidesToShow:i,slidesToScroll:e.slidesToScroll||i,responsive:[{breakpoint:1025,settings:{slidesToShow:n,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:a,slidesToScroll:1}}],autoplay:e.autoPlay,rows:0,autoplaySpeed:e.speed,nextArrow:o,prevArrow:s,fade:e.fade,centerMode:e.center,centerPadding:e.spacing+"px",draggable:!0,dots:e.dots,customPaging:function(){return'<i class="fas fa-circle"></i>'}}},getSlickCols:function(){var e=this.getElementSettings(),t=e.premium_blog_columns_number,i=e.premium_blog_columns_number_tablet,n=e.premium_blog_columns_number_mobile;return{cols:parseInt(100/t.substr(0,t.indexOf("%"))),colsTablet:parseInt(100/i.substr(0,i.indexOf("%"))),colsMobile:parseInt(100/n.substr(0,n.indexOf("%")))}},getIsoTopeSettings:function(){return{itemSelector:".premium-blog-post-outer-container",percentPosition:!0,filter:this.settings.activeCategory,animationOptions:{duration:750,easing:"linear",queue:!1}}},filterTabs:function(){var t=this,i=this.getSettings("selectors");this.elements.$filterLinks.click(function(e){e.preventDefault(),t.$element.find(i.activeElememnt).removeClass("active"),m(this).addClass("active"),t.settings.activeCategory=m(this).attr("data-filter"),t.settings.pageNumber=1,t.settings.infinite?(t.getPostsByAjax(!1),t.settings.count=2,t.getInfiniteScrollPosts()):t.getPostsByAjax(t.settings.scrollAfter)})},getPostsByAjax:function(e){void 0===this.settings.activeCategory&&(this.settings.activeCategory="*");var n=this,a=this.elements.$blogElement,s=this.getSettings("selectors");m.ajax({url:PremiumSettings.ajaxurl,dataType:"json",type:"POST",data:{action:"pa_get_posts",page_id:a.data("page"),widget_id:n.$element.data("id"),page_number:n.settings.pageNumber,category:n.settings.activeCategory,nonce:PremiumSettings.nonce},beforeSend:function(){a.append('<div class="premium-loading-feed"><div class="premium-loader"></div></div>'),e&&m("html, body").animate({scrollTop:a.offset().top-50},"slow")},success:function(e){if(e.data){a.find(s.loading).remove();var t=e.data.posts,i=e.data.paging;n.settings.infinite?(n.settings.isLoaded=!0,n.settings.filterTabs&&1===n.settings.pageNumber?a.html(t):a.append(t)):(a.html(t),n.$element.find(".premium-blog-footer").html(i)),n.settings.layout&&("even"===n.settings.layout?n.settings.equalHeight&&n.forceEqualHeight():a.imagesLoaded(function(){a.isotope("reloadItems"),a.isotope({itemSelector:".premium-blog-post-outer-container",animate:!1})}))}},error:function(e){console.log(e)}})},getInfiniteScrollPosts:function(){var e=jQuery(window).outerHeight()/1.25,t=this;m(window).scroll(function(){t.settings.filterTabs&&($blogPost=t.elements.$blogElement.find(".premium-blog-post-outer-container"),t.settings.total=$blogPost.data("total")),t.settings.count<=t.settings.total&&m(window).scrollTop()+e>=t.$element.find(".premium-blog-post-outer-container:last").offset().top&&1==t.settings.isLoaded&&(t.settings.pageNumber=t.settings.count,t.getPostsByAjax(!1),t.settings.count++,t.settings.isLoaded=!1)})}}),r={"premium-addon-dual-header.default":t,"premium-addon-video-box.default":function(l,m){var t,i,d=l.find(".premium-video-box-container"),e=l.find(".premium-video-box-playlist-container"),n=d.find(".premium-video-box-video-container"),u=d.find(".premium-video-box-inner-wrap"),c=u.find(".premium-video-box-image-container"),a=d.data("type"),s=d.data("thumbnail"),o=d.data("sticky"),r=d.data("sticky-play"),p=d.data("hover");if(e.length){if(!n.length)return;n.each(function(e,t){var i,n=m(t),a=n.closest(".premium-video-box-container"),s=n.closest(".premium-video-box-trigger");i=n.data("src"),i+="&autoplay=1",s.on("click",function(){var e=m("<iframe/>");e.attr({src:i,frameborder:"0",allowfullscreen:"1",allow:"autoplay;encrypted-media;"}),n.css("background","#000"),n.html(e),a.find(".premium-video-box-image-container, .premium-video-box-play-icon-container").remove()})})}else"self"===a?(t=n.find("video"),i=t.attr("src")):(i=n.data("src"),s&&-1===i.indexOf("autoplay=1")?i+="&autoplay=1":d.data("play-viewport")?elementorFrontend.waypoint(d,function(){f()}):f()),d.on("click",function(){f()}),"yes"===o&&"yes"!==r&&g();function f(){if(!d.hasClass("playing")){if(d.addClass("playing"),"yes"===r&&g(),"self"===a)m(t).get(0).play(),n.css({opacity:"1",visibility:"visible"});else{var e=m("<iframe/>");e.attr({src:i,frameborder:"0",allowfullscreen:"1",allow:"autoplay;encrypted-media;"}),n.css("background","#000"),n.html(e)}d.find(".premium-video-box-image-container, .premium-video-box-play-icon-container, .premium-video-box-description-container").remove(),"vimeo"===a&&d.find(".premium-video-box-vimeo-wrap").remove()}}function g(){var i=d.data("hide-desktop"),n=d.data("hide-tablet"),a=d.data("hide-mobile"),s=d.data("sticky-margin");if(d.off("click").on("click",function(e){var t=e.target.className;if(0<=t.toString().indexOf("premium-video-box-sticky-close")||0<=t.toString().indexOf("premium-video-box-sticky-close"))return!1;f()}),void 0!==elementorFrontend.waypoint)var t=elementorFrontend.waypoint(d,function(e){if("down"===e){if(d.removeClass("premium-video-box-sticky-hide").addClass("premium-video-box-sticky-apply premium-video-box-filter-sticky"),l.hasClass("elementor-motion-effects-parent")&&l.removeClass("elementor-motion-effects-perspective").find(".elementor-widget-container").addClass("premium-video-box-transform"),d.data("mask")&&(l.find(".premium-video-box-mask-filter").removeClass("premium-video-box-mask-filter"),d.find(":first-child").removeClass("premium-video-box-mask-media"),c.removeClass(p).removeClass("premium-video-box-mask-media").css({transition:"width 0.2s, height 0.2s","-webkit-transition":"width 0.2s, height 0.2s"})),m(document).trigger("premium_after_sticky_applied",[l]),u.data("video-animation")&&" "!=u.data("video-animation")){u.css("opacity","0");var t=u.data("delay-animation");setTimeout(function(){u.css("opacity","1").addClass("animated "+u.data("video-animation"))},1e3*t)}}else d.removeClass("premium-video-box-sticky-apply premium-video-box-filter-sticky").addClass("premium-video-box-sticky-hide"),l.hasClass("elementor-motion-effects-parent")&&l.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform"),d.data("mask")&&(d.parent().addClass("premium-video-box-mask-filter"),d.find(":first-child").eq(0).addClass("premium-video-box-mask-media"),c.addClass("premium-video-box-mask-media")),c.addClass(p).css({transition:"all 0.2s","-webkit-transition":"all 0.2s"}),u.removeClass("animated "+u.data("video-animation"))},{offset:"0%",triggerOnce:!1});function o(e){var t=elementorFrontend.getCurrentDeviceMode();""!==i&&t==i||""!==n&&t==n||""!==a&&t==a?r(e):e[0].enable()}function r(e){e[0].disable(),d.removeClass("premium-video-box-sticky-apply premium-video-box-sticky-hide")}function e(){d.hasClass("premium-video-box-sticky-apply")&&u.draggable({start:function(){m(this).css({transform:"none",top:m(this).offset().top+"px",left:m(this).offset().left+"px"})},containment:"window"})}l.find(".premium-video-box-sticky-close").off("click.closetrigger").on("click.closetrigger",function(e){t[0].disable(),d.removeClass("premium-video-box-sticky-apply premium-video-box-sticky-hide"),l.hasClass("elementor-motion-effects-parent")&&l.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform"),d.data("mask")&&(d.parent().addClass("premium-video-box-mask-filter"),d.find(":first-child").eq(0).addClass("premium-video-box-mask-media"),c.addClass("premium-video-box-mask-media"))}),o(t),e(),window.addEventListener("scroll",e),m(window).resize(function(e){o(t)}),m(document).on("premium_after_sticky_applied",function(e,t){var i=t.find(".premium-video-box-sticky-infobar");if(0!==i.length){var n=i.outerHeight();if((t.hasClass("premium-video-sticky-center-left")||t.hasClass("premium-video-sticky-center-right"))&&(n=Math.ceil(n/2),u.css("top","calc( 50% - "+n+"px )")),(t.hasClass("premium-video-sticky-bottom-left")||t.hasClass("premium-video-sticky-bottom-right"))&&""!==s){var a=(n=Math.ceil(n))+s;u.css("bottom",a)}}})}},"premium-addon-fancy-text.default":function(e,t){var r=e.find(".premium-fancy-text-wrapper"),l=r.data("settings"),i=l.delay||2500,n=r.find(".premium-fancy-list-items").length,a=""!==l.count||["typing","slide","autofade"].includes(l.effect)?l.count*n:"infinite";if("typing"===l.effect){var s=[];l.strings.forEach(function(e){s.push(e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"))}),r.find(".premium-fancy-text").typed({strings:s,typeSpeed:l.typeSpeed,backSpeed:l.backSpeed,startDelay:l.startDelay,backDelay:l.backDelay,showCursor:l.showCursor,cursorChar:l.cursorChar,loop:l.loop})}else if("slide"===l.effect)i=l.pause,r.find(".premium-fancy-text").vTicker({speed:l.speed,showItems:l.showItems,pause:l.pause,mousePause:l.mousePause,direction:"up"});else if("auto-fade"===l.effect){var o=r.find(".premium-fancy-list-items"),m=o.length;if(0===m)return;var d=l.duration/m,u=0;i=d,o.each(function(e,t){t.style.animationDelay=u+"ms",u+=d})}else{!function(){var t=r.find(".premium-fancy-list-items"),i=1,e=l.delay||2500,n=l.count;if(n)var a=1,s=r.find(".premium-fancy-list-items").length;var o=setInterval(function(){var e="";"custom"===l.effect&&(e="animated "+l.animation),t.eq(i).addClass("premium-fancy-item-visible "+e).removeClass("premium-fancy-item-hidden"),t.filter(function(e){return e!==i}).addClass("premium-fancy-item-hidden").removeClass("premium-fancy-item-visible "+e),i++,t.length===i&&(i=0),n&&s*n===++a&&clearInterval(o)},e)}()}"typing"!==l.effect&&setTimeout(function(){r.find(".premium-fancy-text").css("opacity","1")},500),"loading"===l.loading&&"typing"!==l.effect&&(e.find(".premium-fancy-text").append('<span class="premium-loading-bar"></span>'),e.find(".premium-loading-bar").css({"animation-iteration-count":a,"animation-duration":i+"ms"}))},"premium-counter.default":function(e,n){var a=e.find(".premium-counter");elementorFrontend.waypoint(a,function(){var e=a.data(),t=a.find(".premium-counter-init"),i=a.find(".icon");n(t).numerator(e),n(i).addClass("animated "+i.data("animation"))})},"premium-addon-title.default":[function(e,n){var t=e.find(".premium-title-container"),i=t.find(".premium-title-text");t.hasClass("style9")&&e.find(".premium-title-style9").each(function(){var e=n(this),t=1e3*e.attr("data-blur-delay");e.attr("data-animation-blur","process"),e.find(".premium-title-style9-letter").each(function(e,t){var i;e+=1,i=n("body").hasClass("rtl")?.2/e+"s":e/20+"s",n(t).css({"-webkit-animation-delay":i,"animation-delay":i})}),setInterval(function(){e.attr("data-animation-blur","done"),setTimeout(function(){e.attr("data-animation-blur","process")},150)},t)});if(t.hasClass("style8")){var a=1e3*i.attr("data-shiny-delay"),s=1e3*i.attr("data-shiny-dur");!function e(){i.get(0).setAttribute("data-animation","shiny"),setTimeout(function(){i.removeAttr("data-animation")},s),setTimeout(e,a)}()}},t],"premium-countdown-timer.default":function(e,l){var t=e.find(".premium-countdown"),n=t.data("settings"),m=e.data("id"),i=n.label1,a=n.label2,s=i.split(","),o=a.split(","),r="evergreen"===n.timerType?n.until.date:n.until,d="",u={y:{index:0,oldVal:""},o:{index:1,oldVal:""},w:{index:2,oldVal:""},d:{index:3,oldVal:""},h:{index:4,oldVal:""},m:{index:5,oldVal:""},s:{index:6,oldVal:""}};if(t.find("#countdown-"+m).hasClass("premium-countdown-flip")&&n.format.split("").forEach(function(e){var t=e.toLowerCase();d+='<div class="premium-countdown-block premium-countdown-'+t+'"><div class="pre_time-mid"> <div class="premium-countdown-figure"><span class="top">{'+t+'nn}</span><span class="top-back"><span>{'+t+'nn}</span></span><span class="bottom">{'+t+'nn}</span><span class="bottom-back"><span>{'+t+'nn}</span></span></div><span class="premium-countdown-label">{'+t+'l}</span></div><span class="countdown_separator">{sep}</span></div>'}),t.find("#countdown-"+m).countdown({layout:d,labels:o,labels1:s,until:new Date(r),format:n.format,padZeroes:!0,timeSeparator:n.separator,onTick:function(e){var i,o,r;i=0,t.find("#countdown-"+m+" .countdown-amount").each(function(e,t){i<l(t).outerWidth()&&(i=l(t).outerWidth())}),t.find("#countdown-"+m+" .countdown-amount").css("width",i),t.find("#countdown-"+m).hasClass("premium-countdown-flip")&&(o=e,r=u,n.format.split("").forEach(function(e){var t=e.toLowerCase(),i=r[t].index,n=r[t].oldVal;if(o[i]!==n){r[t].oldVal=o[i];var a=l("#countdown-"+m).find(".premium-countdown-"+t+" .top"),s=l("#countdown-"+m).find(".premium-countdown-"+t+" .top-back");TweenMax.to(a,.8,{rotationX:"-180deg",transformPerspective:300,ease:Quart.easeOut,onComplete:function(){TweenMax.set(a,{rotationX:0})}}),TweenMax.to(s,.8,{rotationX:0,transformPerspective:300,ease:Quart.easeOut,clearProps:"all"})}}))},onExpiry:function(){"onExpiry"===n.event&&t.find("#countdown-"+m).html(n.text)},serverSync:function(){return new Date(n.serverSync)}}),n.reset&&t.find(".premium-countdown-init").countdown("option","until",new Date(r)),"expiryUrl"===n.event&&t.find("#countdown-"+m).countdown("option","expiryUrl",elementorFrontend.isEditMode()?"":n.text),times=t.find("#countdown-"+m).countdown("getTimes"),times.every(function(e){return 0==e}))if("onExpiry"===n.event)t.find("#countdown-"+m).html(n.text);else if("expiryUrl"===n.event&&!elementorFrontend.isEditMode()){0<l("body").find("#elementor").length?t.find("#countdown-"+m).html("<h1>You can not redirect url from elementor Editor!!</h1>"):elementorFrontend.isEditMode()||(window.location.href=n.text)}},"premium-carousel-widget.default":function(e,u){var c=e.find(".premium-carousel-wrapper"),p=u(c).data("settings");function a(e){var t=c.find(".slick-slide");"init"===e&&(t=t.not(".slick-current")),t.find(".animated").each(function(e,t){var i=u(t).data("settings");if(i&&(i._animation||i.animation)){var n=i._animation||i.animation;u(t).removeClass("animated "+n).addClass("elementor-invisible")}})}if(elementorFrontend.isEditMode()&&c.find(".item-wrapper").each(function(e,i){var t=u(i).data("template");void 0!==t&&u.ajax({type:"GET",url:PremiumSettings.ajaxurl,dataType:"html",data:{action:"get_elementor_template_content",templateID:t}}).success(function(e){var t=JSON.parse(e).data;void 0!==t.template_content&&(u(i).html(t.template_content),c.find(".premium-carousel-inner").slick("refresh"))})}),c.on("init",function(e){e.preventDefault(),setTimeout(function(){a("init")},500),u(this).find("item-wrapper.slick-active").each(function(){var e=u(this);e.addClass(e.data("animation"))}),u(".slick-track").addClass("translate")}),c.find(".premium-carousel-inner").slick({vertical:p.vertical,slidesToScroll:p.slidesToScroll,slidesToShow:p.slidesToShow,responsive:[{breakpoint:p.tabletBreak,settings:{slidesToShow:p.slidesTab,slidesToScroll:p.slidesTab,swipe:p.touchMove}},{breakpoint:p.mobileBreak,settings:{slidesToShow:p.slidesMob,slidesToScroll:p.slidesMob,swipe:p.touchMove}}],useTransform:!0,fade:p.fade,infinite:p.infinite,speed:p.speed,autoplay:p.autoplay,autoplaySpeed:p.autoplaySpeed,draggable:p.draggable,rtl:p.rtl,adaptiveHeight:p.adaptiveHeight,pauseOnHover:p.pauseOnHover,centerMode:p.centerMode,centerPadding:p.centerPadding,arrows:p.arrows,prevArrow:c.find(".premium-carousel-nav-arrow-prev").html(),nextArrow:c.find(".premium-carousel-nav-arrow-next").html(),dots:p.dots,customPaging:function(){return c.find(".premium-carousel-nav-dot").html()}}),c.on("afterChange",function(e,t,i){var n,a,s=t.options.slidesToScroll,o=(n=t.options.slidesToShow,(a=u(window).width())>p.tabletBreak&&(n=p.slidesDesk),a<=p.tabletBreak&&(n=p.slidesTab),a<=p.mobileBreak&&(n=p.slidesMob),n),r=t.options.centerMode,l=i+o-1;if(c.find(".slick-active .elementor-invisible").each(function(e,t){var i=u(t).data("settings");if(i&&(i._animation||i.animation)){var n=i._animation_delay?i._animation_delay:0,a=i._animation||i.animation;setTimeout(function(){u(t).removeClass("elementor-invisible").addClass(a+" animated")},n)}}),1===s){if(!0==!r){var m=u(this).find("[data-slick-index='"+l+"']");"null"!=p.animation&&m.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").addClass(p.animation).removeClass("premium-carousel-content-hidden")}}else for(var d=s+i;0<=d;d--)m=u(this).find("[data-slick-index='"+d+"']"),"null"!=p.animation&&m.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").addClass(p.animation).removeClass("premium-carousel-content-hidden")}),c.on("beforeChange",function(e,t,i){a();var n=u(this).find("[data-slick-index='"+i+"']");"null"!=p.animation&&n.siblings().find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").removeClass(p.animation).addClass("premium-carousel-content-hidden")}),p.vertical){var t=-1;elementorFrontend.elements.$window.on("load",function(){c.find(".slick-slide").each(function(){u(this).height()>t&&(t=u(this).height())}),c.find(".slick-slide").each(function(){u(this).height()<t&&u(this).css("margin",Math.ceil((t-u(this).height())/2)+"px 0")})})}var i={element:u("a.ver-carousel-arrow"),getWidth:function(){return this.element.outerWidth()/2},setWidth:function(e){"vertical"==(e=e||"vertical")?this.element.css("margin-left","-"+this.getWidth()+"px"):this.element.css("margin-top","-"+this.getWidth()+"px")}};i.setWidth(),i.element=u("a.carousel-arrow"),i.setWidth("horizontal"),u(document).ready(function(){p.navigation.map(function(e,t){e&&u(e).on("click",function(){var e=c.find(".premium-carousel-inner").slick("slickCurrentSlide");t!==e&&c.find(".premium-carousel-inner").slick("slickGoTo",t)})})})},"premium-addon-modal-box.default":function(e,t){var i=e.find(".premium-modal-box-container"),n=i.data("settings"),a=i.find(".premium-modal-box-modal-dialog");if(n&&("pageload"===n.trigger&&t(document).ready(function(e){setTimeout(function(){i.find(".premium-modal-box-modal").modal()},1e3*n.delay)}),a.data("modal-animation")&&" "!=a.data("modal-animation"))){var s=a.data("delay-animation");new Waypoint({element:a,handler:function(){setTimeout(function(){a.css("opacity","1").addClass("animated "+a.data("modal-animation"))},1e3*s),this.destroy()},offset:Waypoint.viewportHeight()-150})}},"premium-image-scroll.default":function(e,t){var i=e.find(".premium-image-scroll-container"),n=i.find(".premium-image-scroll-overlay"),a=i.find(".premium-image-scroll-vertical"),s=i.data("settings"),o=i.find("img"),r=s.direction,l=s.reverse,m=null;function d(){o.css("transform",("vertical"===r?"translateY":"translateX")+"( -"+m+"px)")}function u(){o.css("transform",("vertical"===r?"translateY":"translateX")+"(0px)")}function c(){m="vertical"===r?o.height()-i.height():o.width()-i.width()}"scroll"===s.trigger?(i.addClass("premium-container-scroll"),"vertical"===r?a.addClass("premium-image-scroll-ver"):i.imagesLoaded(function(){n.css({width:o.width(),height:o.height()})})):("yes"===l&&i.imagesLoaded(function(){i.addClass("premium-container-scroll-instant"),c(),d()}),"vertical"===r&&a.removeClass("premium-image-scroll-ver"),i.mouseenter(function(){i.removeClass("premium-container-scroll-instant"),c(),("yes"===l?u:d)()}),i.mouseleave(function(){("yes"===l?d:u)()}))},"premium-contact-form.default":function(e,t){var i=e.find(".premium-cf7-container").find('input[type="text"], input[type="email"], textarea, input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="file"], input[type="url"]');i.wrap("<span class='wpcf7-span'>"),i.on("focus blur",function(){t(this).closest(".wpcf7-span").toggleClass("is-focused")})},"premium-icon-list.default":function(e,n){var a=e.find(".premium-bullet-list-box");a.find(".premium-bullet-list-content").each(function(e,i){a.data("list-animation")&&" "!=a.data("list-animation")&&elementorFrontend.waypoint(n(i),function(){var e=n(i),t=e.data("delay");setTimeout(function(){e.next(".premium-bullet-list-divider , .premium-bullet-list-divider-inline").css("opacity","1"),e.next(".premium-bullet-list-divider-inline , .premium-bullet-list-divider").addClass("animated "+a.data("list-animation")),e.css("opacity","1").addClass("animated "+a.data("list-animation"))},t)})})},"premium-addon-button.default":e,"premium-addon-image-button.default":e},l={"premium-addon-person":i.extend({getDefaultSettings:function(){return{slick:{infinite:!0,rows:0,prevArrow:'<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>',nextArrow:'<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>',draggable:!0,pauseOnHover:!0},selectors:{multiplePersons:".multiple-persons",person:".premium-person-container",imgContainer:".premium-person-image-container",imgWrap:".premium-person-image-wrap"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$multiplePersons:this.$element.find(e.multiplePersons),$persons:this.$element.find(e.person),$imgWrap:this.$element.find(e.imgWrap)}},bindEvents:function(){this.run()},getSlickSettings:function(){var e=this.getElementSettings(),t=this.elements.$multiplePersons.data("rtl"),i=e.persons_per_row,n=e.persons_per_row_tablet,a=e.persons_per_row_mobile;return Object.assign(this.getSettings("slick"),{slidesToShow:parseInt(100/i.substr(0,i.indexOf("%"))),slidesToScroll:parseInt(100/i.substr(0,i.indexOf("%"))),responsive:[{breakpoint:1025,settings:{slidesToShow:parseInt(100/n.substr(0,n.indexOf("%"))),slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:parseInt(100/a.substr(0,a.indexOf("%"))),slidesToScroll:1}}],autoplay:e.carousel_play,rtl:!!t,autoplaySpeed:e.speed||5e3})},runEqualHeight:function(){var e=this.elements.$persons,t=this.elements.$imgWrap,i=this.getSettings("selectors"),n=new Array;e.each(function(e,t){m(t).imagesLoaded(function(){}).done(function(){var e=m(t).find(i.imgContainer).outerHeight();n.push(e)})}),e.imagesLoaded(function(){}).done(function(){var e=Math.max.apply(null,n);t.css("height",e+"px")})},run:function(){var e=this.elements.$multiplePersons;e.length&&(this.getElementSettings("carousel")&&e.slick(this.getSlickSettings()),e.hasClass("premium-person-style1")||"yes"===e.data("persons-equal")&&this.runEqualHeight())}}),"premium-addon-blog":o,"premium-img-gallery":a,"premium-addon-banner":s};m.each(r,function(i,e){"object"==typeof e?m.each(e,function(e,t){elementorFrontend.hooks.addAction("frontend/element_ready/"+i,t)}):elementorFrontend.hooks.addAction("frontend/element_ready/"+i,e)}),m.each(l,function(e,t){elementorFrontend.elementsHandler.attachHandler(e,t)}),elementorFrontend.isEditMode()?elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default",n):elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default",function(e,t){var i=e.find(".premium-progressbar-container").data("settings").type;"dots"===i&&n(e,"frontend"),elementorFrontend.waypoint(e,function(){("dots"!==i?n:y)(t(this))})})})}(jQuery);
1
+ !function(m){m(window).on("elementor/frontend/init",function(){function n(e,t){var i=e.find(".premium-progressbar-container"),n=i.data("settings"),a=n.progress_length,s=n.speed,o=n.type;if("line"===o){var r=i.find(".premium-progressbar-bar");n.gradient&&r.css("background","linear-gradient(-45deg, "+n.gradient+")"),r.animate({width:a+"%"},s)}else if("circle"===o)100<a&&(a=100),i.prop({counter:0}).animate({counter:a},{duration:s,easing:"linear",step:function(e){var t=3.6*e;i.find(".premium-progressbar-right-label span").text(Math.ceil(e)+"%"),i.find(".premium-progressbar-circle-left").css("transform","rotate("+t+"deg)"),180<t&&(i.find(".premium-progressbar-circle").css({"-webkit-clip-path":"inset(0)","clip-path":"inset(0)"}),i.find(".premium-progressbar-circle-right").css("visibility","visible"))}});else{r=i.find(".premium-progressbar-bar-wrap");var l=i.outerWidth(),m=n.dot||25,d=n.spacing||10,u=Math.ceil(l/(m+d)),c=u*(a/100),p=Math.floor(c),f=100*(c-p);r.attr("data-circles",u),r.attr("data-total-fill",p),r.attr("data-partial-fill",f);for(var g="progress-segment",h=0;h<u;h++){g="progress-segment";var v="";h<p?v="<div class='segment-inner'></div>":h===p&&(v="<div class='segment-inner'></div>"),r.append("<div class='"+g+"'>"+v+"</div>")}"frontend"!==t&&y(e)}}function e(e,a){var s=e.find(".premium-button-style6-bg");0!==s.length&&e.hasClass("premium-mouse-detect-yes")&&e.on("mouseenter mouseleave",".premium-button-style6",function(e){var t=a(this).offset(),i=e.pageX-t.left,n=e.pageY-t.top;s.css({top:n,left:i})})}function t(e,n){if(e.hasClass("premium-mask-yes")){if("premium-addon-title.default"===e.data("widget_type")){var t=".premium-title-header";e.find(t).find(".premium-title-icon, .premium-title-img").addClass("premium-mask-span")}else t=".premium-dual-header-first-header";e.find(t).find("span:not(.premium-title-style7-stripe-wrap):not(.premium-title-img)").each(function(e,t){var i="";n(this).text().split(" ").forEach(function(e){""!==e&&(i+=' <span class="premium-mask-span">'+e+"</span>")}),n(this).text("").append(i)}),elementorFrontend.waypoint(e,function(){n(e).addClass("premium-mask-active")})}}var i=elementorModules.frontend.handlers.Base,y=function(e){var t=e.find(".premium-progressbar-container").data("settings"),a=e.find(".premium-progressbar-bar-wrap"),i=a.data(),s=t.speed,o=0,r=i.totalFill,l=i.circles,m=i.partialFill;!function e(t){var i=a.find(".progress-segment").eq(t),n=100;t===r&&(n=m);i.find(".segment-inner").animate({width:n+"%"},s/l,function(){++o<=r&&e(o)})}(o)},a=i.extend({settings:{},getDefaultSettings:function(){return{selectors:{galleryElement:".premium-gallery-container",filters:".premium-gallery-cats-container li",gradientLayer:".premium-gallery-gradient-layer",loadMore:".premium-gallery-load-more",loadMoreDiv:".premium-gallery-load-more div",vidWrap:".premium-gallery-video-wrap"}}},getDefaultElements:function(){var e=this.getSettings("selectors"),t={$galleryElement:this.$element.find(e.galleryElement),$filters:this.$element.find(e.filters),$gradientLayer:this.$element.find(e.gradientLayer),$vidWrap:this.$element.find(e.vidWrap)};return t.$loadMore=t.$galleryElement.parent().find(e.loadMore),t.$loadMoreDiv=t.$galleryElement.parent().find(e.loadMoreDiv),t},bindEvents:function(){this.getGlobalSettings(),this.run()},getGlobalSettings:function(){var e=this.elements.$galleryElement.data("settings");this.settings={layout:e.img_size,loadMore:e.load_more,columnWidth:null,filter:null,isFilterClicked:!1,minimum:e.minimum,imageToShow:e.click_images,counter:e.minimum,ltrMode:e.ltr_mode,shuffle:e.shuffle,active_cat:e.active_cat,theme:e.theme,overlay:e.overlay,sort_by:e.sort_by,light_box:e.light_box,flag:e.flag,lightbox_type:e.lightbox_type}},updateCounter:function(){this.settings.isFilterClicked?(this.settings.counter=this.settings.minimum,this.settings.isFilterClicked=!1):this.settings.counter=this.settings.counter,this.settings.counter=this.settings.counter+this.settings.imageToShow},updateGrid:function(e,t,i){m.ajax({url:this.appendItems(this.settings.counter,e,t),beforeSend:function(){i.removeClass("premium-gallery-item-hidden")},success:function(){i.addClass("premium-gallery-item-hidden")}})},loadMore:function(e,t){var i=this.elements.$galleryElement,n=this.elements.$loadMoreDiv,a=this.elements.$loadMore,s=this;n.addClass("premium-gallery-item-hidden"),i.find(".premium-gallery-item").length>this.settings.minimum&&(a.removeClass("premium-gallery-item-hidden"),i.parent().on("click",".premium-gallery-load-less",function(){s.settings.counter=s.settings.counter-s.settings.imageToShow}),i.parent().on("click",".premium-gallery-load-more-btn:not(.premium-gallery-load-less)",function(){s.updateCounter(),s.updateGrid(e,t,n)}))},getItemsToHide:function(e,t){return e.filteredItems.slice(t,e.filteredItems.length).map(function(e){return e.element})},appendItems:function(e,t,i){var n=this.elements.$galleryElement,a=this.elements.$gradientLayer,s=n.data("isotope"),o=this.getItemsToHide(s,e);a.outerHeight(t),n.find(".premium-gallery-item-hidden").removeClass("premium-gallery-item-hidden"),n.parent().find(".premium-gallery-load-more").removeClass("premium-gallery-item-hidden"),m(o).addClass("premium-gallery-item-hidden"),i.isotope("layout"),0==o&&(a.addClass("premium-gallery-item-hidden"),n.parent().find(".premium-gallery-load-more").addClass("premium-gallery-item-hidden"))},triggerFilerTabs:function(e){var t=e.searchParams.get(this.settings.flag),i=this.elements.$filters;t&&i.eq(t).find("a").trigger("click")},onReady:function(e){e.isotope("layout"),e.isotope({filter:this.settings.active_cat});var t=new URL(window.location.href);t&&this.triggerFilerTabs(t)},onResize:function(e){this.setMetroLayout(),e.isotope({itemSelector:".premium-gallery-item",masonry:{columnWidth:this.settings.columnWidth}})},lightBoxDisabled:function(){var n=this;this.elements.$vidWrap.each(function(e,t){var i=m(t).data("type");m(t).closest(".premium-gallery-item").on("click",function(){var e=m(this);e.find(".pa-gallery-img-container").css("background","#000"),e.find("img, .pa-gallery-icons-caption-container, .pa-gallery-icons-wrapper").css("visibility","hidden"),"style3"!==n.settings.skin&&e.find(".premium-gallery-caption").css("visibility","hidden"),"hosted"!==i?n.playVid(e):n.playHostedVid(t)})})},playVid:function(e){var t=e.find(".premium-gallery-iframe-wrap"),i=t.data("src");i=i.replace("&mute","&autoplay=1&mute");var n=m("<iframe/>");n.attr({src:i,frameborder:"0",allowfullscreen:"1",allow:"autoplay;encrypted-media;"}),t.html(n),n.css("visibility","visible")},playHostedVid:function(e){var t=m(e).find("video");t.get(0).play(),t.css("visibility","visible")},run:function(){var e=this.elements.$galleryElement,t=(this.elements.$vidWrap,this.elements.$filters),i=this;"metro"===this.settings.layout&&(this.setMetroLayout(),this.settings.layout="masonry",m(window).resize(function(){i.onResize(n)}));var n=e.isotope(this.getIsoTopeSettings());if(n.imagesLoaded().progress(function(){n.isotope("layout")}),m(document).ready(function(){i.onReady(n)}),this.settings.loadMore){var a=this.elements.$gradientLayer,s=null;setTimeout(function(){s=a.outerHeight()},200),this.loadMore(s,n)}"yes"!==this.settings.light_box&&this.lightBoxDisabled(),t.find("a").click(function(e){return e.preventDefault(),i.isFilterClicked=!0,t.find(".active").removeClass("active"),m(this).addClass("active"),i.settings.filter=m(this).attr("data-filter"),n.isotope({filter:i.settings.filter}),i.settings.shuffle&&n.isotope("shuffle"),i.settings.loadMore&&i.appendItems(i.settings.minimum,s,n),!1}),"default"===this.settings.lightbox_type&&this.$element.find(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto(this.getPrettyPhotoSettings())},getPrettyPhotoSettings:function(){return{theme:this.settings.theme,hook:"data-rel",opacity:.7,show_title:!1,deeplinking:!1,overlay_gallery:this.settings.overlay,custom_markup:"",default_width:900,default_height:506,social_tools:""}},getIsoTopeSettings:function(){return{itemSelector:".premium-gallery-item",percentPosition:!0,animationOptions:{duration:750,easing:"linear"},filter:this.settings.active_cat,layoutMode:this.settings.layout,originLeft:this.settings.ltrMode,masonry:{columnWidth:this.settings.columnWidth},sortBy:this.settings.sort_by}},getRepeaterSettings:function(){return this.getElementSettings("premium_gallery_img_content")},setMetroLayout:function(){var e=this.elements.$galleryElement,t=e.width(),a=Math.floor(t/12),i=elementorFrontend.getCurrentDeviceMode(),s="desktop"===i?"":"_"+i,o=this.getRepeaterSettings();e.find(".premium-gallery-item").each(function(e,t){var i=o[e]["premium_gallery_image_cell"+s].size,n=o[e]["premium_gallery_image_vcell"+s].size;""!==i&&null!=i||(i=o[e].premium_gallery_image_cell),""!==n&&null!=n||(n=o[e].premium_gallery_image_vcell),m(t).css({width:Math.ceil(i*a),height:Math.ceil(n*a)})}),this.settings.columnWidth=a}}),s=i.extend({getDefaultSettings:function(){return{selectors:{bannerElement:".premium-banner",bannerImgWrap:".premium-banner-ib",bannerImg:"img"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$bannerElement:this.$element.find(e.bannerElement),$bannerImgWrap:this.$element.find(e.bannerImgWrap),$bannerImg:this.$element.find(e.bannerImg)}},bindEvents:function(){var e=this;e.elements.$bannerImgWrap.hover(function(){e.elements.$bannerImg.addClass("active")},function(){e.elements.$bannerImg.removeClass("active")}),this.run()},run:function(){var e=this.elements.$bannerElement;if(e.data("box-tilt")){var t=e.data("box-tilt-reverse");UniversalTilt.init({elements:e,settings:{reverse:t},callbacks:{onMouseLeave:function(e){e.style.boxShadow="0 45px 100px rgba(255, 255, 255, 0)"},onDeviceMove:function(e){e.style.boxShadow="0 45px 100px rgba(255, 255, 255, 0.3)"}}})}}}),o=i.extend({settings:{},getDefaultSettings:function(){return{selectors:{user:".fa-user",activeCat:".category.active",loading:".premium-loading-feed",blogElement:".premium-blog-wrap",blogFilterTabs:".premium-blog-filter",contentWrapper:".premium-blog-content-wrapper",blogPost:".premium-blog-post-outer-container",metaSeparators:".premium-blog-meta-separator",filterLinks:".premium-blog-filters-container li a",currentPage:".premium-blog-pagination-container .page-numbers.current",activeElememnt:".premium-blog-filters-container li .active"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$blogElement:this.$element.find(e.blogElement),$blogFilterTabs:this.$element.find(e.blogFilterTabs),$activeCat:this.$element.find(e.activeCat),$filterLinks:this.$element.find(e.filterLinks),$blogPost:this.$element.find(e.blogPost),$contentWrapper:this.$element.find(e.contentWrapper)}},bindEvents:function(){this.setLayoutSettings(),this.removeMetaSeparators(),this.run()},setLayoutSettings:function(){var e=this.getElementSettings(),t=this.elements.$blogPost,i={pageNumber:1,isLoaded:!0,count:2,equalHeight:e.force_height,layout:e.premium_blog_layout,carousel:"yes"===e.premium_blog_carousel,infinite:"yes"===e.premium_blog_infinite_scroll,scrollAfter:"yes"===e.scroll_to_offset,grid:"yes"===e.premium_blog_grid,total:t.data("total")};i.carousel&&(i.slidesToScroll=e.slides_to_scroll,i.spacing=parseInt(e.premium_blog_carousel_spacing),i.autoPlay="yes"===e.premium_blog_carousel_play,i.arrows="yes"===e.premium_blog_carousel_arrows,i.fade="yes"===e.premium_blog_carousel_fade,i.center="yes"===e.premium_blog_carousel_center,i.dots="yes"===e.premium_blog_carousel_dots,i.speed=""!==e.premium_blog_carousel_autoplay_speed?parseInt(e.premium_blog_carousel_autoplay_speed):5e3),this.settings=i},removeMetaSeparators:function(){var i=this.getSettings("selectors"),e=this.$element.find(i.blogPost),t=e.first().find(i.metaSeparators),n=e.find(i.user);1===t.length?n.length||e.find(i.metaSeparators).remove():n.length||e.each(function(e,t){m(t).find(i.metaSeparators).first().remove()})},run:function(){var e=this,t=this.elements.$blogElement,i=this.elements.$activeCat.data("filter"),n=this.elements.$blogFilterTabs.length,a=t.data("pagination");this.settings.activeCategory=i,this.settings.filterTabs=n,this.settings.filterTabs&&this.filterTabs(),this.settings.filterTabs&&"*"!==this.settings.activeCategory?this.getPostsByAjax(!1):"masonry"!==this.settings.layout||this.settings.carousel||t.imagesLoaded(function(){t.isotope(e.getIsoTopeSettings())}),this.settings.carousel&&t.slick(this.getSlickSettings()),"even"===this.settings.layout&&this.settings.equalHeight&&t.imagesLoaded(function(){e.forceEqualHeight()}),a&&this.paginate(),this.settings.infinite&&t.is(":visible")&&this.getInfiniteScrollPosts()},paginate:function(){var i=this,n=this.$element,a=this.getSettings("selectors");n.on("click",".premium-blog-pagination-container .page-numbers",function(e){if(e.preventDefault(),!m(this).hasClass("current")){var t=parseInt(n.find(a.currentPage).html());m(this).hasClass("next")?i.settings.pageNumber=t+1:m(this).hasClass("prev")?i.settings.pageNumber=t-1:i.settings.pageNumber=m(this).html(),i.getPostsByAjax(i.settings.scrollAfter)}})},forceEqualHeight:function(){var n=new Array,e=this.getSettings("selectors").contentWrapper,t=this.$element.find(e);t.each(function(e,t){var i=m(t).outerHeight();n.push(i)});var i=Math.max.apply(null,n);t.css("height",i+"px")},getSlickSettings:function(){var e=this.settings,t=e.grid?this.getSlickCols():null,i=e.grid?t.cols:1,n=e.grid?t.colsTablet:1,a=e.grid?t.colsMobile:1,s=e.arrows?'<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Previous" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>':"",o=e.arrows?'<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>':"";return{infinite:!0,slidesToShow:i,slidesToScroll:e.slidesToScroll||i,responsive:[{breakpoint:1025,settings:{slidesToShow:n,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:a,slidesToScroll:1}}],autoplay:e.autoPlay,rows:0,autoplaySpeed:e.speed,nextArrow:o,prevArrow:s,fade:e.fade,centerMode:e.center,centerPadding:e.spacing+"px",draggable:!0,dots:e.dots,customPaging:function(){return'<i class="fas fa-circle"></i>'}}},getSlickCols:function(){var e=this.getElementSettings(),t=e.premium_blog_columns_number,i=e.premium_blog_columns_number_tablet,n=e.premium_blog_columns_number_mobile;return{cols:parseInt(100/t.substr(0,t.indexOf("%"))),colsTablet:parseInt(100/i.substr(0,i.indexOf("%"))),colsMobile:parseInt(100/n.substr(0,n.indexOf("%")))}},getIsoTopeSettings:function(){return{itemSelector:".premium-blog-post-outer-container",percentPosition:!0,filter:this.settings.activeCategory,animationOptions:{duration:750,easing:"linear",queue:!1}}},filterTabs:function(){var t=this,i=this.getSettings("selectors");this.elements.$filterLinks.click(function(e){e.preventDefault(),t.$element.find(i.activeElememnt).removeClass("active"),m(this).addClass("active"),t.settings.activeCategory=m(this).attr("data-filter"),t.settings.pageNumber=1,t.settings.infinite?(t.getPostsByAjax(!1),t.settings.count=2,t.getInfiniteScrollPosts()):t.getPostsByAjax(t.settings.scrollAfter)})},getPostsByAjax:function(e){void 0===this.settings.activeCategory&&(this.settings.activeCategory="*");var n=this,a=this.elements.$blogElement,s=this.getSettings("selectors");m.ajax({url:PremiumSettings.ajaxurl,dataType:"json",type:"POST",data:{action:"pa_get_posts",page_id:a.data("page"),widget_id:n.$element.data("id"),page_number:n.settings.pageNumber,category:n.settings.activeCategory,nonce:PremiumSettings.nonce},beforeSend:function(){a.append('<div class="premium-loading-feed"><div class="premium-loader"></div></div>'),e&&m("html, body").animate({scrollTop:a.offset().top-50},"slow")},success:function(e){if(e.data){a.find(s.loading).remove();var t=e.data.posts,i=e.data.paging;n.settings.infinite?(n.settings.isLoaded=!0,n.settings.filterTabs&&1===n.settings.pageNumber?a.html(t):a.append(t)):(a.html(t),n.$element.find(".premium-blog-footer").html(i)),n.removeMetaSeparators(),n.settings.layout&&("even"===n.settings.layout?n.settings.equalHeight&&n.forceEqualHeight():a.imagesLoaded(function(){a.isotope("reloadItems"),a.isotope({itemSelector:".premium-blog-post-outer-container",animate:!1})}))}},error:function(e){console.log(e)}})},getInfiniteScrollPosts:function(){var e=jQuery(window).outerHeight()/1.25,t=this;m(window).scroll(function(){t.settings.filterTabs&&($blogPost=t.elements.$blogElement.find(".premium-blog-post-outer-container"),t.settings.total=$blogPost.data("total")),t.settings.count<=t.settings.total&&m(window).scrollTop()+e>=t.$element.find(".premium-blog-post-outer-container:last").offset().top&&1==t.settings.isLoaded&&(t.settings.pageNumber=t.settings.count,t.getPostsByAjax(!1),t.settings.count++,t.settings.isLoaded=!1)})}}),r={"premium-addon-dual-header.default":t,"premium-addon-video-box.default":function(l,m){var t,i,d=l.find(".premium-video-box-container"),e=l.find(".premium-video-box-playlist-container"),n=d.find(".premium-video-box-video-container"),u=d.find(".premium-video-box-inner-wrap"),c=u.find(".premium-video-box-image-container"),a=d.data("type"),s=d.data("thumbnail"),o=d.data("sticky"),r=d.data("sticky-play"),p=d.data("hover");if(e.length){if(!n.length)return;n.each(function(e,t){var i,n=m(t),a=n.closest(".premium-video-box-container"),s=n.closest(".premium-video-box-trigger");i=n.data("src"),i+="&autoplay=1",s.on("click",function(){var e=m("<iframe/>");e.attr({src:i,frameborder:"0",allowfullscreen:"1",allow:"autoplay;encrypted-media;"}),n.css("background","#000"),n.html(e),a.find(".premium-video-box-image-container, .premium-video-box-play-icon-container").remove()})})}else"self"===a?(t=n.find("video"),i=t.attr("src")):(i=n.data("src"),s&&-1===i.indexOf("autoplay=1")?i+="&autoplay=1":d.data("play-viewport")?elementorFrontend.waypoint(d,function(){f()}):f()),d.on("click",function(){f()}),"yes"===o&&"yes"!==r&&g();function f(){if(!d.hasClass("playing")){if(d.addClass("playing"),"yes"===r&&g(),"self"===a)m(t).get(0).play(),n.css({opacity:"1",visibility:"visible"});else{var e=m("<iframe/>");e.attr({src:i,frameborder:"0",allowfullscreen:"1",allow:"autoplay;encrypted-media;"}),n.css("background","#000"),n.html(e)}d.find(".premium-video-box-image-container, .premium-video-box-play-icon-container, .premium-video-box-description-container").remove(),"vimeo"===a&&d.find(".premium-video-box-vimeo-wrap").remove()}}function g(){var i=d.data("hide-desktop"),n=d.data("hide-tablet"),a=d.data("hide-mobile"),s=d.data("sticky-margin");if(d.off("click").on("click",function(e){var t=e.target.className;if(0<=t.toString().indexOf("premium-video-box-sticky-close")||0<=t.toString().indexOf("premium-video-box-sticky-close"))return!1;f()}),void 0!==elementorFrontend.waypoint)var t=elementorFrontend.waypoint(d,function(e){if("down"===e){if(d.removeClass("premium-video-box-sticky-hide").addClass("premium-video-box-sticky-apply premium-video-box-filter-sticky"),l.hasClass("elementor-motion-effects-parent")&&l.removeClass("elementor-motion-effects-perspective").find(".elementor-widget-container").addClass("premium-video-box-transform"),d.data("mask")&&(l.find(".premium-video-box-mask-filter").removeClass("premium-video-box-mask-filter"),d.find(":first-child").removeClass("premium-video-box-mask-media"),c.removeClass(p).removeClass("premium-video-box-mask-media").css({transition:"width 0.2s, height 0.2s","-webkit-transition":"width 0.2s, height 0.2s"})),m(document).trigger("premium_after_sticky_applied",[l]),u.data("video-animation")&&" "!=u.data("video-animation")){u.css("opacity","0");var t=u.data("delay-animation");setTimeout(function(){u.css("opacity","1").addClass("animated "+u.data("video-animation"))},1e3*t)}}else d.removeClass("premium-video-box-sticky-apply premium-video-box-filter-sticky").addClass("premium-video-box-sticky-hide"),l.hasClass("elementor-motion-effects-parent")&&l.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform"),d.data("mask")&&(d.parent().addClass("premium-video-box-mask-filter"),d.find(":first-child").eq(0).addClass("premium-video-box-mask-media"),c.addClass("premium-video-box-mask-media")),c.addClass(p).css({transition:"all 0.2s","-webkit-transition":"all 0.2s"}),u.removeClass("animated "+u.data("video-animation"))},{offset:"0%",triggerOnce:!1});function o(e){var t=elementorFrontend.getCurrentDeviceMode();""!==i&&t==i||""!==n&&t==n||""!==a&&t==a?r(e):e[0].enable()}function r(e){e[0].disable(),d.removeClass("premium-video-box-sticky-apply premium-video-box-sticky-hide")}function e(){d.hasClass("premium-video-box-sticky-apply")&&u.draggable({start:function(){m(this).css({transform:"none",top:m(this).offset().top+"px",left:m(this).offset().left+"px"})},containment:"window"})}l.find(".premium-video-box-sticky-close").off("click.closetrigger").on("click.closetrigger",function(e){t[0].disable(),d.removeClass("premium-video-box-sticky-apply premium-video-box-sticky-hide"),l.hasClass("elementor-motion-effects-parent")&&l.addClass("elementor-motion-effects-perspective").find(".elementor-widget-container").removeClass("premium-video-box-transform"),d.data("mask")&&(d.parent().addClass("premium-video-box-mask-filter"),d.find(":first-child").eq(0).addClass("premium-video-box-mask-media"),c.addClass("premium-video-box-mask-media"))}),o(t),e(),window.addEventListener("scroll",e),m(window).resize(function(e){o(t)}),m(document).on("premium_after_sticky_applied",function(e,t){var i=t.find(".premium-video-box-sticky-infobar");if(0!==i.length){var n=i.outerHeight();if((t.hasClass("premium-video-sticky-center-left")||t.hasClass("premium-video-sticky-center-right"))&&(n=Math.ceil(n/2),u.css("top","calc( 50% - "+n+"px )")),(t.hasClass("premium-video-sticky-bottom-left")||t.hasClass("premium-video-sticky-bottom-right"))&&""!==s){var a=(n=Math.ceil(n))+s;u.css("bottom",a)}}})}},"premium-addon-fancy-text.default":function(e,t){var r=e.find(".premium-fancy-text-wrapper"),l=r.data("settings"),i=l.delay||2500,n=r.find(".premium-fancy-list-items").length,a=""!==l.count||["typing","slide","autofade"].includes(l.effect)?l.count*n:"infinite";if("typing"===l.effect){var s=[];l.strings.forEach(function(e){s.push(e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"))}),r.find(".premium-fancy-text").typed({strings:s,typeSpeed:l.typeSpeed,backSpeed:l.backSpeed,startDelay:l.startDelay,backDelay:l.backDelay,showCursor:l.showCursor,cursorChar:l.cursorChar,loop:l.loop})}else if("slide"===l.effect)i=l.pause,r.find(".premium-fancy-text").vTicker({speed:l.speed,showItems:l.showItems,pause:l.pause,mousePause:l.mousePause,direction:"up"});else if("auto-fade"===l.effect){var o=r.find(".premium-fancy-list-items"),m=o.length;if(0===m)return;var d=l.duration/m,u=0;i=d,o.each(function(e,t){t.style.animationDelay=u+"ms",u+=d})}else{!function(){var t=r.find(".premium-fancy-list-items"),i=1,e=l.delay||2500,n=l.count;if(n)var a=1,s=r.find(".premium-fancy-list-items").length;var o=setInterval(function(){var e="";"custom"===l.effect&&(e="animated "+l.animation),t.eq(i).addClass("premium-fancy-item-visible "+e).removeClass("premium-fancy-item-hidden"),t.filter(function(e){return e!==i}).addClass("premium-fancy-item-hidden").removeClass("premium-fancy-item-visible "+e),i++,t.length===i&&(i=0),n&&s*n===++a&&clearInterval(o)},e)}()}"typing"!==l.effect&&setTimeout(function(){r.find(".premium-fancy-text").css("opacity","1")},500),"loading"===l.loading&&"typing"!==l.effect&&(e.find(".premium-fancy-text").append('<span class="premium-loading-bar"></span>'),e.find(".premium-loading-bar").css({"animation-iteration-count":a,"animation-duration":i+"ms"}))},"premium-counter.default":function(e,n){var a=e.find(".premium-counter");elementorFrontend.waypoint(a,function(){var e=a.data(),t=a.find(".premium-counter-init"),i=a.find(".icon");n(t).numerator(e),n(i).addClass("animated "+i.data("animation"))})},"premium-addon-title.default":[function(e,n){var t=e.find(".premium-title-container"),i=t.find(".premium-title-text");t.hasClass("style9")&&e.find(".premium-title-style9").each(function(){var e=n(this),t=1e3*e.attr("data-blur-delay");e.attr("data-animation-blur","process"),e.find(".premium-title-style9-letter").each(function(e,t){var i;e+=1,i=n("body").hasClass("rtl")?.2/e+"s":e/20+"s",n(t).css({"-webkit-animation-delay":i,"animation-delay":i})}),setInterval(function(){e.attr("data-animation-blur","done"),setTimeout(function(){e.attr("data-animation-blur","process")},150)},t)});if(t.hasClass("style8")){var a=1e3*i.attr("data-shiny-delay"),s=1e3*i.attr("data-shiny-dur");!function e(){i.get(0).setAttribute("data-animation","shiny"),setTimeout(function(){i.removeAttr("data-animation")},s),setTimeout(e,a)}()}},t],"premium-countdown-timer.default":function(e,l){var t=e.find(".premium-countdown"),n=t.data("settings"),m=e.data("id"),i=n.label1,a=n.label2,s=i.split(","),o=a.split(","),r="evergreen"===n.timerType?n.until.date:n.until,d="",u={y:{index:0,oldVal:""},o:{index:1,oldVal:""},w:{index:2,oldVal:""},d:{index:3,oldVal:""},h:{index:4,oldVal:""},m:{index:5,oldVal:""},s:{index:6,oldVal:""}};if(t.find("#countdown-"+m).hasClass("premium-countdown-flip")&&n.format.split("").forEach(function(e){var t=e.toLowerCase();d+='<div class="premium-countdown-block premium-countdown-'+t+'"><div class="pre_time-mid"> <div class="premium-countdown-figure"><span class="top">{'+t+'nn}</span><span class="top-back"><span>{'+t+'nn}</span></span><span class="bottom">{'+t+'nn}</span><span class="bottom-back"><span>{'+t+'nn}</span></span></div><span class="premium-countdown-label">{'+t+'l}</span></div><span class="countdown_separator">{sep}</span></div>'}),t.find("#countdown-"+m).countdown({layout:d,labels:o,labels1:s,until:new Date(r),format:n.format,padZeroes:!0,timeSeparator:n.separator,onTick:function(e){var i,o,r;i=0,t.find("#countdown-"+m+" .countdown-amount").each(function(e,t){i<l(t).outerWidth()&&(i=l(t).outerWidth())}),t.find("#countdown-"+m+" .countdown-amount").css("width",i),t.find("#countdown-"+m).hasClass("premium-countdown-flip")&&(o=e,r=u,n.format.split("").forEach(function(e){var t=e.toLowerCase(),i=r[t].index,n=r[t].oldVal;if(o[i]!==n){r[t].oldVal=o[i];var a=l("#countdown-"+m).find(".premium-countdown-"+t+" .top"),s=l("#countdown-"+m).find(".premium-countdown-"+t+" .top-back");TweenMax.to(a,.8,{rotationX:"-180deg",transformPerspective:300,ease:Quart.easeOut,onComplete:function(){TweenMax.set(a,{rotationX:0})}}),TweenMax.to(s,.8,{rotationX:0,transformPerspective:300,ease:Quart.easeOut,clearProps:"all"})}}))},onExpiry:function(){"onExpiry"===n.event&&t.find("#countdown-"+m).html(n.text)},serverSync:function(){return new Date(n.serverSync)}}),n.reset&&t.find(".premium-countdown-init").countdown("option","until",new Date(r)),"expiryUrl"===n.event&&t.find("#countdown-"+m).countdown("option","expiryUrl",elementorFrontend.isEditMode()?"":n.text),times=t.find("#countdown-"+m).countdown("getTimes"),times.every(function(e){return 0==e}))if("onExpiry"===n.event)t.find("#countdown-"+m).html(n.text);else if("expiryUrl"===n.event&&!elementorFrontend.isEditMode()){0<l("body").find("#elementor").length?t.find("#countdown-"+m).html("<h1>You can not redirect url from elementor Editor!!</h1>"):elementorFrontend.isEditMode()||(window.location.href=n.text)}},"premium-carousel-widget.default":function(e,u){var c=e.find(".premium-carousel-wrapper"),p=u(c).data("settings");function a(e){var t=c.find(".slick-slide");"init"===e&&(t=t.not(".slick-current")),t.find(".animated").each(function(e,t){var i=u(t).data("settings");if(i&&(i._animation||i.animation)){var n=i._animation||i.animation;u(t).removeClass("animated "+n).addClass("elementor-invisible")}})}if(elementorFrontend.isEditMode()&&c.find(".item-wrapper").each(function(e,i){var t=u(i).data("template");void 0!==t&&u.ajax({type:"GET",url:PremiumSettings.ajaxurl,dataType:"html",data:{action:"get_elementor_template_content",templateID:t}}).success(function(e){var t=JSON.parse(e).data;void 0!==t.template_content&&(u(i).html(t.template_content),c.find(".premium-carousel-inner").slick("refresh"))})}),c.on("init",function(e){e.preventDefault(),setTimeout(function(){a("init")},500),u(this).find("item-wrapper.slick-active").each(function(){var e=u(this);e.addClass(e.data("animation"))}),u(".slick-track").addClass("translate")}),c.find(".premium-carousel-inner").slick({vertical:p.vertical,slidesToScroll:p.slidesToScroll,slidesToShow:p.slidesToShow,responsive:[{breakpoint:p.tabletBreak,settings:{slidesToShow:p.slidesTab,slidesToScroll:p.slidesTab,swipe:p.touchMove}},{breakpoint:p.mobileBreak,settings:{slidesToShow:p.slidesMob,slidesToScroll:p.slidesMob,swipe:p.touchMove}}],useTransform:!0,fade:p.fade,infinite:p.infinite,speed:p.speed,autoplay:p.autoplay,autoplaySpeed:p.autoplaySpeed,draggable:p.draggable,rtl:p.rtl,adaptiveHeight:p.adaptiveHeight,pauseOnHover:p.pauseOnHover,centerMode:p.centerMode,centerPadding:p.centerPadding,arrows:p.arrows,prevArrow:c.find(".premium-carousel-nav-arrow-prev").html(),nextArrow:c.find(".premium-carousel-nav-arrow-next").html(),dots:p.dots,customPaging:function(){return c.find(".premium-carousel-nav-dot").html()}}),c.on("afterChange",function(e,t,i){var n,a,s=t.options.slidesToScroll,o=(n=t.options.slidesToShow,(a=u(window).width())>p.tabletBreak&&(n=p.slidesDesk),a<=p.tabletBreak&&(n=p.slidesTab),a<=p.mobileBreak&&(n=p.slidesMob),n),r=t.options.centerMode,l=i+o-1;if(c.find(".slick-active .elementor-invisible").each(function(e,t){var i=u(t).data("settings");if(i&&(i._animation||i.animation)){var n=i._animation_delay?i._animation_delay:0,a=i._animation||i.animation;setTimeout(function(){u(t).removeClass("elementor-invisible").addClass(a+" animated")},n)}}),1===s){if(!0==!r){var m=u(this).find("[data-slick-index='"+l+"']");"null"!=p.animation&&m.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").addClass(p.animation).removeClass("premium-carousel-content-hidden")}}else for(var d=s+i;0<=d;d--)m=u(this).find("[data-slick-index='"+d+"']"),"null"!=p.animation&&m.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").addClass(p.animation).removeClass("premium-carousel-content-hidden")}),c.on("beforeChange",function(e,t,i){a();var n=u(this).find("[data-slick-index='"+i+"']");"null"!=p.animation&&n.siblings().find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").removeClass(p.animation).addClass("premium-carousel-content-hidden")}),p.vertical){var t=-1;elementorFrontend.elements.$window.on("load",function(){c.find(".slick-slide").each(function(){u(this).height()>t&&(t=u(this).height())}),c.find(".slick-slide").each(function(){u(this).height()<t&&u(this).css("margin",Math.ceil((t-u(this).height())/2)+"px 0")})})}var i={element:u("a.ver-carousel-arrow"),getWidth:function(){return this.element.outerWidth()/2},setWidth:function(e){"vertical"==(e=e||"vertical")?this.element.css("margin-left","-"+this.getWidth()+"px"):this.element.css("margin-top","-"+this.getWidth()+"px")}};i.setWidth(),i.element=u("a.carousel-arrow"),i.setWidth("horizontal"),u(document).ready(function(){p.navigation.map(function(e,t){e&&u(e).on("click",function(){var e=c.find(".premium-carousel-inner").slick("slickCurrentSlide");t!==e&&c.find(".premium-carousel-inner").slick("slickGoTo",t)})})})},"premium-addon-modal-box.default":function(e,t){var i=e.find(".premium-modal-box-container"),n=i.data("settings"),a=i.find(".premium-modal-box-modal-dialog");if(n&&("pageload"===n.trigger&&t(document).ready(function(e){setTimeout(function(){i.find(".premium-modal-box-modal").modal()},1e3*n.delay)}),a.data("modal-animation")&&" "!=a.data("modal-animation"))){var s=a.data("delay-animation");new Waypoint({element:a,handler:function(){setTimeout(function(){a.css("opacity","1").addClass("animated "+a.data("modal-animation"))},1e3*s),this.destroy()},offset:Waypoint.viewportHeight()-150})}},"premium-image-scroll.default":function(e,t){var i=e.find(".premium-image-scroll-container"),n=i.find(".premium-image-scroll-overlay"),a=i.find(".premium-image-scroll-vertical"),s=i.data("settings"),o=i.find("img"),r=s.direction,l=s.reverse,m=null;function d(){o.css("transform",("vertical"===r?"translateY":"translateX")+"( -"+m+"px)")}function u(){o.css("transform",("vertical"===r?"translateY":"translateX")+"(0px)")}function c(){m="vertical"===r?o.height()-i.height():o.width()-i.width()}"scroll"===s.trigger?(i.addClass("premium-container-scroll"),"vertical"===r?a.addClass("premium-image-scroll-ver"):i.imagesLoaded(function(){n.css({width:o.width(),height:o.height()})})):("yes"===l&&i.imagesLoaded(function(){i.addClass("premium-container-scroll-instant"),c(),d()}),"vertical"===r&&a.removeClass("premium-image-scroll-ver"),i.mouseenter(function(){i.removeClass("premium-container-scroll-instant"),c(),("yes"===l?u:d)()}),i.mouseleave(function(){("yes"===l?d:u)()}))},"premium-contact-form.default":function(e,t){var i=e.find(".premium-cf7-container").find('input[type="text"], input[type="email"], textarea, input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="file"], input[type="url"]');i.wrap("<span class='wpcf7-span'>"),i.on("focus blur",function(){t(this).closest(".wpcf7-span").toggleClass("is-focused")})},"premium-icon-list.default":function(e,n){var a=e.find(".premium-bullet-list-box");a.find(".premium-bullet-list-content").each(function(e,i){a.data("list-animation")&&" "!=a.data("list-animation")&&elementorFrontend.waypoint(n(i),function(){var e=n(i),t=e.data("delay");setTimeout(function(){e.next(".premium-bullet-list-divider , .premium-bullet-list-divider-inline").css("opacity","1"),e.next(".premium-bullet-list-divider-inline , .premium-bullet-list-divider").addClass("animated "+a.data("list-animation")),e.css("opacity","1").addClass("animated "+a.data("list-animation"))},t)})})},"premium-addon-button.default":e,"premium-addon-image-button.default":e},l={"premium-addon-person":i.extend({getDefaultSettings:function(){return{slick:{infinite:!0,rows:0,prevArrow:'<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>',nextArrow:'<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>',draggable:!0,pauseOnHover:!0},selectors:{multiplePersons:".multiple-persons",person:".premium-person-container",imgContainer:".premium-person-image-container",imgWrap:".premium-person-image-wrap"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$multiplePersons:this.$element.find(e.multiplePersons),$persons:this.$element.find(e.person),$imgWrap:this.$element.find(e.imgWrap)}},bindEvents:function(){this.run()},getSlickSettings:function(){var e=this.getElementSettings(),t=this.elements.$multiplePersons.data("rtl"),i=e.persons_per_row,n=e.persons_per_row_tablet,a=e.persons_per_row_mobile;return Object.assign(this.getSettings("slick"),{slidesToShow:parseInt(100/i.substr(0,i.indexOf("%"))),slidesToScroll:parseInt(100/i.substr(0,i.indexOf("%"))),responsive:[{breakpoint:1025,settings:{slidesToShow:parseInt(100/n.substr(0,n.indexOf("%"))),slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:parseInt(100/a.substr(0,a.indexOf("%"))),slidesToScroll:1}}],autoplay:e.carousel_play,rtl:!!t,autoplaySpeed:e.speed||5e3})},runEqualHeight:function(){var e=this.elements.$persons,t=this.elements.$imgWrap,i=this.getSettings("selectors"),n=new Array;e.each(function(e,t){m(t).imagesLoaded(function(){}).done(function(){var e=m(t).find(i.imgContainer).outerHeight();n.push(e)})}),e.imagesLoaded(function(){}).done(function(){var e=Math.max.apply(null,n);t.css("height",e+"px")})},run:function(){var e=this.elements.$multiplePersons;e.length&&(this.getElementSettings("carousel")&&e.slick(this.getSlickSettings()),e.hasClass("premium-person-style1")||"yes"===e.data("persons-equal")&&this.runEqualHeight())}}),"premium-addon-blog":o,"premium-img-gallery":a,"premium-addon-banner":s};m.each(r,function(i,e){"object"==typeof e?m.each(e,function(e,t){elementorFrontend.hooks.addAction("frontend/element_ready/"+i,t)}):elementorFrontend.hooks.addAction("frontend/element_ready/"+i,e)}),m.each(l,function(e,t){elementorFrontend.elementsHandler.attachHandler(e,t)}),elementorFrontend.isEditMode()?elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default",n):elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-progressbar.default",function(e,t){var i=e.find(".premium-progressbar-container").data("settings").type;"dots"===i&&n(e,"frontend"),elementorFrontend.waypoint(e,function(){("dots"!==i?n:y)(t(this))})})})}(jQuery);
includes/pa-display-conditions/conditions/acf-boolean.php CHANGED
@@ -47,18 +47,19 @@ class Acf_Boolean extends Condition {
47
  public function get_control_options() {
48
 
49
  return array(
50
- 'label' => __( 'ACF Field', 'premium-addons-for-elementor' ),
51
- 'type' => Premium_Acf_Selector::TYPE,
52
- 'options' => array(),
53
- 'query_type' => 'acf',
54
- 'label_block' => true,
55
- 'multiple' => false,
56
- 'query_options' => $this->get_query_options(),
57
- 'description' => __( 'ACF True/False', 'premium-addons-for-elementor' ),
58
- 'condition' => array(
59
  'pa_condition_key' => 'acf_boolean',
60
  ),
61
  );
 
62
  }
63
 
64
  /**
@@ -82,19 +83,21 @@ class Acf_Boolean extends Condition {
82
  * @return array controls options.
83
  */
84
  public function add_value_control() {
 
85
  return array(
86
- 'label' => __( 'Value', 'premium-addons-for-elementor' ),
87
- 'type' => Controls_Manager::SELECT,
88
- 'label_block' => true,
89
- 'options' => array(
90
- 'true' => __( 'True', 'premium-addons-for-elementor' ),
91
- 'false' => __( 'False', 'premium-addons-for-elementor' ),
92
- ),
93
- 'default' => 'true',
94
- 'condition' => array(
95
  'pa_condition_key' => 'acf_boolean',
96
  ),
97
  );
 
98
  }
99
 
100
  /**
@@ -111,7 +114,7 @@ class Acf_Boolean extends Condition {
111
  *
112
  * @return bool|void
113
  */
114
- public function compare_value( $settings, $operator, $value, $compare_val, $tz ) {
115
 
116
  $field = get_field_object( $value );
117
 
47
  public function get_control_options() {
48
 
49
  return array(
50
+ 'label' => __( 'Value', 'premium-addons-for-elementor' ),
51
+ 'type' => Controls_Manager::SELECT,
52
+ 'label_block' => true,
53
+ 'options' => array(
54
+ 'true' => __( 'True', 'premium-addons-for-elementor' ),
55
+ 'false' => __( 'False', 'premium-addons-for-elementor' ),
56
+ ),
57
+ 'default' => 'true',
58
+ 'condition' => array(
59
  'pa_condition_key' => 'acf_boolean',
60
  ),
61
  );
62
+
63
  }
64
 
65
  /**
83
  * @return array controls options.
84
  */
85
  public function add_value_control() {
86
+
87
  return array(
88
+ 'label' => __( 'ACF Field', 'premium-addons-for-elementor' ),
89
+ 'type' => Premium_Acf_Selector::TYPE,
90
+ 'options' => array(),
91
+ 'query_type' => 'acf',
92
+ 'label_block' => true,
93
+ 'multiple' => false,
94
+ 'query_options' => $this->get_query_options(),
95
+ 'description' => __( 'ACF True/False', 'premium-addons-for-elementor' ),
96
+ 'condition' => array(
97
  'pa_condition_key' => 'acf_boolean',
98
  ),
99
  );
100
+
101
  }
102
 
103
  /**
114
  *
115
  * @return bool|void
116
  */
117
+ public function compare_value( $settings, $operator, $compare_val, $value, $tz ) {
118
 
119
  $field = get_field_object( $value );
120
 
includes/pa-display-conditions/conditions/acf-choice.php CHANGED
@@ -47,18 +47,15 @@ class Acf_Choice extends Condition {
47
  public function get_control_options() {
48
 
49
  return array(
50
- 'label' => __( 'ACF Field', 'premium-addons-for-elementor' ),
51
- 'type' => Premium_Acf_Selector::TYPE,
52
- 'options' => array(),
53
- 'query_type' => 'acf',
54
- 'label_block' => true,
55
- 'multiple' => false,
56
- 'query_options' => $this->get_query_options(),
57
- 'description' => __( 'ACF Choice ( Select, Checkbox, Radio ).', 'premium-addons-for-elementor' ),
58
- 'condition' => array(
59
  'pa_condition_key' => 'acf_choice',
60
  ),
61
  );
 
62
  }
63
 
64
  /**
@@ -82,15 +79,21 @@ class Acf_Choice extends Condition {
82
  * @return array controls options.
83
  */
84
  public function add_value_control() {
 
85
  return array(
86
- 'label' => __( 'Value', 'premium-addons-for-elementor' ),
87
- 'type' => Controls_Manager::TEXTAREA,
88
- 'label_block' => true,
89
- 'description' => __( 'Enter each accepted choice on a separate line in the same format as the field\'s return format. You can specify the value ( red ), the label ( Red ), or both value and label ( red : Red ).', 'premium-addons-for-elementor' ),
90
- 'condition' => array(
 
 
 
 
91
  'pa_condition_key' => 'acf_choice',
92
  ),
93
  );
 
94
  }
95
 
96
  /**
@@ -107,7 +110,7 @@ class Acf_Choice extends Condition {
107
  *
108
  * @return bool|void
109
  */
110
- public function compare_value( $settings, $operator, $value, $compare_val, $tz ) {
111
 
112
  $field = get_field_object( $value );
113
 
47
  public function get_control_options() {
48
 
49
  return array(
50
+ 'label' => __( 'Value', 'premium-addons-for-elementor' ),
51
+ 'type' => Controls_Manager::TEXTAREA,
52
+ 'label_block' => true,
53
+ 'description' => __( 'Enter each accepted choice on a separate line in the same format as the field\'s return format. You can specify the value ( red ), the label ( Red ), or both value and label ( red : Red ).', 'premium-addons-for-elementor' ),
54
+ 'condition' => array(
 
 
 
 
55
  'pa_condition_key' => 'acf_choice',
56
  ),
57
  );
58
+
59
  }
60
 
61
  /**
79
  * @return array controls options.
80
  */
81
  public function add_value_control() {
82
+
83
  return array(
84
+ 'label' => __( 'ACF Field', 'premium-addons-for-elementor' ),
85
+ 'type' => Premium_Acf_Selector::TYPE,
86
+ 'options' => array(),
87
+ 'query_type' => 'acf',
88
+ 'label_block' => true,
89
+ 'multiple' => false,
90
+ 'query_options' => $this->get_query_options(),
91
+ 'description' => __( 'ACF Choice ( Select, Checkbox, Radio ).', 'premium-addons-for-elementor' ),
92
+ 'condition' => array(
93
  'pa_condition_key' => 'acf_choice',
94
  ),
95
  );
96
+
97
  }
98
 
99
  /**
110
  *
111
  * @return bool|void
112
  */
113
+ public function compare_value( $settings, $operator, $compare_val, $value, $tz ) {
114
 
115
  $field = get_field_object( $value );
116
 
includes/pa-display-conditions/conditions/acf-text.php CHANGED
@@ -47,18 +47,14 @@ class Acf_Text extends Condition {
47
  public function get_control_options() {
48
 
49
  return array(
50
- 'label' => __( 'ACF Field', 'premium-addons-for-elementor' ),
51
- 'type' => Premium_Acf_Selector::TYPE,
52
- 'options' => array(),
53
- 'query_type' => 'acf',
54
- 'label_block' => true,
55
- 'multiple' => false,
56
- 'query_options' => $this->get_query_options(),
57
- 'description' => __( 'ACF Textual ( text, textarea, wysiwyg, number, range, email, url, and password ).', 'premium-addons-for-elementor' ),
58
- 'condition' => array(
59
  'pa_condition_key' => 'acf_text',
60
  ),
61
  );
 
62
  }
63
 
64
  /**
@@ -82,14 +78,21 @@ class Acf_Text extends Condition {
82
  * @return array controls options.
83
  */
84
  public function add_value_control() {
 
85
  return array(
86
- 'label' => __( 'Value', 'premium-addons-for-elementor' ),
87
- 'type' => Controls_Manager::TEXT,
88
- 'label_block' => true,
89
- 'condition' => array(
 
 
 
 
 
90
  'pa_condition_key' => 'acf_text',
91
  ),
92
  );
 
93
  }
94
 
95
  /**
@@ -106,7 +109,7 @@ class Acf_Text extends Condition {
106
  *
107
  * @return bool|void
108
  */
109
- public function compare_value( $settings, $operator, $value, $compare_val, $tz ) {
110
 
111
  $field = get_field_object( $value );
112
 
47
  public function get_control_options() {
48
 
49
  return array(
50
+ 'label' => __( 'Value', 'premium-addons-for-elementor' ),
51
+ 'type' => Controls_Manager::TEXT,
52
+ 'label_block' => true,
53
+ 'condition' => array(
 
 
 
 
 
54
  'pa_condition_key' => 'acf_text',
55
  ),
56
  );
57
+
58
  }
59
 
60
  /**
78
  * @return array controls options.
79
  */
80
  public function add_value_control() {
81
+
82
  return array(
83
+ 'label' => __( 'ACF Field', 'premium-addons-for-elementor' ),
84
+ 'type' => Premium_Acf_Selector::TYPE,
85
+ 'options' => array(),
86
+ 'query_type' => 'acf',
87
+ 'label_block' => true,
88
+ 'multiple' => false,
89
+ 'query_options' => $this->get_query_options(),
90
+ 'description' => __( 'ACF Textual ( text, textarea, wysiwyg, number, range, email, url, and password ).', 'premium-addons-for-elementor' ),
91
+ 'condition' => array(
92
  'pa_condition_key' => 'acf_text',
93
  ),
94
  );
95
+
96
  }
97
 
98
  /**
109
  *
110
  * @return bool|void
111
  */
112
+ public function compare_value( $settings, $operator, $compare_val, $value, $tz ) {
113
 
114
  $field = get_field_object( $value );
115
 
includes/pa-display-conditions/conditions/woo-orders.php CHANGED
@@ -31,19 +31,15 @@ class Woo_Orders extends Condition {
31
  public function get_control_options() {
32
 
33
  return array(
34
- 'label' => __( 'Status', 'premium-addons-for-elementor' ),
35
- 'type' => Controls_Manager::SELECT,
36
- 'default' => 'in-cart',
37
- 'label_block' => true,
38
- 'options' => array(
39
- 'in-cart' => 'In Cart',
40
- 'purchased' => 'Purchased',
41
- ),
42
- 'multiple' => true,
43
  'condition' => array(
44
  'pa_condition_key' => 'woo_orders',
45
  ),
46
  );
 
47
  }
48
 
49
 
@@ -56,15 +52,21 @@ class Woo_Orders extends Condition {
56
  * @return array controls options.
57
  */
58
  public function add_value_control() {
 
59
  return array(
60
- 'label' => __( 'Number of Items', 'premium-addons-for-elementor' ),
61
- 'type' => Controls_Manager::NUMBER,
62
- 'min' => 0,
63
- 'description' => __( 'Enter 0 to check if empty. Any other value will be the minimum number of items to check.', 'premium-addons-for-elementor' ),
 
 
 
 
64
  'condition' => array(
65
  'pa_condition_key' => 'woo_orders',
66
  ),
67
  );
 
68
  }
69
 
70
  /**
@@ -81,7 +83,7 @@ class Woo_Orders extends Condition {
81
  *
82
  * @return bool|void
83
  */
84
- public function compare_value( $settings, $operator, $value, $compare_val, $tz ) {
85
 
86
  if ( '' === $compare_val ) {
87
  return true;
31
  public function get_control_options() {
32
 
33
  return array(
34
+ 'label' => __( 'Number of Items', 'premium-addons-for-elementor' ),
35
+ 'type' => Controls_Manager::NUMBER,
36
+ 'min' => 0,
37
+ 'description' => __( 'Enter 0 to check if empty. Any other value will be the minimum number of items to check.', 'premium-addons-for-elementor' ),
 
 
 
 
 
38
  'condition' => array(
39
  'pa_condition_key' => 'woo_orders',
40
  ),
41
  );
42
+
43
  }
44
 
45
 
52
  * @return array controls options.
53
  */
54
  public function add_value_control() {
55
+
56
  return array(
57
+ 'label' => __( 'Status', 'premium-addons-for-elementor' ),
58
+ 'type' => Controls_Manager::SELECT,
59
+ 'default' => 'in-cart',
60
+ 'label_block' => true,
61
+ 'options' => array(
62
+ 'in-cart' => __( 'In Cart', 'premium-addons-for-elementor' ),
63
+ 'purchased' => __( 'Purchased', 'premium-addons-for-elementor' ),
64
+ ),
65
  'condition' => array(
66
  'pa_condition_key' => 'woo_orders',
67
  ),
68
  );
69
+
70
  }
71
 
72
  /**
83
  *
84
  * @return bool|void
85
  */
86
+ public function compare_value( $settings, $operator, $compare_val, $value, $tz ) {
87
 
88
  if ( '' === $compare_val ) {
89
  return true;
includes/pa-display-conditions/conditions/woo-product-cat.php CHANGED
@@ -24,7 +24,7 @@ class Woo_Product_Cat extends Condition {
24
  * Get Controls Options.
25
  *
26
  * @access public
27
- * @since 4.7.0
28
  *
29
  * @return array|void controls options
30
  */
@@ -47,7 +47,7 @@ class Woo_Product_Cat extends Condition {
47
  * Compare Condition Value.
48
  *
49
  * @access public
50
- * @since 4.7.0
51
  *
52
  * @param array $settings element settings.
53
  * @param string $operator condition operator.
24
  * Get Controls Options.
25
  *
26
  * @access public
27
+ * @since 4.7.2
28
  *
29
  * @return array|void controls options
30
  */
47
  * Compare Condition Value.
48
  *
49
  * @access public
50
+ * @since 4.7.2
51
  *
52
  * @param array $settings element settings.
53
  * @param string $operator condition operator.
includes/pa-display-conditions/conditions/woo-product-price.php CHANGED
@@ -24,7 +24,7 @@ class Woo_Product_Price extends Condition {
24
  * Get Value Controls Options.
25
  *
26
  * @access public
27
- * @since 4.7.0
28
  *
29
  * @return array controls options.
30
  */
@@ -45,7 +45,7 @@ class Woo_Product_Price extends Condition {
45
  * Compare Condition Value.
46
  *
47
  * @access public
48
- * @since 4.7.0
49
  *
50
  * @param array $settings element settings.
51
  * @param string $operator condition operator.
24
  * Get Value Controls Options.
25
  *
26
  * @access public
27
+ * @since 4.7.2
28
  *
29
  * @return array controls options.
30
  */
45
  * Compare Condition Value.
46
  *
47
  * @access public
48
+ * @since 4.7.2
49
  *
50
  * @param array $settings element settings.
51
  * @param string $operator condition operator.
includes/pa-display-conditions/conditions/woo-product-stock.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Woocommerce Product Stock Condition Handler.
4
+ */
5
+
6
+ namespace PremiumAddons\Includes\PA_Display_Conditions\Conditions;
7
+
8
+ // Elementor Classes.
9
+ use Elementor\Controls_Manager;
10
+
11
+ // PA Classes.
12
+ use PremiumAddons\Includes\Helper_Functions;
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit; // Exit if accessed directly.
16
+ }
17
+
18
+ /**
19
+ * Class Woo_Product_Stock.
20
+ */
21
+ class Woo_Product_Stock extends Condition {
22
+
23
+ /**
24
+ * Get Value Controls Options.
25
+ *
26
+ * @access public
27
+ * @since 4.7.3
28
+ *
29
+ * @return array controls options.
30
+ */
31
+ public function get_control_options() {
32
+ return array(
33
+ 'label' => __( 'Equal or Higher than', 'premium-addons-for-elementor' ),
34
+ 'type' => Controls_Manager::NUMBER,
35
+ 'description' => __( 'Set the minimum quantity in stock to be checked. 0 means out of stock', 'premium-addons-for-elementor' ),
36
+ 'min' => 0,
37
+ 'condition' => array(
38
+ 'pa_condition_key' => 'woo_product_stock',
39
+ ),
40
+ );
41
+ }
42
+
43
+
44
+ /**
45
+ * Compare Condition Value.
46
+ *
47
+ * @access public
48
+ * @since 4.7.2
49
+ *
50
+ * @param array $settings element settings.
51
+ * @param string $operator condition operator.
52
+ * @param string $value condition value.
53
+ * @param string $compare_val compare value.
54
+ * @param string|bool $tz time zone.
55
+ *
56
+ * @return bool|void
57
+ */
58
+ public function compare_value( $settings, $operator, $value, $compare_val, $tz ) {
59
+
60
+ $product_id = get_queried_object_id();
61
+
62
+ $product = wc_get_product( $product_id );
63
+
64
+ $product_quantity = $product->get_stock_quantity();
65
+
66
+ if ( 0 === $value ) {
67
+ // Check if product is in stock or backorder is allowed.
68
+ $product_quantity = $product->is_in_stock() || $product->backorders_allowed();
69
+
70
+ $condition_result = $value == $product_quantity ? true : false;
71
+ } else {
72
+ $condition_result = $value <= $product_quantity ? true : false;
73
+ }
74
+
75
+ return Helper_Functions::get_final_result( $condition_result, $operator );
76
+ }
77
+
78
+ }
includes/pa-display-conditions/conditions/woo-total-price.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Woocommerce Total Amount in Cart Condition Handler.
4
+ */
5
+
6
+ namespace PremiumAddons\Includes\PA_Display_Conditions\Conditions;
7
+
8
+ // Elementor Classes.
9
+ use Elementor\Controls_Manager;
10
+
11
+ // PA Classes.
12
+ use PremiumAddons\Includes\Helper_Functions;
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit; // Exit if accessed directly.
16
+ }
17
+
18
+ /**
19
+ * Class Woo_Total_Price.
20
+ */
21
+ class Woo_Total_Price extends Condition {
22
+
23
+ /**
24
+ * Get Value Controls Options.
25
+ *
26
+ * @access public
27
+ * @since 4.7.3
28
+ *
29
+ * @return array controls options.
30
+ */
31
+ public function get_control_options() {
32
+
33
+ return array(
34
+ 'label' => __( 'Equal or Higher than', 'premium-addons-for-elementor' ),
35
+ 'type' => Controls_Manager::NUMBER,
36
+ 'description' => __( 'Set the minimum amount in the cart to be checked.', 'premium-addons-for-elementor' ),
37
+ 'min' => 0,
38
+ 'condition' => array(
39
+ 'pa_condition_key' => 'woo_total_price',
40
+ ),
41
+ );
42
+
43
+ }
44
+
45
+ /**
46
+ * Get Value Controls Options.
47
+ *
48
+ * @access public
49
+ * @since 4.7.3
50
+ *
51
+ * @return array controls options.
52
+ */
53
+ public function add_value_control() {
54
+
55
+ return array(
56
+ 'label' => __( 'Source', 'premium-addons-for-elementor' ),
57
+ 'type' => Controls_Manager::SELECT,
58
+ 'options' => array(
59
+ 'subtotal' => __( 'Subtotal Amount', 'premium-addons-for-elementor' ),
60
+ 'total' => __( 'Total Amount', 'premium-addons-for-elementor' ),
61
+ ),
62
+ 'default' => 'subtotal',
63
+ 'label_block' => true,
64
+ 'condition' => array(
65
+ 'pa_condition_key' => 'woo_total_price',
66
+ ),
67
+ );
68
+
69
+ }
70
+
71
+
72
+ /**
73
+ * Compare Condition Value.
74
+ *
75
+ * @access public
76
+ * @since 4.7.0
77
+ *
78
+ * @param array $settings element settings.
79
+ * @param string $operator condition operator.
80
+ * @param string $value condition value.
81
+ * @param string $compare_val compare value.
82
+ * @param string|bool $tz time zone.
83
+ *
84
+ * @return bool|void
85
+ */
86
+ public function compare_value( $settings, $operator, $compare_val, $value, $tz ) {
87
+
88
+ $cart = WC()->cart;
89
+
90
+ if ( $cart->is_empty() ) {
91
+ return false;
92
+ }
93
+
94
+ if ( 'total' === $value ) {
95
+ $cart_total = $cart->total;
96
+ } else {
97
+ $cart_total = $cart->get_displayed_subtotal();
98
+ }
99
+
100
+ $condition_result = (int) $compare_val <= $cart_total ? true : false;
101
+
102
+ return Helper_Functions::get_final_result( $condition_result, $operator );
103
+ }
104
+
105
+ }
includes/pa-display-conditions/pa-controls-handler.php CHANGED
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  /**
17
  * Class PA_Controls_Handler
18
  *
19
- * @since 4.4.8
20
  */
21
  class PA_Controls_Handler {
22
 
@@ -48,7 +48,7 @@ class PA_Controls_Handler {
48
  /**
49
  * Holds all the conditions.
50
  *
51
- * @since 4.4.8
52
  * @access protected
53
  * @var array condition results holder.
54
  */
@@ -75,7 +75,7 @@ class PA_Controls_Handler {
75
  * Initialize condition classes.
76
  *
77
  * @access public
78
- * @since 4.4.8
79
  */
80
  public function init_conditions() {
81
 
@@ -138,7 +138,7 @@ class PA_Controls_Handler {
138
  * Initialize condition classes.
139
  *
140
  * @access public
141
- * @since 4.4.8
142
  */
143
  public function init_conditions_classes() {
144
 
@@ -185,7 +185,7 @@ class PA_Controls_Handler {
185
  * Set render function to action filter.
186
  *
187
  * @access public
188
- * @since 4.4.8
189
  */
190
  public function init_actions() {
191
 
@@ -195,26 +195,21 @@ class PA_Controls_Handler {
195
  }
196
 
197
  /**
198
- * Adds repeater controls
199
  *
200
- * @since 4.4.8
201
  * @access public
202
  *
203
  * @param object $repeater Elementor Repeater Object.
204
  */
205
- public function add_repeater_controls( $repeater ) {
206
 
207
- $additional_ids = array( 'pa_condition_acf_text', 'pa_condition_acf_boolean', 'pa_condition_acf_choice', 'pa_condition_woo_orders' );
208
 
209
  foreach ( static::$conditions_classes as $condition_class_name => $condition_obj ) {
210
 
211
  $control_id = 'pa_condition_' . $condition_class_name;
212
 
213
- $repeater->add_control(
214
- $control_id,
215
- $condition_obj->get_control_options()
216
- );
217
-
218
  if ( in_array( $control_id, $additional_ids, true ) ) {
219
  $repeater->add_control(
220
  'pa_condition_val' . $condition_class_name,
@@ -224,13 +219,35 @@ class PA_Controls_Handler {
224
  }
225
  }
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  /**
228
  * Determines whether the element content should be rendered.
229
  *
230
  * @param bool $should_render should render.
231
  * @param object $element Elementor Repeater Object.
232
  *
233
- * @since 4.4.8
234
  * @access public
235
  */
236
  public function should_render( $should_render, $element ) {
@@ -256,7 +273,7 @@ class PA_Controls_Handler {
256
  /**
257
  * Store conditions results
258
  *
259
- * @since 4.4.8
260
  * @access protected
261
  *
262
  * @param array $settings elements settings.
@@ -281,11 +298,11 @@ class PA_Controls_Handler {
281
  $value = isset( $list[ $item_key ] ) ? $list[ $item_key ] : '';
282
 
283
  $compare_val = isset( $list[ 'pa_condition_val' . $list['pa_condition_key'] ] ) ? esc_html( $list[ 'pa_condition_val' . $list['pa_condition_key'] ] ) : '';
284
- echo $compare_val;
285
  $id = $item_key . '_' . $list['_id'];
286
  $time_zone = in_array( $list['pa_condition_key'], array( 'date_range', 'date', 'day' ), true ) ? $list['pa_condition_timezone'] : false;
287
 
288
- $check = ! empty( $value ) ? $class->compare_value( $settings, $operator, $value, $compare_val, $time_zone ) : true;
289
 
290
  $this->conditions_results_holder[ $element_id ][ $id ] = $check;
291
  }
@@ -294,7 +311,7 @@ class PA_Controls_Handler {
294
  /**
295
  * Check Element Visibility
296
  *
297
- * @since 4.4.8
298
  * @access public
299
  *
300
  * @param string $element_id element id.
16
  /**
17
  * Class PA_Controls_Handler
18
  *
19
+ * @since 4.7.0
20
  */
21
  class PA_Controls_Handler {
22
 
48
  /**
49
  * Holds all the conditions.
50
  *
51
+ * @since 4.7.0
52
  * @access protected
53
  * @var array condition results holder.
54
  */
75
  * Initialize condition classes.
76
  *
77
  * @access public
78
+ * @since 4.7.0
79
  */
80
  public function init_conditions() {
81
 
138
  * Initialize condition classes.
139
  *
140
  * @access public
141
+ * @since 4.7.0
142
  */
143
  public function init_conditions_classes() {
144
 
185
  * Set render function to action filter.
186
  *
187
  * @access public
188
+ * @since 4.7.0
189
  */
190
  public function init_actions() {
191
 
195
  }
196
 
197
  /**
198
+ * Adds repeater source controls
199
  *
200
+ * @since 4.7.0
201
  * @access public
202
  *
203
  * @param object $repeater Elementor Repeater Object.
204
  */
205
+ public function add_repeater_source_controls( $repeater ) {
206
 
207
+ $additional_ids = array( 'pa_condition_acf_text', 'pa_condition_acf_boolean', 'pa_condition_acf_choice', 'pa_condition_woo_orders', 'pa_condition_woo_total_price' );
208
 
209
  foreach ( static::$conditions_classes as $condition_class_name => $condition_obj ) {
210
 
211
  $control_id = 'pa_condition_' . $condition_class_name;
212
 
 
 
 
 
 
213
  if ( in_array( $control_id, $additional_ids, true ) ) {
214
  $repeater->add_control(
215
  'pa_condition_val' . $condition_class_name,
219
  }
220
  }
221
 
222
+ /**
223
+ * Adds repeater compare controls
224
+ *
225
+ * @since 4.7.0
226
+ * @access public
227
+ *
228
+ * @param object $repeater Elementor Repeater Object.
229
+ */
230
+ public function add_repeater_compare_controls( $repeater ) {
231
+
232
+ foreach ( static::$conditions_classes as $condition_class_name => $condition_obj ) {
233
+
234
+ $control_id = 'pa_condition_' . $condition_class_name;
235
+
236
+ $repeater->add_control(
237
+ $control_id,
238
+ $condition_obj->get_control_options()
239
+ );
240
+
241
+ }
242
+ }
243
+
244
  /**
245
  * Determines whether the element content should be rendered.
246
  *
247
  * @param bool $should_render should render.
248
  * @param object $element Elementor Repeater Object.
249
  *
250
+ * @since 4.7.0
251
  * @access public
252
  */
253
  public function should_render( $should_render, $element ) {
273
  /**
274
  * Store conditions results
275
  *
276
+ * @since 4.7.0
277
  * @access protected
278
  *
279
  * @param array $settings elements settings.
298
  $value = isset( $list[ $item_key ] ) ? $list[ $item_key ] : '';
299
 
300
  $compare_val = isset( $list[ 'pa_condition_val' . $list['pa_condition_key'] ] ) ? esc_html( $list[ 'pa_condition_val' . $list['pa_condition_key'] ] ) : '';
301
+
302
  $id = $item_key . '_' . $list['_id'];
303
  $time_zone = in_array( $list['pa_condition_key'], array( 'date_range', 'date', 'day' ), true ) ? $list['pa_condition_timezone'] : false;
304
 
305
+ $check = '' !== $value ? $class->compare_value( $settings, $operator, $value, $compare_val, $time_zone ) : true;
306
 
307
  $this->conditions_results_holder[ $element_id ][ $id ] = $check;
308
  }
311
  /**
312
  * Check Element Visibility
313
  *
314
+ * @since 4.7.0
315
  * @access public
316
  *
317
  * @param string $element_id element id.
languages/premium-addons-for-elementor.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Premium Addons for Elementor\n"
5
- "POT-Creation-Date: 2021-12-02 16:15+0200\n"
6
  "PO-Revision-Date: 2018-02-15 10:41+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Leap13\n"
@@ -116,56 +116,48 @@ msgstr ""
116
  msgid "Get PRO"
117
  msgstr ""
118
 
119
- #: admin/includes/admin-notices.php:176
120
  msgid ""
121
  "Premium Addons for Elementor is not working because you need to Install "
122
  "Elementor plugin."
123
  msgstr ""
124
 
125
- #: admin/includes/admin-notices.php:178
126
  msgid "Install Now"
127
  msgstr ""
128
 
129
- #: admin/includes/admin-notices.php:187
130
  msgid ""
131
  "Premium Addons for Elementor is not working because you need to activate "
132
  "Elementor plugin."
133
  msgstr ""
134
 
135
- #: admin/includes/admin-notices.php:189
136
  msgid "Activate Now"
137
  msgstr ""
138
 
139
- #: admin/includes/admin-notices.php:206
140
  msgid ""
141
  "Can we take only 2 minutes of your time? We would be really grateful it if "
142
  "you give "
143
  msgstr ""
144
 
145
- #: admin/includes/admin-notices.php:207
146
  msgid "Premium Addons for Elementor"
147
  msgstr ""
148
 
149
- #: admin/includes/admin-notices.php:209
150
  msgid "Leave a Review"
151
  msgstr ""
152
 
153
- #: admin/includes/admin-notices.php:210
154
  msgid "I Already Did"
155
  msgstr ""
156
 
157
- #: admin/includes/admin-notices.php:211
158
  msgid "Maybe Later"
159
  msgstr ""
160
 
161
- #: admin/includes/admin-notices.php:282
162
- msgid "Black Friday! Get <b>25% Discount</b> for a Limited Time Only"
163
- msgstr ""
164
-
165
- #: admin/includes/admin-notices.php:284
166
- msgid "Get The Deal"
167
- msgstr ""
168
-
169
  #: admin/includes/duplicator.php:77
170
  msgid "PA Duplicate"
171
  msgstr ""
@@ -188,8 +180,8 @@ msgstr ""
188
  #: modules/woocommerce/widgets/woo-products.php:168
189
  #: modules/woocommerce/widgets/woo-products.php:1115
190
  #: widgets/premium-blog.php:1179 widgets/premium-carousel.php:57
191
- #: widgets/premium-carousel.php:158 widgets/premium-person.php:993
192
- #: widgets/premium-person.php:1606
193
  msgid "Carousel"
194
  msgstr ""
195
 
@@ -1658,17 +1650,26 @@ msgstr ""
1658
  msgid "Status"
1659
  msgstr ""
1660
 
1661
- #: includes/pa-display-conditions/conditions/woo-orders.php:60
 
 
 
 
 
 
 
 
1662
  msgid "Number of Items"
1663
  msgstr ""
1664
 
1665
- #: includes/pa-display-conditions/conditions/woo-orders.php:63
1666
  msgid ""
1667
  "Enter 0 to check if empty. Any other value will be the minimum number of "
1668
  "items to check."
1669
  msgstr ""
1670
 
1671
  #: includes/pa-display-conditions/conditions/woo-product-price.php:33
 
1672
  msgid "Equal or Higher than"
1673
  msgstr ""
1674
 
@@ -1676,6 +1677,24 @@ msgstr ""
1676
  msgid "Set the minimum price of the product to be checked."
1677
  msgstr ""
1678
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1679
  #: includes/pa-display-conditions/pa-controls-handler.php:84
1680
  msgid "System"
1681
  msgstr ""
@@ -1873,35 +1892,39 @@ msgstr ""
1873
  msgid "Last Purchase In Cart"
1874
  msgstr ""
1875
 
1876
- #: modules/pa-display-conditions/module.php:109
 
 
 
 
1877
  msgid "Enable Display Conditions"
1878
  msgstr ""
1879
 
1880
- #: modules/pa-display-conditions/module.php:121
1881
  msgid "Action"
1882
  msgstr ""
1883
 
1884
- #: modules/pa-display-conditions/module.php:125
1885
  msgid "Show Element"
1886
  msgstr ""
1887
 
1888
- #: modules/pa-display-conditions/module.php:126
1889
  msgid "Hide Element"
1890
  msgstr ""
1891
 
1892
- #: modules/pa-display-conditions/module.php:137
1893
  msgid "Display When"
1894
  msgstr ""
1895
 
1896
- #: modules/pa-display-conditions/module.php:141
1897
  msgid "All Conditions Are Met"
1898
  msgstr ""
1899
 
1900
- #: modules/pa-display-conditions/module.php:142
1901
  msgid "Any Condition is Met"
1902
  msgstr ""
1903
 
1904
- #: modules/pa-display-conditions/module.php:155
1905
  #: modules/woocommerce/skins/skin-1.php:699
1906
  #: modules/woocommerce/skins/skin-2.php:724
1907
  #: modules/woocommerce/skins/skin-3.php:723
@@ -1915,32 +1938,32 @@ msgstr ""
1915
  msgid "Type"
1916
  msgstr ""
1917
 
1918
- #: modules/pa-display-conditions/module.php:184
1919
  msgid "This option is available in Premium Addons Pro."
1920
  msgstr ""
1921
 
1922
- #: modules/pa-display-conditions/module.php:184
1923
  #: modules/premium-section-floating-effects/module.php:195
1924
  msgid "Upgrade now!"
1925
  msgstr ""
1926
 
1927
- #: modules/pa-display-conditions/module.php:199
1928
  msgid "Is"
1929
  msgstr ""
1930
 
1931
- #: modules/pa-display-conditions/module.php:200
1932
  msgid "Is Not"
1933
  msgstr ""
1934
 
1935
- #: modules/pa-display-conditions/module.php:218
1936
  msgid "Local Time"
1937
  msgstr ""
1938
 
1939
- #: modules/pa-display-conditions/module.php:219
1940
  msgid "Server Timezone"
1941
  msgstr ""
1942
 
1943
- #: modules/pa-display-conditions/module.php:230
1944
  msgid "Conditions"
1945
  msgstr ""
1946
 
@@ -2157,8 +2180,8 @@ msgstr ""
2157
  #: widgets/premium-modalbox.php:990 widgets/premium-modalbox.php:1087
2158
  #: widgets/premium-modalbox.php:1183 widgets/premium-modalbox.php:1248
2159
  #: widgets/premium-modalbox.php:1300 widgets/premium-modalbox.php:1417
2160
- #: widgets/premium-modalbox.php:1475 widgets/premium-person.php:1421
2161
- #: widgets/premium-person.php:1536 widgets/premium-person.php:1657
2162
  #: widgets/premium-pricing-table.php:991 widgets/premium-pricing-table.php:1809
2163
  #: widgets/premium-pricing-table.php:2175
2164
  #: widgets/premium-pricing-table.php:2193 widgets/premium-progressbar.php:1048
@@ -2245,7 +2268,7 @@ msgstr ""
2245
  #: widgets/premium-image-scroll.php:754 widgets/premium-lottie.php:520
2246
  #: widgets/premium-modalbox.php:412 widgets/premium-modalbox.php:980
2247
  #: widgets/premium-modalbox.php:1230 widgets/premium-modalbox.php:1396
2248
- #: widgets/premium-person.php:1169 widgets/premium-pricing-table.php:1979
2249
  #: widgets/premium-pricing-table.php:2234 widgets/premium-title.php:956
2250
  #: widgets/premium-title.php:1471 widgets/premium-videobox.php:710
2251
  #: widgets/premium-vscroll.php:462 widgets/premium-vscroll.php:857
@@ -2379,8 +2402,8 @@ msgstr ""
2379
  #: widgets/premium-icon-list.php:197 widgets/premium-image-scroll.php:168
2380
  #: widgets/premium-image-scroll.php:608 widgets/premium-image-separator.php:160
2381
  #: widgets/premium-image-separator.php:185 widgets/premium-modalbox.php:452
2382
- #: widgets/premium-modalbox.php:646 widgets/premium-person.php:422
2383
- #: widgets/premium-person.php:704 widgets/premium-person.php:1087
2384
  #: widgets/premium-pricing-table.php:167 widgets/premium-pricing-table.php:392
2385
  #: widgets/premium-testimonials.php:134 widgets/premium-testimonials.php:352
2386
  #: widgets/premium-title.php:204 widgets/premium-videobox.php:1205
@@ -2586,10 +2609,10 @@ msgstr ""
2586
  #: widgets/premium-maps.php:618 widgets/premium-maps.php:706
2587
  #: widgets/premium-maps.php:795 widgets/premium-modalbox.php:1037
2588
  #: widgets/premium-modalbox.php:1336 widgets/premium-modalbox.php:1514
2589
- #: widgets/premium-modalbox.php:1676 widgets/premium-person.php:1233
2590
- #: widgets/premium-person.php:1300 widgets/premium-person.php:1355
2591
- #: widgets/premium-person.php:1514 widgets/premium-person.php:1592
2592
- #: widgets/premium-person.php:1697 widgets/premium-pricing-table.php:1005
2593
  #: widgets/premium-pricing-table.php:1103
2594
  #: widgets/premium-pricing-table.php:1188
2595
  #: widgets/premium-pricing-table.php:1534
@@ -2626,8 +2649,8 @@ msgstr ""
2626
  #: widgets/premium-grid.php:799 widgets/premium-grid.php:1491
2627
  #: widgets/premium-icon-list.php:170 widgets/premium-icon-list.php:1269
2628
  #: widgets/premium-maps.php:326 widgets/premium-maps.php:572
2629
- #: widgets/premium-modalbox.php:294 widgets/premium-person.php:447
2630
- #: widgets/premium-person.php:728 widgets/premium-pricing-table.php:247
2631
  #: widgets/premium-pricing-table.php:890 widgets/premium-pricing-table.php:1124
2632
  #: widgets/premium-progressbar.php:255 widgets/premium-progressbar.php:748
2633
  #: widgets/premium-title.php:153 widgets/premium-title.php:160
@@ -2723,9 +2746,9 @@ msgstr ""
2723
  #: widgets/premium-modalbox.php:894 widgets/premium-modalbox.php:1160
2724
  #: widgets/premium-modalbox.php:1237 widgets/premium-modalbox.php:1289
2725
  #: widgets/premium-modalbox.php:1403 widgets/premium-modalbox.php:1461
2726
- #: widgets/premium-person.php:1200 widgets/premium-person.php:1255
2727
- #: widgets/premium-person.php:1322 widgets/premium-person.php:1393
2728
- #: widgets/premium-person.php:1617 widgets/premium-pricing-table.php:956
2729
  #: widgets/premium-pricing-table.php:1135
2730
  #: widgets/premium-pricing-table.php:1228
2731
  #: widgets/premium-pricing-table.php:1273
@@ -2756,8 +2779,8 @@ msgstr ""
2756
  #: widgets/premium-blog.php:1861 widgets/premium-blog.php:1925
2757
  #: widgets/premium-blog.php:2379 widgets/premium-icon-list.php:1155
2758
  #: widgets/premium-icon-list.php:1312 widgets/premium-image-separator.php:621
2759
- #: widgets/premium-modalbox.php:911 widgets/premium-person.php:1407
2760
- #: widgets/premium-person.php:1631 widgets/premium-videobox.php:1554
2761
  #: widgets/premium-videobox.php:1682
2762
  msgid "Hover Color"
2763
  msgstr ""
@@ -2810,7 +2833,7 @@ msgstr ""
2810
  #: widgets/premium-image-button.php:849 widgets/premium-image-button.php:1115
2811
  #: widgets/premium-maps.php:605 widgets/premium-maps.php:694
2812
  #: widgets/premium-maps.php:783 widgets/premium-modalbox.php:1664
2813
- #: widgets/premium-person.php:1288 widgets/premium-person.php:1502
2814
  #: widgets/premium-pricing-table.php:1083
2815
  #: widgets/premium-pricing-table.php:1169
2816
  #: widgets/premium-pricing-table.php:1253
@@ -2898,8 +2921,8 @@ msgstr ""
2898
  #: widgets/premium-banner.php:443 widgets/premium-banner.php:916
2899
  #: widgets/premium-grid.php:812 widgets/premium-grid.php:1524
2900
  #: widgets/premium-maps.php:336 widgets/premium-maps.php:661
2901
- #: widgets/premium-person.php:458 widgets/premium-person.php:739
2902
- #: widgets/premium-person.php:1314 widgets/premium-pricing-table.php:586
2903
  #: widgets/premium-pricing-table.php:596 widgets/premium-pricing-table.php:917
2904
  #: widgets/premium-pricing-table.php:1833 widgets/premium-videobox.php:1299
2905
  msgid "Description"
@@ -2997,9 +3020,9 @@ msgstr ""
2997
  #: widgets/premium-modalbox.php:1018 widgets/premium-modalbox.php:1116
2998
  #: widgets/premium-modalbox.php:1267 widgets/premium-modalbox.php:1319
2999
  #: widgets/premium-modalbox.php:1439 widgets/premium-modalbox.php:1497
3000
- #: widgets/premium-modalbox.php:1644 widgets/premium-person.php:1095
3001
- #: widgets/premium-person.php:1122 widgets/premium-person.php:1463
3002
- #: widgets/premium-person.php:1487 widgets/premium-person.php:1685
3003
  #: widgets/premium-pricing-table.php:1029
3004
  #: widgets/premium-pricing-table.php:1071
3005
  #: widgets/premium-pricing-table.php:1687
@@ -3163,8 +3186,8 @@ msgstr ""
3163
  #: widgets/premium-icon-list.php:429 widgets/premium-icon-list.php:1107
3164
  #: widgets/premium-image-button.php:585 widgets/premium-lottie.php:291
3165
  #: widgets/premium-maps.php:263 widgets/premium-modalbox.php:727
3166
- #: widgets/premium-modalbox.php:1216 widgets/premium-person.php:1380
3167
- #: widgets/premium-person.php:1645 widgets/premium-pricing-table.php:708
3168
  #: widgets/premium-pricing-table.php:729 widgets/premium-pricing-table.php:750
3169
  #: widgets/premium-pricing-table.php:974 widgets/premium-pricing-table.php:1616
3170
  #: widgets/premium-progressbar.php:214 widgets/premium-progressbar.php:941
@@ -3457,7 +3480,7 @@ msgid "Show Arrows"
3457
  msgstr ""
3458
 
3459
  #: modules/woocommerce/widgets/woo-products.php:294
3460
- #: widgets/premium-blog.php:1302 widgets/premium-person.php:1029
3461
  msgid "Arrows Position"
3462
  msgstr ""
3463
 
@@ -3516,7 +3539,7 @@ msgstr ""
3516
 
3517
  #: modules/woocommerce/widgets/woo-products.php:458
3518
  #: widgets/premium-blog.php:1236 widgets/premium-carousel.php:430
3519
- #: widgets/premium-person.php:1014
3520
  msgid "Autoplay Speed"
3521
  msgstr ""
3522
 
@@ -3525,11 +3548,6 @@ msgstr ""
3525
  msgid "Query"
3526
  msgstr ""
3527
 
3528
- #: modules/woocommerce/widgets/woo-products.php:476
3529
- #: widgets/premium-blog.php:318 widgets/premium-videobox.php:217
3530
- msgid "Source"
3531
- msgstr ""
3532
-
3533
  #: modules/woocommerce/widgets/woo-products.php:486
3534
  msgid "Category Filter Rule"
3535
  msgstr ""
@@ -3932,7 +3950,7 @@ msgstr ""
3932
 
3933
  #: widgets/premium-banner.php:395 widgets/premium-carousel.php:196
3934
  #: widgets/premium-modalbox.php:165 widgets/premium-modalbox.php:309
3935
- #: widgets/premium-modalbox.php:331 widgets/premium-person.php:1528
3936
  #: widgets/premium-testimonials.php:311 widgets/premium-testimonials.php:536
3937
  #: widgets/premium-vscroll.php:162
3938
  msgid "Content"
@@ -4003,7 +4021,7 @@ msgstr ""
4003
  #: widgets/premium-image-button.php:655 widgets/premium-image-scroll.php:588
4004
  #: widgets/premium-image-separator.php:550 widgets/premium-lottie.php:476
4005
  #: widgets/premium-maps.php:541 widgets/premium-modalbox.php:827
4006
- #: widgets/premium-person.php:1057 widgets/premium-progressbar.php:567
4007
  #: widgets/premium-testimonials.php:331 widgets/premium-videobox.php:1395
4008
  #: widgets/premium-vscroll.php:562
4009
  msgid "Helpful Documentations"
@@ -4033,7 +4051,7 @@ msgstr ""
4033
 
4034
  #: widgets/premium-banner.php:763 widgets/premium-blog.php:1700
4035
  #: widgets/premium-grid.php:1448 widgets/premium-image-separator.php:592
4036
- #: widgets/premium-modalbox.php:883 widgets/premium-person.php:1147
4037
  msgid "Hover CSS Filters"
4038
  msgstr ""
4039
 
@@ -4046,8 +4064,8 @@ msgstr ""
4046
  #: widgets/premium-grid.php:2107 widgets/premium-image-button.php:793
4047
  #: widgets/premium-image-button.php:1043 widgets/premium-image-scroll.php:784
4048
  #: widgets/premium-image-scroll.php:848 widgets/premium-image-separator.php:689
4049
- #: widgets/premium-lottie.php:638 widgets/premium-person.php:1110
4050
- #: widgets/premium-person.php:1478 widgets/premium-pricing-table.php:2273
4051
  #: widgets/premium-pricing-table.php:2378 widgets/premium-testimonials.php:708
4052
  #: widgets/premium-title.php:1320
4053
  msgid "Advanced Border Radius"
@@ -4062,15 +4080,15 @@ msgstr ""
4062
  #: widgets/premium-grid.php:2109 widgets/premium-image-button.php:795
4063
  #: widgets/premium-image-button.php:1045 widgets/premium-image-scroll.php:786
4064
  #: widgets/premium-image-scroll.php:850 widgets/premium-image-separator.php:691
4065
- #: widgets/premium-lottie.php:640 widgets/premium-person.php:1112
4066
- #: widgets/premium-person.php:1480 widgets/premium-pricing-table.php:2275
4067
  #: widgets/premium-pricing-table.php:2380 widgets/premium-testimonials.php:710
4068
  #: widgets/premium-title.php:1322
4069
  msgid "Apply custom radius values. Get the radius value from "
4070
  msgstr ""
4071
 
4072
  #: widgets/premium-banner.php:818 widgets/premium-dual-header.php:1030
4073
- #: widgets/premium-image-scroll.php:718 widgets/premium-person.php:1166
4074
  #: widgets/premium-title.php:1468
4075
  msgid "Blend Mode"
4076
  msgstr ""
@@ -4103,7 +4121,7 @@ msgstr ""
4103
 
4104
  #: widgets/premium-banner.php:1034 widgets/premium-blog.php:1947
4105
  #: widgets/premium-icon-list.php:1010 widgets/premium-image-separator.php:656
4106
- #: widgets/premium-person.php:1441
4107
  msgid "Hover Background Color"
4108
  msgstr ""
4109
 
@@ -4263,8 +4281,8 @@ msgstr ""
4263
  msgid "Author"
4264
  msgstr ""
4265
 
4266
- #: widgets/premium-blog.php:508 widgets/premium-person.php:435
4267
- #: widgets/premium-person.php:716 widgets/premium-person.php:1192
4268
  #: widgets/premium-testimonials.php:163 widgets/premium-testimonials.php:250
4269
  msgid "Name"
4270
  msgstr ""
@@ -4588,7 +4606,7 @@ msgstr ""
4588
  msgid "Fade"
4589
  msgstr ""
4590
 
4591
- #: widgets/premium-blog.php:1212 widgets/premium-person.php:1002
4592
  msgid "Auto Play"
4593
  msgstr ""
4594
 
@@ -4597,7 +4615,7 @@ msgid "Slides To Scroll"
4597
  msgstr ""
4598
 
4599
  #: widgets/premium-blog.php:1237 widgets/premium-carousel.php:431
4600
- #: widgets/premium-person.php:1015
4601
  msgid ""
4602
  "Autoplay Speed means at which time the next slide should come. Set a value "
4603
  "in milliseconds (ms)"
@@ -4649,7 +4667,7 @@ msgstr ""
4649
  #: widgets/premium-grid.php:1288 widgets/premium-icon-list.php:953
4650
  #: widgets/premium-image-button.php:660 widgets/premium-image-separator.php:554
4651
  #: widgets/premium-maps.php:551 widgets/premium-modalbox.php:832
4652
- #: widgets/premium-person.php:1068 widgets/premium-videobox.php:1400
4653
  msgid "Getting started »"
4654
  msgstr ""
4655
 
@@ -5260,7 +5278,7 @@ msgstr ""
5260
  msgid "How to create an Elementor template to be used in Carousel widget »"
5261
  msgstr ""
5262
 
5263
- #: widgets/premium-carousel.php:569 widgets/premium-person.php:1077
5264
  #: widgets/premium-testimonials.php:336
5265
  msgid "I'm not able to see Font Awesome icons in the widget »"
5266
  msgstr ""
@@ -5863,8 +5881,8 @@ msgstr ""
5863
  msgid "Designer"
5864
  msgstr ""
5865
 
5866
- #: widgets/premium-fancytext.php:186 widgets/premium-person.php:450
5867
- #: widgets/premium-person.php:731
5868
  msgid "Developer"
5869
  msgstr ""
5870
 
@@ -6124,8 +6142,8 @@ msgstr ""
6124
  msgid "Video"
6125
  msgstr ""
6126
 
6127
- #: widgets/premium-grid.php:670 widgets/premium-person.php:532
6128
- #: widgets/premium-person.php:813
6129
  msgid "YouTube"
6130
  msgstr ""
6131
 
@@ -6298,8 +6316,8 @@ msgstr ""
6298
  msgid "Dark Square"
6299
  msgstr ""
6300
 
6301
- #: widgets/premium-grid.php:1197 widgets/premium-person.php:478
6302
- #: widgets/premium-person.php:759
6303
  msgid "Facebook"
6304
  msgstr ""
6305
 
@@ -7126,107 +7144,117 @@ msgstr ""
7126
  msgid "Members/Row"
7127
  msgstr ""
7128
 
 
 
 
 
 
 
7129
  #: widgets/premium-person.php:412
 
 
 
 
7130
  msgid "Single Member Settings"
7131
  msgstr ""
7132
 
7133
- #: widgets/premium-person.php:461 widgets/premium-person.php:742
7134
  msgid "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
7135
  msgstr ""
7136
 
7137
- #: widgets/premium-person.php:468 widgets/premium-person.php:749
7138
  msgid "Enable Social Icons"
7139
  msgstr ""
7140
 
7141
- #: widgets/premium-person.php:492 widgets/premium-person.php:773
7142
  msgid "Twitter"
7143
  msgstr ""
7144
 
7145
- #: widgets/premium-person.php:506 widgets/premium-person.php:787
7146
  msgid "LinkedIn"
7147
  msgstr ""
7148
 
7149
- #: widgets/premium-person.php:519 widgets/premium-person.php:800
7150
  msgid "Google+"
7151
  msgstr ""
7152
 
7153
- #: widgets/premium-person.php:545 widgets/premium-person.php:826
7154
  msgid "Instagram"
7155
  msgstr ""
7156
 
7157
- #: widgets/premium-person.php:559 widgets/premium-person.php:840
7158
  msgid "Skype"
7159
  msgstr ""
7160
 
7161
- #: widgets/premium-person.php:572 widgets/premium-person.php:853
7162
  msgid "Pinterest"
7163
  msgstr ""
7164
 
7165
- #: widgets/premium-person.php:585 widgets/premium-person.php:866
7166
  msgid "Dribbble"
7167
  msgstr ""
7168
 
7169
- #: widgets/premium-person.php:599 widgets/premium-person.php:880
7170
  msgid "Behance"
7171
  msgstr ""
7172
 
7173
- #: widgets/premium-person.php:612 widgets/premium-person.php:893
7174
  msgid "WhatsApp"
7175
  msgstr ""
7176
 
7177
- #: widgets/premium-person.php:625 widgets/premium-person.php:906
7178
  msgid "Telegram"
7179
  msgstr ""
7180
 
7181
- #: widgets/premium-person.php:638 widgets/premium-person.php:919
7182
  msgid "Email Address"
7183
  msgstr ""
7184
 
7185
- #: widgets/premium-person.php:651 widgets/premium-person.php:932
7186
  msgid "Website"
7187
  msgstr ""
7188
 
7189
- #: widgets/premium-person.php:664 widgets/premium-person.php:945
7190
  msgid "Phone Number"
7191
  msgstr ""
7192
 
7193
- #: widgets/premium-person.php:667 widgets/premium-person.php:948
7194
  msgid "Example: tel: +012 345 678 910"
7195
  msgstr ""
7196
 
7197
- #: widgets/premium-person.php:678 widgets/premium-person.php:959
7198
  msgid "Please note that Phone Number icon will show only on mobile devices."
7199
  msgstr ""
7200
 
7201
- #: widgets/premium-person.php:692
7202
  msgid "Multiple Members Settings"
7203
  msgstr ""
7204
 
7205
- #: widgets/premium-person.php:971
7206
  msgid "Members"
7207
  msgstr ""
7208
 
7209
- #: widgets/premium-person.php:1247
7210
  msgid "Job Title"
7211
  msgstr ""
7212
 
7213
- #: widgets/premium-person.php:1369
7214
  msgid "Social Icons"
7215
  msgstr ""
7216
 
7217
- #: widgets/premium-person.php:1432
7218
  msgid "Brands Default Colors"
7219
  msgstr ""
7220
 
7221
- #: widgets/premium-person.php:1548
7222
  msgid "Bottom Offset"
7223
  msgstr ""
7224
 
7225
- #: widgets/premium-person.php:1574
7226
  msgid "Transition Duration (sec)"
7227
  msgstr ""
7228
 
7229
- #: widgets/premium-person.php:1671
7230
  msgid "Background Hover Color"
7231
  msgstr ""
7232
 
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Premium Addons for Elementor\n"
5
+ "POT-Creation-Date: 2021-12-06 11:42+0200\n"
6
  "PO-Revision-Date: 2018-02-15 10:41+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Leap13\n"
116
  msgid "Get PRO"
117
  msgstr ""
118
 
119
+ #: admin/includes/admin-notices.php:147
120
  msgid ""
121
  "Premium Addons for Elementor is not working because you need to Install "
122
  "Elementor plugin."
123
  msgstr ""
124
 
125
+ #: admin/includes/admin-notices.php:149
126
  msgid "Install Now"
127
  msgstr ""
128
 
129
+ #: admin/includes/admin-notices.php:158
130
  msgid ""
131
  "Premium Addons for Elementor is not working because you need to activate "
132
  "Elementor plugin."
133
  msgstr ""
134
 
135
+ #: admin/includes/admin-notices.php:160
136
  msgid "Activate Now"
137
  msgstr ""
138
 
139
+ #: admin/includes/admin-notices.php:177
140
  msgid ""
141
  "Can we take only 2 minutes of your time? We would be really grateful it if "
142
  "you give "
143
  msgstr ""
144
 
145
+ #: admin/includes/admin-notices.php:178
146
  msgid "Premium Addons for Elementor"
147
  msgstr ""
148
 
149
+ #: admin/includes/admin-notices.php:180
150
  msgid "Leave a Review"
151
  msgstr ""
152
 
153
+ #: admin/includes/admin-notices.php:181
154
  msgid "I Already Did"
155
  msgstr ""
156
 
157
+ #: admin/includes/admin-notices.php:182
158
  msgid "Maybe Later"
159
  msgstr ""
160
 
 
 
 
 
 
 
 
 
161
  #: admin/includes/duplicator.php:77
162
  msgid "PA Duplicate"
163
  msgstr ""
180
  #: modules/woocommerce/widgets/woo-products.php:168
181
  #: modules/woocommerce/widgets/woo-products.php:1115
182
  #: widgets/premium-blog.php:1179 widgets/premium-carousel.php:57
183
+ #: widgets/premium-carousel.php:158 widgets/premium-person.php:1020
184
+ #: widgets/premium-person.php:1633
185
  msgid "Carousel"
186
  msgstr ""
187
 
1650
  msgid "Status"
1651
  msgstr ""
1652
 
1653
+ #: includes/pa-display-conditions/conditions/woo-orders.php:39
1654
+ msgid "In Cart"
1655
+ msgstr ""
1656
+
1657
+ #: includes/pa-display-conditions/conditions/woo-orders.php:40
1658
+ msgid "Purchased"
1659
+ msgstr ""
1660
+
1661
+ #: includes/pa-display-conditions/conditions/woo-orders.php:59
1662
  msgid "Number of Items"
1663
  msgstr ""
1664
 
1665
+ #: includes/pa-display-conditions/conditions/woo-orders.php:62
1666
  msgid ""
1667
  "Enter 0 to check if empty. Any other value will be the minimum number of "
1668
  "items to check."
1669
  msgstr ""
1670
 
1671
  #: includes/pa-display-conditions/conditions/woo-product-price.php:33
1672
+ #: includes/pa-display-conditions/conditions/woo-total-price.php:59
1673
  msgid "Equal or Higher than"
1674
  msgstr ""
1675
 
1677
  msgid "Set the minimum price of the product to be checked."
1678
  msgstr ""
1679
 
1680
+ #: includes/pa-display-conditions/conditions/woo-total-price.php:34
1681
+ #: modules/woocommerce/widgets/woo-products.php:476
1682
+ #: widgets/premium-blog.php:318 widgets/premium-videobox.php:217
1683
+ msgid "Source"
1684
+ msgstr ""
1685
+
1686
+ #: includes/pa-display-conditions/conditions/woo-total-price.php:37
1687
+ msgid "Subtotal Amount"
1688
+ msgstr ""
1689
+
1690
+ #: includes/pa-display-conditions/conditions/woo-total-price.php:38
1691
+ msgid "Total Amount"
1692
+ msgstr ""
1693
+
1694
+ #: includes/pa-display-conditions/conditions/woo-total-price.php:61
1695
+ msgid "Set the minimum amount in the cart to be checked."
1696
+ msgstr ""
1697
+
1698
  #: includes/pa-display-conditions/pa-controls-handler.php:84
1699
  msgid "System"
1700
  msgstr ""
1892
  msgid "Last Purchase In Cart"
1893
  msgstr ""
1894
 
1895
+ #: modules/pa-display-conditions/module.php:98
1896
+ msgid "Amount In Cart"
1897
+ msgstr ""
1898
+
1899
+ #: modules/pa-display-conditions/module.php:110
1900
  msgid "Enable Display Conditions"
1901
  msgstr ""
1902
 
1903
+ #: modules/pa-display-conditions/module.php:122
1904
  msgid "Action"
1905
  msgstr ""
1906
 
1907
+ #: modules/pa-display-conditions/module.php:126
1908
  msgid "Show Element"
1909
  msgstr ""
1910
 
1911
+ #: modules/pa-display-conditions/module.php:127
1912
  msgid "Hide Element"
1913
  msgstr ""
1914
 
1915
+ #: modules/pa-display-conditions/module.php:138
1916
  msgid "Display When"
1917
  msgstr ""
1918
 
1919
+ #: modules/pa-display-conditions/module.php:142
1920
  msgid "All Conditions Are Met"
1921
  msgstr ""
1922
 
1923
+ #: modules/pa-display-conditions/module.php:143
1924
  msgid "Any Condition is Met"
1925
  msgstr ""
1926
 
1927
+ #: modules/pa-display-conditions/module.php:156
1928
  #: modules/woocommerce/skins/skin-1.php:699
1929
  #: modules/woocommerce/skins/skin-2.php:724
1930
  #: modules/woocommerce/skins/skin-3.php:723
1938
  msgid "Type"
1939
  msgstr ""
1940
 
1941
+ #: modules/pa-display-conditions/module.php:186
1942
  msgid "This option is available in Premium Addons Pro."
1943
  msgstr ""
1944
 
1945
+ #: modules/pa-display-conditions/module.php:186
1946
  #: modules/premium-section-floating-effects/module.php:195
1947
  msgid "Upgrade now!"
1948
  msgstr ""
1949
 
1950
+ #: modules/pa-display-conditions/module.php:203
1951
  msgid "Is"
1952
  msgstr ""
1953
 
1954
+ #: modules/pa-display-conditions/module.php:204
1955
  msgid "Is Not"
1956
  msgstr ""
1957
 
1958
+ #: modules/pa-display-conditions/module.php:222
1959
  msgid "Local Time"
1960
  msgstr ""
1961
 
1962
+ #: modules/pa-display-conditions/module.php:223
1963
  msgid "Server Timezone"
1964
  msgstr ""
1965
 
1966
+ #: modules/pa-display-conditions/module.php:234
1967
  msgid "Conditions"
1968
  msgstr ""
1969
 
2180
  #: widgets/premium-modalbox.php:990 widgets/premium-modalbox.php:1087
2181
  #: widgets/premium-modalbox.php:1183 widgets/premium-modalbox.php:1248
2182
  #: widgets/premium-modalbox.php:1300 widgets/premium-modalbox.php:1417
2183
+ #: widgets/premium-modalbox.php:1475 widgets/premium-person.php:1448
2184
+ #: widgets/premium-person.php:1563 widgets/premium-person.php:1684
2185
  #: widgets/premium-pricing-table.php:991 widgets/premium-pricing-table.php:1809
2186
  #: widgets/premium-pricing-table.php:2175
2187
  #: widgets/premium-pricing-table.php:2193 widgets/premium-progressbar.php:1048
2268
  #: widgets/premium-image-scroll.php:754 widgets/premium-lottie.php:520
2269
  #: widgets/premium-modalbox.php:412 widgets/premium-modalbox.php:980
2270
  #: widgets/premium-modalbox.php:1230 widgets/premium-modalbox.php:1396
2271
+ #: widgets/premium-person.php:1196 widgets/premium-pricing-table.php:1979
2272
  #: widgets/premium-pricing-table.php:2234 widgets/premium-title.php:956
2273
  #: widgets/premium-title.php:1471 widgets/premium-videobox.php:710
2274
  #: widgets/premium-vscroll.php:462 widgets/premium-vscroll.php:857
2402
  #: widgets/premium-icon-list.php:197 widgets/premium-image-scroll.php:168
2403
  #: widgets/premium-image-scroll.php:608 widgets/premium-image-separator.php:160
2404
  #: widgets/premium-image-separator.php:185 widgets/premium-modalbox.php:452
2405
+ #: widgets/premium-modalbox.php:646 widgets/premium-person.php:449
2406
+ #: widgets/premium-person.php:731 widgets/premium-person.php:1114
2407
  #: widgets/premium-pricing-table.php:167 widgets/premium-pricing-table.php:392
2408
  #: widgets/premium-testimonials.php:134 widgets/premium-testimonials.php:352
2409
  #: widgets/premium-title.php:204 widgets/premium-videobox.php:1205
2609
  #: widgets/premium-maps.php:618 widgets/premium-maps.php:706
2610
  #: widgets/premium-maps.php:795 widgets/premium-modalbox.php:1037
2611
  #: widgets/premium-modalbox.php:1336 widgets/premium-modalbox.php:1514
2612
+ #: widgets/premium-modalbox.php:1676 widgets/premium-person.php:1260
2613
+ #: widgets/premium-person.php:1327 widgets/premium-person.php:1382
2614
+ #: widgets/premium-person.php:1541 widgets/premium-person.php:1619
2615
+ #: widgets/premium-person.php:1724 widgets/premium-pricing-table.php:1005
2616
  #: widgets/premium-pricing-table.php:1103
2617
  #: widgets/premium-pricing-table.php:1188
2618
  #: widgets/premium-pricing-table.php:1534
2649
  #: widgets/premium-grid.php:799 widgets/premium-grid.php:1491
2650
  #: widgets/premium-icon-list.php:170 widgets/premium-icon-list.php:1269
2651
  #: widgets/premium-maps.php:326 widgets/premium-maps.php:572
2652
+ #: widgets/premium-modalbox.php:294 widgets/premium-person.php:474
2653
+ #: widgets/premium-person.php:755 widgets/premium-pricing-table.php:247
2654
  #: widgets/premium-pricing-table.php:890 widgets/premium-pricing-table.php:1124
2655
  #: widgets/premium-progressbar.php:255 widgets/premium-progressbar.php:748
2656
  #: widgets/premium-title.php:153 widgets/premium-title.php:160
2746
  #: widgets/premium-modalbox.php:894 widgets/premium-modalbox.php:1160
2747
  #: widgets/premium-modalbox.php:1237 widgets/premium-modalbox.php:1289
2748
  #: widgets/premium-modalbox.php:1403 widgets/premium-modalbox.php:1461
2749
+ #: widgets/premium-person.php:1227 widgets/premium-person.php:1282
2750
+ #: widgets/premium-person.php:1349 widgets/premium-person.php:1420
2751
+ #: widgets/premium-person.php:1644 widgets/premium-pricing-table.php:956
2752
  #: widgets/premium-pricing-table.php:1135
2753
  #: widgets/premium-pricing-table.php:1228
2754
  #: widgets/premium-pricing-table.php:1273
2779
  #: widgets/premium-blog.php:1861 widgets/premium-blog.php:1925
2780
  #: widgets/premium-blog.php:2379 widgets/premium-icon-list.php:1155
2781
  #: widgets/premium-icon-list.php:1312 widgets/premium-image-separator.php:621
2782
+ #: widgets/premium-modalbox.php:911 widgets/premium-person.php:1434
2783
+ #: widgets/premium-person.php:1658 widgets/premium-videobox.php:1554
2784
  #: widgets/premium-videobox.php:1682
2785
  msgid "Hover Color"
2786
  msgstr ""
2833
  #: widgets/premium-image-button.php:849 widgets/premium-image-button.php:1115
2834
  #: widgets/premium-maps.php:605 widgets/premium-maps.php:694
2835
  #: widgets/premium-maps.php:783 widgets/premium-modalbox.php:1664
2836
+ #: widgets/premium-person.php:1315 widgets/premium-person.php:1529
2837
  #: widgets/premium-pricing-table.php:1083
2838
  #: widgets/premium-pricing-table.php:1169
2839
  #: widgets/premium-pricing-table.php:1253
2921
  #: widgets/premium-banner.php:443 widgets/premium-banner.php:916
2922
  #: widgets/premium-grid.php:812 widgets/premium-grid.php:1524
2923
  #: widgets/premium-maps.php:336 widgets/premium-maps.php:661
2924
+ #: widgets/premium-person.php:485 widgets/premium-person.php:766
2925
+ #: widgets/premium-person.php:1341 widgets/premium-pricing-table.php:586
2926
  #: widgets/premium-pricing-table.php:596 widgets/premium-pricing-table.php:917
2927
  #: widgets/premium-pricing-table.php:1833 widgets/premium-videobox.php:1299
2928
  msgid "Description"
3020
  #: widgets/premium-modalbox.php:1018 widgets/premium-modalbox.php:1116
3021
  #: widgets/premium-modalbox.php:1267 widgets/premium-modalbox.php:1319
3022
  #: widgets/premium-modalbox.php:1439 widgets/premium-modalbox.php:1497
3023
+ #: widgets/premium-modalbox.php:1644 widgets/premium-person.php:1122
3024
+ #: widgets/premium-person.php:1149 widgets/premium-person.php:1490
3025
+ #: widgets/premium-person.php:1514 widgets/premium-person.php:1712
3026
  #: widgets/premium-pricing-table.php:1029
3027
  #: widgets/premium-pricing-table.php:1071
3028
  #: widgets/premium-pricing-table.php:1687
3186
  #: widgets/premium-icon-list.php:429 widgets/premium-icon-list.php:1107
3187
  #: widgets/premium-image-button.php:585 widgets/premium-lottie.php:291
3188
  #: widgets/premium-maps.php:263 widgets/premium-modalbox.php:727
3189
+ #: widgets/premium-modalbox.php:1216 widgets/premium-person.php:1407
3190
+ #: widgets/premium-person.php:1672 widgets/premium-pricing-table.php:708
3191
  #: widgets/premium-pricing-table.php:729 widgets/premium-pricing-table.php:750
3192
  #: widgets/premium-pricing-table.php:974 widgets/premium-pricing-table.php:1616
3193
  #: widgets/premium-progressbar.php:214 widgets/premium-progressbar.php:941
3480
  msgstr ""
3481
 
3482
  #: modules/woocommerce/widgets/woo-products.php:294
3483
+ #: widgets/premium-blog.php:1302 widgets/premium-person.php:1056
3484
  msgid "Arrows Position"
3485
  msgstr ""
3486
 
3539
 
3540
  #: modules/woocommerce/widgets/woo-products.php:458
3541
  #: widgets/premium-blog.php:1236 widgets/premium-carousel.php:430
3542
+ #: widgets/premium-person.php:1041
3543
  msgid "Autoplay Speed"
3544
  msgstr ""
3545
 
3548
  msgid "Query"
3549
  msgstr ""
3550
 
 
 
 
 
 
3551
  #: modules/woocommerce/widgets/woo-products.php:486
3552
  msgid "Category Filter Rule"
3553
  msgstr ""
3950
 
3951
  #: widgets/premium-banner.php:395 widgets/premium-carousel.php:196
3952
  #: widgets/premium-modalbox.php:165 widgets/premium-modalbox.php:309
3953
+ #: widgets/premium-modalbox.php:331 widgets/premium-person.php:1555
3954
  #: widgets/premium-testimonials.php:311 widgets/premium-testimonials.php:536
3955
  #: widgets/premium-vscroll.php:162
3956
  msgid "Content"
4021
  #: widgets/premium-image-button.php:655 widgets/premium-image-scroll.php:588
4022
  #: widgets/premium-image-separator.php:550 widgets/premium-lottie.php:476
4023
  #: widgets/premium-maps.php:541 widgets/premium-modalbox.php:827
4024
+ #: widgets/premium-person.php:1084 widgets/premium-progressbar.php:567
4025
  #: widgets/premium-testimonials.php:331 widgets/premium-videobox.php:1395
4026
  #: widgets/premium-vscroll.php:562
4027
  msgid "Helpful Documentations"
4051
 
4052
  #: widgets/premium-banner.php:763 widgets/premium-blog.php:1700
4053
  #: widgets/premium-grid.php:1448 widgets/premium-image-separator.php:592
4054
+ #: widgets/premium-modalbox.php:883 widgets/premium-person.php:1174
4055
  msgid "Hover CSS Filters"
4056
  msgstr ""
4057
 
4064
  #: widgets/premium-grid.php:2107 widgets/premium-image-button.php:793
4065
  #: widgets/premium-image-button.php:1043 widgets/premium-image-scroll.php:784
4066
  #: widgets/premium-image-scroll.php:848 widgets/premium-image-separator.php:689
4067
+ #: widgets/premium-lottie.php:638 widgets/premium-person.php:1137
4068
+ #: widgets/premium-person.php:1505 widgets/premium-pricing-table.php:2273
4069
  #: widgets/premium-pricing-table.php:2378 widgets/premium-testimonials.php:708
4070
  #: widgets/premium-title.php:1320
4071
  msgid "Advanced Border Radius"
4080
  #: widgets/premium-grid.php:2109 widgets/premium-image-button.php:795
4081
  #: widgets/premium-image-button.php:1045 widgets/premium-image-scroll.php:786
4082
  #: widgets/premium-image-scroll.php:850 widgets/premium-image-separator.php:691
4083
+ #: widgets/premium-lottie.php:640 widgets/premium-person.php:1139
4084
+ #: widgets/premium-person.php:1507 widgets/premium-pricing-table.php:2275
4085
  #: widgets/premium-pricing-table.php:2380 widgets/premium-testimonials.php:710
4086
  #: widgets/premium-title.php:1322
4087
  msgid "Apply custom radius values. Get the radius value from "
4088
  msgstr ""
4089
 
4090
  #: widgets/premium-banner.php:818 widgets/premium-dual-header.php:1030
4091
+ #: widgets/premium-image-scroll.php:718 widgets/premium-person.php:1193
4092
  #: widgets/premium-title.php:1468
4093
  msgid "Blend Mode"
4094
  msgstr ""
4121
 
4122
  #: widgets/premium-banner.php:1034 widgets/premium-blog.php:1947
4123
  #: widgets/premium-icon-list.php:1010 widgets/premium-image-separator.php:656
4124
+ #: widgets/premium-person.php:1468
4125
  msgid "Hover Background Color"
4126
  msgstr ""
4127
 
4281
  msgid "Author"
4282
  msgstr ""
4283
 
4284
+ #: widgets/premium-blog.php:508 widgets/premium-person.php:462
4285
+ #: widgets/premium-person.php:743 widgets/premium-person.php:1219
4286
  #: widgets/premium-testimonials.php:163 widgets/premium-testimonials.php:250
4287
  msgid "Name"
4288
  msgstr ""
4606
  msgid "Fade"
4607
  msgstr ""
4608
 
4609
+ #: widgets/premium-blog.php:1212 widgets/premium-person.php:1029
4610
  msgid "Auto Play"
4611
  msgstr ""
4612
 
4615
  msgstr ""
4616
 
4617
  #: widgets/premium-blog.php:1237 widgets/premium-carousel.php:431
4618
+ #: widgets/premium-person.php:1042
4619
  msgid ""
4620
  "Autoplay Speed means at which time the next slide should come. Set a value "
4621
  "in milliseconds (ms)"
4667
  #: widgets/premium-grid.php:1288 widgets/premium-icon-list.php:953
4668
  #: widgets/premium-image-button.php:660 widgets/premium-image-separator.php:554
4669
  #: widgets/premium-maps.php:551 widgets/premium-modalbox.php:832
4670
+ #: widgets/premium-person.php:1095 widgets/premium-videobox.php:1400
4671
  msgid "Getting started »"
4672
  msgstr ""
4673
 
5278
  msgid "How to create an Elementor template to be used in Carousel widget »"
5279
  msgstr ""
5280
 
5281
+ #: widgets/premium-carousel.php:569 widgets/premium-person.php:1104
5282
  #: widgets/premium-testimonials.php:336
5283
  msgid "I'm not able to see Font Awesome icons in the widget »"
5284
  msgstr ""
5881
  msgid "Designer"
5882
  msgstr ""
5883
 
5884
+ #: widgets/premium-fancytext.php:186 widgets/premium-person.php:477
5885
+ #: widgets/premium-person.php:758
5886
  msgid "Developer"
5887
  msgstr ""
5888
 
6142
  msgid "Video"
6143
  msgstr ""
6144
 
6145
+ #: widgets/premium-grid.php:670 widgets/premium-person.php:559
6146
+ #: widgets/premium-person.php:840
6147
  msgid "YouTube"
6148
  msgstr ""
6149
 
6316
  msgid "Dark Square"
6317
  msgstr ""
6318
 
6319
+ #: widgets/premium-grid.php:1197 widgets/premium-person.php:505
6320
+ #: widgets/premium-person.php:786
6321
  msgid "Facebook"
6322
  msgstr ""
6323
 
7144
  msgid "Members/Row"
7145
  msgstr ""
7146
 
7147
+ #: widgets/premium-person.php:401
7148
+ msgid ""
7149
+ "This option searches for the image with the largest height and applies that "
7150
+ "height to the other images"
7151
+ msgstr ""
7152
+
7153
  #: widgets/premium-person.php:412
7154
+ msgid "Custom Height"
7155
+ msgstr ""
7156
+
7157
+ #: widgets/premium-person.php:439
7158
  msgid "Single Member Settings"
7159
  msgstr ""
7160
 
7161
+ #: widgets/premium-person.php:488 widgets/premium-person.php:769
7162
  msgid "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
7163
  msgstr ""
7164
 
7165
+ #: widgets/premium-person.php:495 widgets/premium-person.php:776
7166
  msgid "Enable Social Icons"
7167
  msgstr ""
7168
 
7169
+ #: widgets/premium-person.php:519 widgets/premium-person.php:800
7170
  msgid "Twitter"
7171
  msgstr ""
7172
 
7173
+ #: widgets/premium-person.php:533 widgets/premium-person.php:814
7174
  msgid "LinkedIn"
7175
  msgstr ""
7176
 
7177
+ #: widgets/premium-person.php:546 widgets/premium-person.php:827
7178
  msgid "Google+"
7179
  msgstr ""
7180
 
7181
+ #: widgets/premium-person.php:572 widgets/premium-person.php:853
7182
  msgid "Instagram"
7183
  msgstr ""
7184
 
7185
+ #: widgets/premium-person.php:586 widgets/premium-person.php:867
7186
  msgid "Skype"
7187
  msgstr ""
7188
 
7189
+ #: widgets/premium-person.php:599 widgets/premium-person.php:880
7190
  msgid "Pinterest"
7191
  msgstr ""
7192
 
7193
+ #: widgets/premium-person.php:612 widgets/premium-person.php:893
7194
  msgid "Dribbble"
7195
  msgstr ""
7196
 
7197
+ #: widgets/premium-person.php:626 widgets/premium-person.php:907
7198
  msgid "Behance"
7199
  msgstr ""
7200
 
7201
+ #: widgets/premium-person.php:639 widgets/premium-person.php:920
7202
  msgid "WhatsApp"
7203
  msgstr ""
7204
 
7205
+ #: widgets/premium-person.php:652 widgets/premium-person.php:933
7206
  msgid "Telegram"
7207
  msgstr ""
7208
 
7209
+ #: widgets/premium-person.php:665 widgets/premium-person.php:946
7210
  msgid "Email Address"
7211
  msgstr ""
7212
 
7213
+ #: widgets/premium-person.php:678 widgets/premium-person.php:959
7214
  msgid "Website"
7215
  msgstr ""
7216
 
7217
+ #: widgets/premium-person.php:691 widgets/premium-person.php:972
7218
  msgid "Phone Number"
7219
  msgstr ""
7220
 
7221
+ #: widgets/premium-person.php:694 widgets/premium-person.php:975
7222
  msgid "Example: tel: +012 345 678 910"
7223
  msgstr ""
7224
 
7225
+ #: widgets/premium-person.php:705 widgets/premium-person.php:986
7226
  msgid "Please note that Phone Number icon will show only on mobile devices."
7227
  msgstr ""
7228
 
7229
+ #: widgets/premium-person.php:719
7230
  msgid "Multiple Members Settings"
7231
  msgstr ""
7232
 
7233
+ #: widgets/premium-person.php:998
7234
  msgid "Members"
7235
  msgstr ""
7236
 
7237
+ #: widgets/premium-person.php:1274
7238
  msgid "Job Title"
7239
  msgstr ""
7240
 
7241
+ #: widgets/premium-person.php:1396
7242
  msgid "Social Icons"
7243
  msgstr ""
7244
 
7245
+ #: widgets/premium-person.php:1459
7246
  msgid "Brands Default Colors"
7247
  msgstr ""
7248
 
7249
+ #: widgets/premium-person.php:1575
7250
  msgid "Bottom Offset"
7251
  msgstr ""
7252
 
7253
+ #: widgets/premium-person.php:1601
7254
  msgid "Transition Duration (sec)"
7255
  msgstr ""
7256
 
7257
+ #: widgets/premium-person.php:1698
7258
  msgid "Background Hover Color"
7259
  msgstr ""
7260
 
modules/pa-display-conditions/module.php CHANGED
@@ -92,9 +92,11 @@ class Module {
92
  'options' => array(
93
  'woo_product_cat' => __( 'Current Product Category', 'premium-addons-for-elementor' ),
94
  'woo_product_price' => __( 'Current Product Price', 'premium-addons-for-elementor' ),
 
95
  'woo_orders' => __( 'Purchased/In Cart Orders', 'premium-addons-for-elementor' ),
96
  'woo_category' => __( 'Categories In Cart', 'premium-addons-for-elementor' ),
97
  'woo_last_purchase' => __( 'Last Purchase In Cart', 'premium-addons-for-elementor' ),
 
98
  ),
99
  ),
100
  )
@@ -167,8 +169,10 @@ class Module {
167
  'woo_orders',
168
  'woo_category',
169
  'woo_product_price',
 
170
  'woo_product_cat',
171
  'woo_last_purchase',
 
172
  'acf_choice',
173
  'acf_text',
174
  'acf_boolean',
@@ -189,6 +193,8 @@ class Module {
189
  )
190
  );
191
 
 
 
192
  $repeater->add_control(
193
  'pa_condition_operator',
194
  array(
@@ -205,7 +211,7 @@ class Module {
205
  )
206
  );
207
 
208
- $controls_obj->add_repeater_controls( $repeater );
209
 
210
  $repeater->add_control(
211
  'pa_condition_timezone',
92
  'options' => array(
93
  'woo_product_cat' => __( 'Current Product Category', 'premium-addons-for-elementor' ),
94
  'woo_product_price' => __( 'Current Product Price', 'premium-addons-for-elementor' ),
95
+ 'woo_product_stock' => __( 'Current Product Stock', 'premium-addons-for-elementor' ),
96
  'woo_orders' => __( 'Purchased/In Cart Orders', 'premium-addons-for-elementor' ),
97
  'woo_category' => __( 'Categories In Cart', 'premium-addons-for-elementor' ),
98
  'woo_last_purchase' => __( 'Last Purchase In Cart', 'premium-addons-for-elementor' ),
99
+ 'woo_total_price' => __( 'Amount In Cart', 'premium-addons-for-elementor' ),
100
  ),
101
  ),
102
  )
169
  'woo_orders',
170
  'woo_category',
171
  'woo_product_price',
172
+ 'woo_product_stock',
173
  'woo_product_cat',
174
  'woo_last_purchase',
175
+ 'woo_total_price',
176
  'acf_choice',
177
  'acf_text',
178
  'acf_boolean',
193
  )
194
  );
195
 
196
+ $controls_obj->add_repeater_source_controls( $repeater );
197
+
198
  $repeater->add_control(
199
  'pa_condition_operator',
200
  array(
211
  )
212
  );
213
 
214
+ $controls_obj->add_repeater_compare_controls( $repeater );
215
 
216
  $repeater->add_control(
217
  'pa_condition_timezone',
premium-addons-for-elementor.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: Premium Addons for Elementor
4
- Description: Premium Addons for Elementor plugin includes widgets and addons like Blog Post Grid, Gallery, Carousel, Modal Popup, Google Maps, Pricing Tables, Lottie Animations, Countdown, Testimonials.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 4.7.2
7
  Elementor tested up to: 3.4.8
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.7.2' );
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.1' );
27
 
28
  /*
29
  * Load plugin core file
1
  <?php
2
  /*
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.7.3
7
  Elementor tested up to: 3.4.8
8
  Elementor Pro tested up to: 3.5.2
9
  Author: Leap13
18
  }
19
 
20
  // Define Constants.
21
+ define( 'PREMIUM_ADDONS_VERSION', '4.7.3' );
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.2' );
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.7.2
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -18,10 +18,10 @@ Supercharge your [Elementor Page Builder](https://wordpress.org/plugins/elemento
18
  [**Check Elementor Widgets & Addons Demo Pages**](https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
19
 
20
  ### Useful Links
21
- [Support](https://my.leap13.com/contact-support/) | [Docs](https://premiumaddons.com/docs/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme) | [Video Tutorials](https://www.youtube.com/channel/UCXcJ9BeO2sKKHor7Q9VglTQ) | [Upgrade to Pro](https://premiumaddons.com/pro/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
22
 
23
  ### New: Content Display Conditions
24
- Premium Addons is proudly offering you a professional way to manage your website content with specific conditions which is perfect for marketers and eCommerce websites. You can show/hide content dynamically based on location, browser, operating system, user role, device type, Woocommerce, ACF fields, etc. [Check the demo page](https://premiumaddons.com/elementor-display-conditions/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
25
 
26
  ### New: WooCommerce Products Listing widget
27
  Show off your products in an elegant way using Premium Woo Products Widget for Elementor Page Builder that comes with unlimited customization options. [Check the demo page](https://premiumaddons.com/elementor-woocommerce-products/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
@@ -204,6 +204,13 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
204
 
205
  == Changelog ==
206
 
 
 
 
 
 
 
 
207
  = 4.7.2 =
208
 
209
  - Tweak: Added WooCommerce Current Product Categories and Current Product Price in Display Conditions feature.
5
  Requires at least: 5.0
6
  Tested Up To: 5.8.2
7
  Requires PHP: 5.4
8
+ Stable Tag: 4.7.3
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
18
  [**Check Elementor Widgets & Addons Demo Pages**](https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
19
 
20
  ### Useful Links
21
+ [Support](https://my.leap13.com/contact-support/) | [Docs](https://premiumaddons.com/docs/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme) | [Video Tutorials](https://www.youtube.com/channel/UCXcJ9BeO2sKKHor7Q9VglTQ) | [Facebook Group](https://facebook.com/groups/premiumAddons) | [Upgrade to Pro](https://premiumaddons.com/pro/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
22
 
23
  ### New: Content Display Conditions
24
+ Premium Addons is proudly offering you a professional way to manage your website content with specific conditions which is perfect for marketers and eCommerce websites. You can show/hide content dynamically based on location, browser, operating system, user role, device type, Woocommerce products and cart data, ACF fields, etc. [Check the demo page](https://premiumaddons.com/elementor-display-conditions/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
25
 
26
  ### New: WooCommerce Products Listing widget
27
  Show off your products in an elegant way using Premium Woo Products Widget for Elementor Page Builder that comes with unlimited customization options. [Check the demo page](https://premiumaddons.com/elementor-woocommerce-products/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
204
 
205
  == Changelog ==
206
 
207
+ = 4.7.3 =
208
+
209
+ - Tweak: Added WooCommerce Total Amount In Cart and Current Product Stock options in Display Conditions feature.
210
+ - Tweak: Added Custom Height option for multiple members in Team Members option.
211
+ - Fixed: Compare value is printed while using Display Conditions feature.
212
+ - Fixed: Metadata separator is not removed when more posts are loaded in Blog widget.
213
+
214
  = 4.7.2 =
215
 
216
  - Tweak: Added WooCommerce Current Product Categories and Current Product Price in Display Conditions feature.
widgets/premium-person.php CHANGED
@@ -1,2375 +1,2402 @@
1
- <?php
2
- /**
3
- * Premium Persons.
4
- */
5
-
6
- namespace PremiumAddons\Widgets;
7
-
8
- // Elementor Classes.
9
- use Elementor\Widget_Base;
10
- use Elementor\Utils;
11
- use Elementor\Control_Media;
12
- use Elementor\Controls_Manager;
13
- use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
14
- use Elementor\Repeater;
15
- use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
16
- use Elementor\Group_Control_Image_Size;
17
- use Elementor\Group_Control_Typography;
18
- use Elementor\Group_Control_Css_Filter;
19
- use Elementor\Group_Control_Box_Shadow;
20
- use Elementor\Group_Control_Text_Shadow;
21
- use Elementor\Group_Control_Border;
22
-
23
- // PremiumAddons Classes.
24
- use PremiumAddons\Includes\Helper_Functions;
25
-
26
- if ( ! defined( 'ABSPATH' ) ) {
27
- exit; // If this file is called directly, abort.
28
- }
29
-
30
- /**
31
- * Class Premium_Person
32
- */
33
- class Premium_Person extends Widget_Base {
34
-
35
- /**
36
- * Retrieve Widget Name.
37
- *
38
- * @since 1.0.0
39
- * @access public
40
- */
41
- public function get_name() {
42
- return 'premium-addon-person';
43
- }
44
-
45
- /**
46
- * Retrieve Widget Title.
47
- *
48
- * @since 1.0.0
49
- * @access public
50
- */
51
- public function get_title() {
52
- return sprintf( '%1$s %2$s', Helper_Functions::get_prefix(), __( 'Team Members', 'premium-addons-for-elementor' ) );
53
- }
54
-
55
- /**
56
- * Retrieve Widget Icon.
57
- *
58
- * @since 1.0.0
59
- * @access public
60
- *
61
- * @return string widget icon.
62
- */
63
- public function get_icon() {
64
- return 'pa-person';
65
- }
66
-
67
- /**
68
- * Retrieve Widget Dependent CSS.
69
- *
70
- * @since 1.0.0
71
- * @access public
72
- *
73
- * @return array CSS style handles.
74
- */
75
- public function get_style_depends() {
76
- return array(
77
- 'premium-addons',
78
- );
79
- }
80
-
81
- /**
82
- * Retrieve Widget Dependent JS.
83
- *
84
- * @since 1.0.0
85
- * @access public
86
- *
87
- * @return array JS script handles.
88
- */
89
- public function get_script_depends() {
90
- return array(
91
- 'imagesloaded',
92
- 'pa-slick',
93
- 'premium-addons',
94
- );
95
- }
96
-
97
- /**
98
- * Retrieve Widget Categories.
99
- *
100
- * @since 1.5.1
101
- * @access public
102
- *
103
- * @return array Widget categories.
104
- */
105
- public function get_categories() {
106
- return array( 'premium-elements' );
107
- }
108
-
109
- /**
110
- * Retrieve Widget Keywords.
111
- *
112
- * @since 1.0.0
113
- * @access public
114
- *
115
- * @return string Widget keywords.
116
- */
117
- public function get_keywords() {
118
- return array( 'person', 'carousel', 'slider', 'group' );
119
- }
120
-
121
- /**
122
- * Retrieve Widget Support URL.
123
- *
124
- * @access public
125
- *
126
- * @return string support URL.
127
- */
128
- public function get_custom_help_url() {
129
- return 'https://premiumaddons.com/support/';
130
- }
131
-
132
- /**
133
- * Register Persons controls.
134
- *
135
- * @since 1.0.0
136
- * @access protected
137
- */
138
- protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
139
-
140
- $this->start_controls_section(
141
- 'premium_person_general_settings',
142
- array(
143
- 'label' => __( 'General Settings', 'premium-addons-for-elementor' ),
144
- )
145
- );
146
-
147
- $this->add_control(
148
- 'multiple',
149
- array(
150
- 'label' => __( 'Multiple Member', 'premium-addons-for-elementor' ),
151
- 'description' => __( 'Enable this option if you need to add multiple persons', 'premium-addons-for-elementor' ),
152
- 'type' => Controls_Manager::SWITCHER,
153
- )
154
- );
155
-
156
- $this->add_control(
157
- 'premium_person_style',
158
- array(
159
- 'label' => __( 'Style', 'premium-addons-for-elementor' ),
160
- 'type' => Controls_Manager::SELECT,
161
- 'default' => 'style1',
162
- 'options' => array(
163
- 'style1' => __( 'Style 1', 'premium-addons-for-elementor' ),
164
- 'style2' => __( 'Style 2', 'premium-addons-for-elementor' ),
165
- 'style3' => __( 'Style 3', 'premium-addons-for-elementor' ),
166
- ),
167
- 'label_block' => true,
168
- 'render_type' => 'template',
169
- )
170
- );
171
-
172
- $this->add_control(
173
- 'title_rotate',
174
- array(
175
- 'label' => __( 'Title Rotate', 'premium-addons-for-elementor' ),
176
- 'type' => Controls_Manager::SELECT,
177
- 'options' => array(
178
- 'cw' => __( '90 Degrees', 'premium-addons-for-elementor' ),
179
- 'ccw' => __( '-90 Degrees', 'premium-addons-for-elementor' ),
180
- ),
181
- 'selectors_dictionary' => array(
182
- 'cw' => '90deg',
183
- 'ccw' => '-90deg',
184
- ),
185
- 'default' => 'cw',
186
- 'prefix_class' => 'premium-persons-title-',
187
- 'label_block' => true,
188
- 'condition' => array(
189
- 'premium_person_style' => 'style3',
190
- ),
191
- )
192
- );
193
-
194
- $this->add_group_control(
195
- Group_Control_Image_Size::get_type(),
196
- array(
197
- 'name' => 'thumbnail',
198
- 'default' => 'full',
199
- 'separator' => 'none',
200
- )
201
- );
202
-
203
- $this->add_responsive_control(
204
- 'premium_person_image_width',
205
- array(
206
- 'label' => __( 'Width', 'premium-addons-for-elementor' ),
207
- 'type' => Controls_Manager::SLIDER,
208
- 'description' => __( 'Enter image width in (PX, EM, %), default is 100%', 'premium-addons-for-elementor' ),
209
- 'size_units' => array( 'px', 'em', '%' ),
210
- 'range' => array(
211
- 'px' => array(
212
- 'min' => 1,
213
- 'max' => 800,
214
- ),
215
- 'em' => array(
216
- 'min' => 1,
217
- 'max' => 50,
218
- ),
219
- ),
220
- 'default' => array(
221
- 'unit' => '%',
222
- 'size' => '100',
223
- ),
224
- 'label_block' => true,
225
- 'selectors' => array(
226
- '{{WRAPPER}} .premium-persons-container' => 'width: {{SIZE}}{{UNIT}};',
227
- ),
228
- )
229
- );
230
-
231
- $this->add_responsive_control(
232
- 'premium_person_align',
233
- array(
234
- 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
235
- 'type' => Controls_Manager::CHOOSE,
236
- 'options' => array(
237
- 'flex-start' => array(
238
- 'title' => __( 'Left', 'premium-addons-for-elementor' ),
239
- 'icon' => 'eicon-text-align-left',
240
- ),
241
- 'center' => array(
242
- 'title' => __( 'Center', 'premium-addons-for-elementor' ),
243
- 'icon' => 'eicon-text-align-center',
244
- ),
245
- 'flex-end' => array(
246
- 'title' => __( 'Right', 'premium-addons-for-elementor' ),
247
- 'icon' => 'eicon-text-align-right',
248
- ),
249
- ),
250
- 'default' => 'center',
251
- 'selectors' => array(
252
- '{{WRAPPER}} .elementor-widget-container' => 'justify-content: {{VALUE}};',
253
- ),
254
- )
255
- );
256
-
257
- $this->add_control(
258
- 'premium_person_hover_image_effect',
259
- array(
260
- 'label' => __( 'Hover Effect', 'premium-addons-for-elementor' ),
261
- 'type' => Controls_Manager::SELECT,
262
- 'options' => array(
263
- 'none' => __( 'None', 'premium-addons-for-elementor' ),
264
- 'zoomin' => __( 'Zoom In', 'premium-addons-for-elementor' ),
265
- 'zoomout' => __( 'Zoom Out', 'premium-addons-for-elementor' ),
266
- 'scale' => __( 'Scale', 'premium-addons-for-elementor' ),
267
- 'grayscale' => __( 'Grayscale', 'premium-addons-for-elementor' ),
268
- 'blur' => __( 'Blur', 'premium-addons-for-elementor' ),
269
- 'bright' => __( 'Bright', 'premium-addons-for-elementor' ),
270
- 'sepia' => __( 'Sepia', 'premium-addons-for-elementor' ),
271
- 'trans' => __( 'Translate', 'premium-addons-for-elementor' ),
272
- ),
273
- 'default' => 'zoomin',
274
- 'label_block' => true,
275
- )
276
- );
277
-
278
- $this->add_responsive_control(
279
- 'premium_person_text_align',
280
- array(
281
- 'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
282
- 'type' => Controls_Manager::CHOOSE,
283
- 'options' => array(
284
- 'left' => array(
285
- 'title' => __( 'Left', 'premium-addons-for-elementor' ),
286
- 'icon' => 'eicon-text-align-left',
287
- ),
288
- 'center' => array(
289
- 'title' => __( 'Center', 'premium-addons-for-elementor' ),
290
- 'icon' => 'eicon-text-align-center',
291
- ),
292
- 'right' => array(
293
- 'title' => __( 'Right', 'premium-addons-for-elementor' ),
294
- 'icon' => 'eicon-text-align-right',
295
- ),
296
- ),
297
- 'default' => 'left',
298
- 'selectors' => array(
299
- '{{WRAPPER}} .premium-person-info' => 'text-align: {{VALUE}};',
300
- ),
301
- )
302
- );
303
-
304
- $this->add_control(
305
- 'premium_person_name_heading',
306
- array(
307
- 'label' => __( 'Name Tag', 'premium-addons-for-elementor' ),
308
- 'type' => Controls_Manager::SELECT,
309
- 'default' => 'h2',
310
- 'options' => array(
311
- 'h1' => 'H1',
312
- 'h2' => 'H2',
313
- 'h3' => 'H3',
314
- 'h4' => 'H4',
315
- 'h5' => 'H5',
316
- 'h6' => 'H6',
317
- 'div' => 'div',
318
- 'span' => 'span',
319
- 'p' => 'p',
320
- ),
321
- 'label_block' => true,
322
- )
323
- );
324
-
325
- $this->add_control(
326
- 'premium_person_title_heading',
327
- array(
328
- 'label' => __( 'Title Tag', 'premium-addons-for-elementor' ),
329
- 'type' => Controls_Manager::SELECT,
330
- 'default' => 'h4',
331
- 'options' => array(
332
- 'h1' => 'H1',
333
- 'h2' => 'H2',
334
- 'h3' => 'H3',
335
- 'h4' => 'H4',
336
- 'h5' => 'H5',
337
- 'h6' => 'H6',
338
- 'div' => 'div',
339
- 'span' => 'span',
340
- 'p' => 'p',
341
- ),
342
- 'label_block' => true,
343
- )
344
- );
345
-
346
- $this->add_responsive_control(
347
- 'persons_per_row',
348
- array(
349
- 'label' => __( 'Members/Row', 'premium-addons-for-elementor' ),
350
- 'type' => Controls_Manager::SELECT,
351
- 'options' => array(
352
- '100%' => __( '1 Column', 'premium-addons-for-elementor' ),
353
- '50%' => __( '2 Columns', 'premium-addons-for-elementor' ),
354
- '33.33%' => __( '3 Columns', 'premium-addons-for-elementor' ),
355
- '25%' => __( '4 Columns', 'premium-addons-for-elementor' ),
356
- '20%' => __( '5 Columns', 'premium-addons-for-elementor' ),
357
- '16.667%' => __( '6 Columns', 'premium-addons-for-elementor' ),
358
- ),
359
- 'default' => '33.33%',
360
- 'tablet_default' => '100%',
361
- 'mobile_default' => '100%',
362
- 'render_type' => 'template',
363
- 'selectors' => array(
364
- '{{WRAPPER}} .premium-person-container' => 'width: {{VALUE}}',
365
- ),
366
- 'condition' => array(
367
- 'multiple' => 'yes',
368
- ),
369
- 'frontend_available' => true,
370
- )
371
- );
372
-
373
- $this->add_responsive_control(
374
- 'spacing',
375
- array(
376
- 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),
377
- 'type' => Controls_Manager::DIMENSIONS,
378
- 'size_units' => array( 'px', '%', 'em' ),
379
- 'default' => array(
380
- 'top' => 5,
381
- 'right' => 5,
382
- 'bottom' => 5,
383
- 'left' => 5,
384
- ),
385
- 'condition' => array(
386
- 'multiple' => 'yes',
387
- ),
388
- 'selectors' => array(
389
- '{{WRAPPER}} .premium-person-container' => 'padding: 0 {{RIGHT}}{{UNIT}} 0 {{LEFT}}{{UNIT}}; margin: {{TOP}}{{UNIT}} 0 {{BOTTOM}}{{UNIT}} 0',
390
- ' {{WRAPPER}} .premium-person-style1 .premium-person-info' => 'left: {{LEFT}}{{UNIT}}; right: {{RIGHT}}{{UNIT}}',
391
- ),
392
- )
393
- );
394
-
395
- $this->add_control(
396
- 'multiple_equal_height',
397
- array(
398
- 'label' => __( 'Equal Height', 'premium-addons-for-elementor' ),
399
- 'type' => Controls_Manager::SWITCHER,
400
- 'default' => 'yes',
401
- 'condition' => array(
402
- 'multiple' => 'yes',
403
- ),
404
- )
405
- );
406
-
407
- $this->end_controls_section();
408
-
409
- $this->start_controls_section(
410
- 'premium_person_settings',
411
- array(
412
- 'label' => __( 'Single Member Settings', 'premium-addons-for-elementor' ),
413
- 'condition' => array(
414
- 'multiple!' => 'yes',
415
- ),
416
- )
417
- );
418
-
419
- $this->add_control(
420
- 'premium_person_image',
421
- array(
422
- 'label' => __( 'Image', 'premium-addons-for-elementor' ),
423
- 'type' => Controls_Manager::MEDIA,
424
- 'dynamic' => array( 'active' => true ),
425
- 'default' => array(
426
- 'url' => Utils::get_placeholder_image_src(),
427
- ),
428
- 'label_block' => true,
429
- )
430
- );
431
-
432
- $this->add_control(
433
- 'premium_person_name',
434
- array(
435
- 'label' => __( 'Name', 'premium-addons-for-elementor' ),
436
- 'type' => Controls_Manager::TEXT,
437
- 'dynamic' => array( 'active' => true ),
438
- 'default' => 'John Frank',
439
- 'separator' => 'before',
440
- 'label_block' => true,
441
- )
442
- );
443
-
444
- $this->add_control(
445
- 'premium_person_title',
446
- array(
447
- 'label' => __( 'Title', 'premium-addons-for-elementor' ),
448
- 'type' => Controls_Manager::TEXT,
449
- 'dynamic' => array( 'active' => true ),
450
- 'default' => __( 'Developer', 'premium-addons-for-elementor' ),
451
- 'label_block' => true,
452
- )
453
- );
454
-
455
- $this->add_control(
456
- 'premium_person_content',
457
- array(
458
- 'label' => __( 'Description', 'premium-addons-for-elementor' ),
459
- 'type' => Controls_Manager::WYSIWYG,
460
- 'dynamic' => array( 'active' => true ),
461
- 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', 'premium-addons-for-elementor' ),
462
- )
463
- );
464
-
465
- $this->add_control(
466
- 'premium_person_social_enable',
467
- array(
468
- 'label' => __( 'Enable Social Icons', 'premium-addons-for-elementor' ),
469
- 'type' => Controls_Manager::SWITCHER,
470
- 'default' => 'yes',
471
- 'separator' => 'before',
472
- )
473
- );
474
-
475
- $this->add_control(
476
- 'premium_person_facebook',
477
- array(
478
- 'label' => __( 'Facebook', 'premium-addons-for-elementor' ),
479
- 'type' => Controls_Manager::TEXT,
480
- 'dynamic' => array( 'active' => true ),
481
- 'default' => '#',
482
- 'label_block' => true,
483
- 'condition' => array(
484
- 'premium_person_social_enable' => 'yes',
485
- ),
486
- )
487
- );
488
-
489
- $this->add_control(
490
- 'premium_person_twitter',
491
- array(
492
- 'label' => __( 'Twitter', 'premium-addons-for-elementor' ),
493
- 'type' => Controls_Manager::TEXT,
494
- 'dynamic' => array( 'active' => true ),
495
- 'default' => '#',
496
- 'label_block' => true,
497
- 'condition' => array(
498
- 'premium_person_social_enable' => 'yes',
499
- ),
500
- )
501
- );
502
-
503
- $this->add_control(
504
- 'premium_person_linkedin',
505
- array(
506
- 'label' => __( 'LinkedIn', 'premium-addons-for-elementor' ),
507
- 'type' => Controls_Manager::TEXT,
508
- 'dynamic' => array( 'active' => true ),
509
- 'label_block' => true,
510
- 'condition' => array(
511
- 'premium_person_social_enable' => 'yes',
512
- ),
513
- )
514
- );
515
-
516
- $this->add_control(
517
- 'premium_person_google',
518
- array(
519
- 'label' => __( 'Google+', 'premium-addons-for-elementor' ),
520
- 'type' => Controls_Manager::TEXT,
521
- 'dynamic' => array( 'active' => true ),
522
- 'label_block' => true,
523
- 'condition' => array(
524
- 'premium_person_social_enable' => 'yes',
525
- ),
526
- )
527
- );
528
-
529
- $this->add_control(
530
- 'premium_person_youtube',
531
- array(
532
- 'label' => __( 'YouTube', 'premium-addons-for-elementor' ),
533
- 'type' => Controls_Manager::TEXT,
534
- 'dynamic' => array( 'active' => true ),
535
- 'label_block' => true,
536
- 'condition' => array(
537
- 'premium_person_social_enable' => 'yes',
538
- ),
539
- )
540
- );
541
-
542
- $this->add_control(
543
- 'premium_person_instagram',
544
- array(
545
- 'label' => __( 'Instagram', 'premium-addons-for-elementor' ),
546
- 'type' => Controls_Manager::TEXT,
547
- 'dynamic' => array( 'active' => true ),
548
- 'default' => '#',
549
- 'label_block' => true,
550
- 'condition' => array(
551
- 'premium_person_social_enable' => 'yes',
552
- ),
553
- )
554
- );
555
-
556
- $this->add_control(
557
- 'premium_person_skype',
558
- array(
559
- 'label' => __( 'Skype', 'premium-addons-for-elementor' ),
560
- 'type' => Controls_Manager::TEXT,
561
- 'dynamic' => array( 'active' => true ),
562
- 'label_block' => true,
563
- 'condition' => array(
564
- 'premium_person_social_enable' => 'yes',
565
- ),
566
- )
567
- );
568
-
569
- $this->add_control(
570
- 'premium_person_pinterest',
571
- array(
572
- 'label' => __( 'Pinterest', 'premium-addons-for-elementor' ),
573
- 'type' => Controls_Manager::TEXT,
574
- 'dynamic' => array( 'active' => true ),
575
- 'label_block' => true,
576
- 'condition' => array(
577
- 'premium_person_social_enable' => 'yes',
578
- ),
579
- )
580
- );
581
-
582
- $this->add_control(
583
- 'premium_person_dribbble',
584
- array(
585
- 'label' => __( 'Dribbble', 'premium-addons-for-elementor' ),
586
- 'type' => Controls_Manager::TEXT,
587
- 'dynamic' => array( 'active' => true ),
588
- 'default' => '#',
589
- 'label_block' => true,
590
- 'condition' => array(
591
- 'premium_person_social_enable' => 'yes',
592
- ),
593
- )
594
- );
595
-
596
- $this->add_control(
597
- 'premium_person_behance',
598
- array(
599
- 'label' => __( 'Behance', 'premium-addons-for-elementor' ),
600
- 'type' => Controls_Manager::TEXT,
601
- 'dynamic' => array( 'active' => true ),
602
- 'label_block' => true,
603
- 'condition' => array(
604
- 'premium_person_social_enable' => 'yes',
605
- ),
606
- )
607
- );
608
-
609
- $this->add_control(
610
- 'premium_person_whatsapp',
611
- array(
612
- 'label' => __( 'WhatsApp', 'premium-addons-for-elementor' ),
613
- 'type' => Controls_Manager::TEXT,
614
- 'dynamic' => array( 'active' => true ),
615
- 'label_block' => true,
616
- 'condition' => array(
617
- 'premium_person_social_enable' => 'yes',
618
- ),
619
- )
620
- );
621
-
622
- $this->add_control(
623
- 'premium_person_telegram',
624
- array(
625
- 'label' => __( 'Telegram', 'premium-addons-for-elementor' ),
626
- 'type' => Controls_Manager::TEXT,
627
- 'dynamic' => array( 'active' => true ),
628
- 'label_block' => true,
629
- 'condition' => array(
630
- 'premium_person_social_enable' => 'yes',
631
- ),
632
- )
633
- );
634
-
635
- $this->add_control(
636
- 'premium_person_mail',
637
- array(
638
- 'label' => __( 'Email Address', 'premium-addons-for-elementor' ),
639
- 'type' => Controls_Manager::TEXT,
640
- 'dynamic' => array( 'active' => true ),
641
- 'label_block' => true,
642
- 'condition' => array(
643
- 'premium_person_social_enable' => 'yes',
644
- ),
645
- )
646
- );
647
-
648
- $this->add_control(
649
- 'premium_person_site',
650
- array(
651
- 'label' => __( 'Website', 'premium-addons-for-elementor' ),
652
- 'type' => Controls_Manager::TEXT,
653
- 'dynamic' => array( 'active' => true ),
654
- 'label_block' => true,
655
- 'condition' => array(
656
- 'premium_person_social_enable' => 'yes',
657
- ),
658
- )
659
- );
660
-
661
- $this->add_control(
662
- 'premium_person_number',
663
- array(
664
- 'label' => __( 'Phone Number', 'premium-addons-for-elementor' ),
665
- 'type' => Controls_Manager::TEXT,
666
- 'dynamic' => array( 'active' => true ),
667
- 'description' => __( 'Example: tel: +012 345 678 910', 'premium-addons-for-elementor' ),
668
- 'label_block' => true,
669
- 'condition' => array(
670
- 'premium_person_social_enable' => 'yes',
671
- ),
672
- )
673
- );
674
-
675
- $this->add_control(
676
- 'phone_notice',
677
- array(
678
- 'raw' => __( 'Please note that Phone Number icon will show only on mobile devices.', 'premium-addons-for-elementor' ),
679
- 'type' => Controls_Manager::RAW_HTML,
680
- 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
681
- 'condition' => array(
682
- 'premium_person_social_enable' => 'yes',
683
- ),
684
- )
685
- );
686
-
687
- $this->end_controls_section();
688
-
689
- $this->start_controls_section(
690
- 'multiple_settings',
691
- array(
692
- 'label' => __( 'Multiple Members Settings', 'premium-addons-for-elementor' ),
693
- 'condition' => array(
694
- 'multiple' => 'yes',
695
- ),
696
- )
697
- );
698
-
699
- $repeater = new REPEATER();
700
-
701
- $repeater->add_control(
702
- 'multiple_image',
703
- array(
704
- 'label' => __( 'Image', 'premium-addons-for-elementor' ),
705
- 'type' => Controls_Manager::MEDIA,
706
- 'dynamic' => array( 'active' => true ),
707
- 'default' => array(
708
- 'url' => Utils::get_placeholder_image_src(),
709
- ),
710
- )
711
- );
712
-
713
- $repeater->add_control(
714
- 'multiple_name',
715
- array(
716
- 'label' => __( 'Name', 'premium-addons-for-elementor' ),
717
- 'type' => Controls_Manager::TEXT,
718
- 'dynamic' => array( 'active' => true ),
719
- 'default' => 'John Frank',
720
- 'separator' => 'before',
721
- 'label_block' => true,
722
- )
723
- );
724
-
725
- $repeater->add_control(
726
- 'multiple_title',
727
- array(
728
- 'label' => __( 'Title', 'premium-addons-for-elementor' ),
729
- 'type' => Controls_Manager::TEXT,
730
- 'dynamic' => array( 'active' => true ),
731
- 'default' => __( 'Developer', 'premium-addons-for-elementor' ),
732
- 'label_block' => true,
733
- )
734
- );
735
-
736
- $repeater->add_control(
737
- 'multiple_description',
738
- array(
739
- 'label' => __( 'Description', 'premium-addons-for-elementor' ),
740
- 'type' => Controls_Manager::WYSIWYG,
741
- 'dynamic' => array( 'active' => true ),
742
- 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', 'premium-addons-for-elementor' ),
743
- )
744
- );
745
-
746
- $repeater->add_control(
747
- 'multiple_social_enable',
748
- array(
749
- 'label' => __( 'Enable Social Icons', 'premium-addons-for-elementor' ),
750
- 'type' => Controls_Manager::SWITCHER,
751
- 'default' => 'yes',
752
- 'separator' => 'before',
753
- )
754
- );
755
-
756
- $repeater->add_control(
757
- 'multiple_facebook',
758
- array(
759
- 'label' => __( 'Facebook', 'premium-addons-for-elementor' ),
760
- 'type' => Controls_Manager::TEXT,
761
- 'dynamic' => array( 'active' => true ),
762
- 'default' => '#',
763
- 'label_block' => true,
764
- 'condition' => array(
765
- 'multiple_social_enable' => 'yes',
766
- ),
767
- )
768
- );
769
-
770
- $repeater->add_control(
771
- 'multiple_twitter',
772
- array(
773
- 'label' => __( 'Twitter', 'premium-addons-for-elementor' ),
774
- 'type' => Controls_Manager::TEXT,
775
- 'dynamic' => array( 'active' => true ),
776
- 'default' => '#',
777
- 'label_block' => true,
778
- 'condition' => array(
779
- 'multiple_social_enable' => 'yes',
780
- ),
781
- )
782
- );
783
-
784
- $repeater->add_control(
785
- 'multiple_linkedin',
786
- array(
787
- 'label' => __( 'LinkedIn', 'premium-addons-for-elementor' ),
788
- 'type' => Controls_Manager::TEXT,
789
- 'dynamic' => array( 'active' => true ),
790
- 'label_block' => true,
791
- 'condition' => array(
792
- 'multiple_social_enable' => 'yes',
793
- ),
794
- )
795
- );
796
-
797
- $repeater->add_control(
798
- 'multiple_google',
799
- array(
800
- 'label' => __( 'Google+', 'premium-addons-for-elementor' ),
801
- 'type' => Controls_Manager::TEXT,
802
- 'dynamic' => array( 'active' => true ),
803
- 'label_block' => true,
804
- 'condition' => array(
805
- 'multiple_social_enable' => 'yes',
806
- ),
807
- )
808
- );
809
-
810
- $repeater->add_control(
811
- 'multiple_youtube',
812
- array(
813
- 'label' => __( 'YouTube', 'premium-addons-for-elementor' ),
814
- 'type' => Controls_Manager::TEXT,
815
- 'dynamic' => array( 'active' => true ),
816
- 'label_block' => true,
817
- 'condition' => array(
818
- 'multiple_social_enable' => 'yes',
819
- ),
820
- )
821
- );
822
-
823
- $repeater->add_control(
824
- 'multiple_instagram',
825
- array(
826
- 'label' => __( 'Instagram', 'premium-addons-for-elementor' ),
827
- 'type' => Controls_Manager::TEXT,
828
- 'dynamic' => array( 'active' => true ),
829
- 'default' => '#',
830
- 'label_block' => true,
831
- 'condition' => array(
832
- 'multiple_social_enable' => 'yes',
833
- ),
834
- )
835
- );
836
-
837
- $repeater->add_control(
838
- 'multiple_skype',
839
- array(
840
- 'label' => __( 'Skype', 'premium-addons-for-elementor' ),
841
- 'type' => Controls_Manager::TEXT,
842
- 'dynamic' => array( 'active' => true ),
843
- 'label_block' => true,
844
- 'condition' => array(
845
- 'multiple_social_enable' => 'yes',
846
- ),
847
- )
848
- );
849
-
850
- $repeater->add_control(
851
- 'multiple_pinterest',
852
- array(
853
- 'label' => __( 'Pinterest', 'premium-addons-for-elementor' ),
854
- 'type' => Controls_Manager::TEXT,
855
- 'dynamic' => array( 'active' => true ),
856
- 'label_block' => true,
857
- 'condition' => array(
858
- 'multiple_social_enable' => 'yes',
859
- ),
860
- )
861
- );
862
-
863
- $repeater->add_control(
864
- 'multiple_dribbble',
865
- array(
866
- 'label' => __( 'Dribbble', 'premium-addons-for-elementor' ),
867
- 'type' => Controls_Manager::TEXT,
868
- 'dynamic' => array( 'active' => true ),
869
- 'default' => '#',
870
- 'label_block' => true,
871
- 'condition' => array(
872
- 'multiple_social_enable' => 'yes',
873
- ),
874
- )
875
- );
876
-
877
- $repeater->add_control(
878
- 'multiple_behance',
879
- array(
880
- 'label' => __( 'Behance', 'premium-addons-for-elementor' ),
881
- 'type' => Controls_Manager::TEXT,
882
- 'dynamic' => array( 'active' => true ),
883
- 'label_block' => true,
884
- 'condition' => array(
885
- 'multiple_social_enable' => 'yes',
886
- ),
887
- )
888
- );
889
-
890
- $repeater->add_control(
891
- 'multiple_whatsapp',
892
- array(
893
- 'label' => __( 'WhatsApp', 'premium-addons-for-elementor' ),
894
- 'type' => Controls_Manager::TEXT,
895
- 'dynamic' => array( 'active' => true ),
896
- 'label_block' => true,
897
- 'condition' => array(
898
- 'multiple_social_enable' => 'yes',
899
- ),
900
- )
901
- );
902
-
903
- $repeater->add_control(
904
- 'multiple_telegram',
905
- array(
906
- 'label' => __( 'Telegram', 'premium-addons-for-elementor' ),
907
- 'type' => Controls_Manager::TEXT,
908
- 'dynamic' => array( 'active' => true ),
909
- 'label_block' => true,
910
- 'condition' => array(
911
- 'multiple_social_enable' => 'yes',
912
- ),
913
- )
914
- );
915
-
916
- $repeater->add_control(
917
- 'multiple_mail',
918
- array(
919
- 'label' => __( 'Email Address', 'premium-addons-for-elementor' ),
920
- 'type' => Controls_Manager::TEXT,
921
- 'dynamic' => array( 'active' => true ),
922
- 'label_block' => true,
923
- 'condition' => array(
924
- 'multiple_social_enable' => 'yes',
925
- ),
926
- )
927
- );
928
-
929
- $repeater->add_control(
930
- 'multiple_site',
931
- array(
932
- 'label' => __( 'Website', 'premium-addons-for-elementor' ),
933
- 'type' => Controls_Manager::TEXT,
934
- 'dynamic' => array( 'active' => true ),
935
- 'label_block' => true,
936
- 'condition' => array(
937
- 'multiple_social_enable' => 'yes',
938
- ),
939
- )
940
- );
941
-
942
- $repeater->add_control(
943
- 'multiple_number',
944
- array(
945
- 'label' => __( 'Phone Number', 'premium-addons-for-elementor' ),
946
- 'type' => Controls_Manager::TEXT,
947
- 'dynamic' => array( 'active' => true ),
948
- 'description' => __( 'Example: tel: +012 345 678 910', 'premium-addons-for-elementor' ),
949
- 'label_block' => true,
950
- 'condition' => array(
951
- 'multiple_social_enable' => 'yes',
952
- ),
953
- )
954
- );
955
-
956
- $repeater->add_control(
957
- 'phone_notice',
958
- array(
959
- 'raw' => __( 'Please note that Phone Number icon will show only on mobile devices.', 'premium-addons-for-elementor' ),
960
- 'type' => Controls_Manager::RAW_HTML,
961
- 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
962
- 'condition' => array(
963
- 'multiple_social_enable' => 'yes',
964
- ),
965
- )
966
- );
967
-
968
- $this->add_control(
969
- 'multiple_persons',
970
- array(
971
- 'label' => __( 'Members', 'premium-addons-for-elementor' ),
972
- 'type' => Controls_Manager::REPEATER,
973
- 'default' => array(
974
- array(
975
- 'multiple_name' => 'John Frank',
976
- ),
977
- array(
978
- 'multiple_name' => 'John Frank',
979
- ),
980
- array(
981
- 'multiple_name' => 'John Frank',
982
- ),
983
- ),
984
- 'fields' => $repeater->get_controls(),
985
- 'title_field' => '{{{multiple_name}}} - {{{multiple_title}}}',
986
- 'prevent_empty' => false,
987
- )
988
- );
989
-
990
- $this->add_control(
991
- 'carousel',
992
- array(
993
- 'label' => __( 'Carousel', 'premium-addons-for-elementor' ),
994
- 'type' => Controls_Manager::SWITCHER,
995
- 'frontend_available' => true,
996
- )
997
- );
998
-
999
- $this->add_control(
1000
- 'carousel_play',
1001
- array(
1002
- 'label' => __( 'Auto Play', 'premium-addons-for-elementor' ),
1003
- 'type' => Controls_Manager::SWITCHER,
1004
- 'condition' => array(
1005
- 'carousel' => 'yes',
1006
- ),
1007
- 'frontend_available' => true,
1008
- )
1009
- );
1010
-
1011
- $this->add_control(
1012
- 'carousel_autoplay_speed',
1013
- array(
1014
- 'label' => __( 'Autoplay Speed', 'premium-addons-for-elementor' ),
1015
- 'description' => __( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
1016
- 'type' => Controls_Manager::NUMBER,
1017
- 'default' => 5000,
1018
- 'condition' => array(
1019
- 'carousel' => 'yes',
1020
- 'carousel_play' => 'yes',
1021
- ),
1022
- 'frontend_available' => true,
1023
- )
1024
- );
1025
-
1026
- $this->add_responsive_control(
1027
- 'carousel_arrows_pos',
1028
- array(
1029
- 'label' => __( 'Arrows Position', 'premium-addons-for-elementor' ),
1030
- 'type' => Controls_Manager::SLIDER,
1031
- 'size_units' => array( 'px', 'em' ),
1032
- 'range' => array(
1033
- 'px' => array(
1034
- 'min' => -100,
1035
- 'max' => 100,
1036
- ),
1037
- 'em' => array(
1038
- 'min' => -10,
1039
- 'max' => 10,
1040
- ),
1041
- ),
1042
- 'condition' => array(
1043
- 'carousel' => 'yes',
1044
- ),
1045
- 'selectors' => array(
1046
- '{{WRAPPER}} .premium-persons-container a.carousel-arrow.carousel-next' => 'right: {{SIZE}}{{UNIT}};',
1047
- '{{WRAPPER}} .premium-persons-container a.carousel-arrow.carousel-prev' => 'left: {{SIZE}}{{UNIT}};',
1048
- ),
1049
- )
1050
- );
1051
-
1052
- $this->end_controls_section();
1053
-
1054
- $this->start_controls_section(
1055
- 'section_pa_docs',
1056
- array(
1057
- 'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),
1058
- )
1059
- );
1060
-
1061
- $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/persons-widget-tutorial/', 'editor-page', 'wp-editor', 'get-support' );
1062
- $doc2_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/why-im-not-able-to-see-elementor-font-awesome-5-icons-in-premium-add-ons', 'editor-page', 'wp-editor', 'get-support' );
1063
-
1064
- $this->add_control(
1065
- 'doc_1',
1066
- array(
1067
- 'type' => Controls_Manager::RAW_HTML,
1068
- 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ),
1069
- 'content_classes' => 'editor-pa-doc',
1070
- )
1071
- );
1072
-
1073
- $this->add_control(
1074
- 'doc_2',
1075
- array(
1076
- 'type' => Controls_Manager::RAW_HTML,
1077
- 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc2_url, __( 'I\'m not able to see Font Awesome icons in the widget »', 'premium-addons-for-elementor' ) ),
1078
- 'content_classes' => 'editor-pa-doc',
1079
- )
1080
- );
1081
-
1082
- $this->end_controls_section();
1083
-
1084
- $this->start_controls_section(
1085
- 'premium_person_image_style',
1086
- array(
1087
- 'label' => __( 'Image', 'premium-addons-for-elementor' ),
1088
- 'tab' => Controls_Manager::TAB_STYLE,
1089
- )
1090
- );
1091
-
1092
- $this->add_responsive_control(
1093
- 'image_border_radius',
1094
- array(
1095
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1096
- 'type' => Controls_Manager::DIMENSIONS,
1097
- 'size_units' => array( 'px', 'em', '%' ),
1098
- 'selectors' => array(
1099
- '{{WRAPPER}} .premium-person-image-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1100
- ),
1101
- 'condition' => array(
1102
- 'premium_person_style' => 'style2',
1103
- ),
1104
- )
1105
- );
1106
-
1107
- $this->add_control(
1108
- 'image_adv_radius',
1109
- array(
1110
- 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1111
- 'type' => Controls_Manager::SWITCHER,
1112
- 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>',
1113
- 'condition' => array(
1114
- 'premium_person_style' => 'style2',
1115
- ),
1116
- )
1117
- );
1118
-
1119
- $this->add_control(
1120
- 'image_adv_radius_value',
1121
- array(
1122
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1123
- 'type' => Controls_Manager::TEXT,
1124
- 'dynamic' => array( 'active' => true ),
1125
- 'selectors' => array(
1126
- '{{WRAPPER}} .premium-person-image-container' => 'border-radius: {{VALUE}};',
1127
- ),
1128
- 'condition' => array(
1129
- 'premium_person_style' => 'style2',
1130
- 'image_adv_radius' => 'yes',
1131
- ),
1132
- )
1133
- );
1134
-
1135
- $this->add_group_control(
1136
- Group_Control_Css_Filter::get_type(),
1137
- array(
1138
- 'name' => 'css_filters',
1139
- 'selector' => '{{WRAPPER}} .premium-person-container img',
1140
- )
1141
- );
1142
-
1143
- $this->add_group_control(
1144
- Group_Control_Css_Filter::get_type(),
1145
- array(
1146
- 'name' => 'hover_css_filters',
1147
- 'label' => __( 'Hover CSS Filters', 'premium-addons-for-elementor' ),
1148
- 'selector' => '{{WRAPPER}} .premium-person-container:hover img',
1149
- )
1150
- );
1151
-
1152
- $this->add_group_control(
1153
- Group_Control_Box_Shadow::get_type(),
1154
- array(
1155
- 'name' => 'premium_person_shadow',
1156
- 'selector' => '{{WRAPPER}} .premium-person-social',
1157
- 'condition' => array(
1158
- 'premium_person_style' => 'style2',
1159
- ),
1160
- )
1161
- );
1162
-
1163
- $this->add_control(
1164
- 'blend_mode',
1165
- array(
1166
- 'label' => __( 'Blend Mode', 'elementor' ),
1167
- 'type' => Controls_Manager::SELECT,
1168
- 'options' => array(
1169
- '' => __( 'Normal', 'elementor' ),
1170
- 'multiply' => 'Multiply',
1171
- 'screen' => 'Screen',
1172
- 'overlay' => 'Overlay',
1173
- 'darken' => 'Darken',
1174
- 'lighten' => 'Lighten',
1175
- 'color-dodge' => 'Color Dodge',
1176
- 'saturation' => 'Saturation',
1177
- 'color' => 'Color',
1178
- 'luminosity' => 'Luminosity',
1179
- ),
1180
- 'separator' => 'before',
1181
- 'selectors' => array(
1182
- '{{WRAPPER}} .premium-person-image-container img' => 'mix-blend-mode: {{VALUE}}',
1183
- ),
1184
- )
1185
- );
1186
-
1187
- $this->end_controls_section();
1188
-
1189
- $this->start_controls_section(
1190
- 'premium_person_name_style',
1191
- array(
1192
- 'label' => __( 'Name', 'premium-addons-for-elementor' ),
1193
- 'tab' => Controls_Manager::TAB_STYLE,
1194
- )
1195
- );
1196
-
1197
- $this->add_control(
1198
- 'premium_person_name_color',
1199
- array(
1200
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1201
- 'type' => Controls_Manager::COLOR,
1202
- 'global' => array(
1203
- 'default' => Global_Colors::COLOR_PRIMARY,
1204
- ),
1205
- 'selectors' => array(
1206
- '{{WRAPPER}} .premium-person-name' => 'color: {{VALUE}};',
1207
- ),
1208
- )
1209
- );
1210
-
1211
- $this->add_group_control(
1212
- Group_Control_Typography::get_type(),
1213
- array(
1214
- 'name' => 'name_typography',
1215
- 'global' => array(
1216
- 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1217
- ),
1218
- 'selector' => '{{WRAPPER}} .premium-person-name',
1219
- )
1220
- );
1221
-
1222
- $this->add_group_control(
1223
- Group_Control_Text_Shadow::get_type(),
1224
- array(
1225
- 'name' => 'name_shadow',
1226
- 'selector' => '{{WRAPPER}} .premium-person-name',
1227
- )
1228
- );
1229
-
1230
- $this->add_responsive_control(
1231
- 'name_padding',
1232
- array(
1233
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1234
- 'type' => Controls_Manager::DIMENSIONS,
1235
- 'size_units' => array( 'px', 'em', '%' ),
1236
- 'selectors' => array(
1237
- '{{WRAPPER}} .premium-person-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1238
- ),
1239
- )
1240
- );
1241
-
1242
- $this->end_controls_section();
1243
-
1244
- $this->start_controls_section(
1245
- 'premium_person_title_style',
1246
- array(
1247
- 'label' => __( 'Job Title', 'premium-addons-for-elementor' ),
1248
- 'tab' => Controls_Manager::TAB_STYLE,
1249
- )
1250
- );
1251
-
1252
- $this->add_control(
1253
- 'premium_person_title_color',
1254
- array(
1255
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1256
- 'type' => Controls_Manager::COLOR,
1257
- 'global' => array(
1258
- 'default' => Global_Colors::COLOR_SECONDARY,
1259
- ),
1260
- 'selectors' => array(
1261
- '{{WRAPPER}} .premium-person-title' => 'color: {{VALUE}};',
1262
- ),
1263
- )
1264
- );
1265
-
1266
- $this->add_group_control(
1267
- Group_Control_Typography::get_type(),
1268
- array(
1269
- 'name' => 'title_typography',
1270
- 'global' => array(
1271
- 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1272
- ),
1273
- 'selector' => '{{WRAPPER}} .premium-person-title',
1274
- )
1275
- );
1276
-
1277
- $this->add_group_control(
1278
- Group_Control_Text_Shadow::get_type(),
1279
- array(
1280
- 'name' => 'title_shadow',
1281
- 'selector' => '{{WRAPPER}} .premium-person-title',
1282
- )
1283
- );
1284
-
1285
- $this->add_responsive_control(
1286
- 'title_margin',
1287
- array(
1288
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1289
- 'type' => Controls_Manager::DIMENSIONS,
1290
- 'size_units' => array( 'px', 'em', '%' ),
1291
- 'selectors' => array(
1292
- '{{WRAPPER}} .premium-person-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1293
- ),
1294
- )
1295
- );
1296
-
1297
- $this->add_responsive_control(
1298
- 'title_padding',
1299
- array(
1300
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1301
- 'type' => Controls_Manager::DIMENSIONS,
1302
- 'size_units' => array( 'px', 'em', '%' ),
1303
- 'selectors' => array(
1304
- '{{WRAPPER}} .premium-person-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1305
- ),
1306
- )
1307
- );
1308
-
1309
- $this->end_controls_section();
1310
-
1311
- $this->start_controls_section(
1312
- 'premium_person_description_style',
1313
- array(
1314
- 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1315
- 'tab' => Controls_Manager::TAB_STYLE,
1316
- )
1317
- );
1318
-
1319
- $this->add_control(
1320
- 'premium_person_description_color',
1321
- array(
1322
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1323
- 'type' => Controls_Manager::COLOR,
1324
- 'global' => array(
1325
- 'default' => Global_Colors::COLOR_TEXT,
1326
- ),
1327
- 'selectors' => array(
1328
- '{{WRAPPER}} .premium-person-content' => 'color: {{VALUE}};',
1329
- ),
1330
- )
1331
- );
1332
-
1333
- $this->add_group_control(
1334
- Group_Control_Typography::get_type(),
1335
- array(
1336
- 'name' => 'description_typography',
1337
- 'global' => array(
1338
- 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1339
- ),
1340
- 'selector' => '{{WRAPPER}} .premium-person-content',
1341
- )
1342
- );
1343
-
1344
- $this->add_group_control(
1345
- Group_Control_Text_Shadow::get_type(),
1346
- array(
1347
- 'name' => 'description_shadow',
1348
- 'selector' => '{{WRAPPER}} .premium-person-content',
1349
- )
1350
- );
1351
-
1352
- $this->add_responsive_control(
1353
- 'description_padding',
1354
- array(
1355
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1356
- 'type' => Controls_Manager::DIMENSIONS,
1357
- 'size_units' => array( 'px', 'em', '%' ),
1358
- 'selectors' => array(
1359
- '{{WRAPPER}} .premium-person-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1360
- ),
1361
- )
1362
- );
1363
-
1364
- $this->end_controls_section();
1365
-
1366
- $this->start_controls_section(
1367
- 'premium_person_social_icon_style',
1368
- array(
1369
- 'label' => __( 'Social Icons', 'premium-addons-for-elementor' ),
1370
- 'tab' => Controls_Manager::TAB_STYLE,
1371
- 'condition' => array(
1372
- 'premium_person_social_enable' => 'yes',
1373
- ),
1374
- )
1375
- );
1376
-
1377
- $this->add_responsive_control(
1378
- 'premium_person_social_size',
1379
- array(
1380
- 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1381
- 'type' => Controls_Manager::SLIDER,
1382
- 'size_units' => array( 'px', 'em', '%' ),
1383
- 'label_block' => true,
1384
- 'selectors' => array(
1385
- '{{WRAPPER}} .premium-person-list-item i' => 'font-size: {{SIZE}}{{UNIT}};',
1386
- ),
1387
- )
1388
- );
1389
-
1390
- $this->add_control(
1391
- 'premium_person_social_color',
1392
- array(
1393
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1394
- 'type' => Controls_Manager::COLOR,
1395
- 'global' => array(
1396
- 'default' => Global_Colors::COLOR_PRIMARY,
1397
- ),
1398
- 'selectors' => array(
1399
- '{{WRAPPER}} .premium-person-list-item i' => 'color: {{VALUE}};',
1400
- ),
1401
- )
1402
- );
1403
-
1404
- $this->add_control(
1405
- 'premium_person_social_hover_color',
1406
- array(
1407
- 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1408
- 'type' => Controls_Manager::COLOR,
1409
- 'global' => array(
1410
- 'default' => Global_Colors::COLOR_SECONDARY,
1411
- ),
1412
- 'selectors' => array(
1413
- '{{WRAPPER}} .premium-person-list-item:hover i' => 'color: {{VALUE}}',
1414
- ),
1415
- )
1416
- );
1417
-
1418
- $this->add_control(
1419
- 'premium_person_social_background',
1420
- array(
1421
- 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1422
- 'type' => Controls_Manager::COLOR,
1423
- 'selectors' => array(
1424
- '{{WRAPPER}} .premium-person-list-item a' => 'background-color: {{VALUE}}',
1425
- ),
1426
- )
1427
- );
1428
-
1429
- $this->add_control(
1430
- 'premium_person_social_default_colors',
1431
- array(
1432
- 'label' => __( 'Brands Default Colors', 'premium-addons-for-elementor' ),
1433
- 'type' => Controls_Manager::SWITCHER,
1434
- 'prefix_class' => 'premium-person-defaults-',
1435
- )
1436
- );
1437
-
1438
- $this->add_control(
1439
- 'premium_person_social_hover_background',
1440
- array(
1441
- 'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
1442
- 'type' => Controls_Manager::COLOR,
1443
- 'selectors' => array(
1444
- '{{WRAPPER}} li.premium-person-list-item:hover a' => 'background-color: {{VALUE}}',
1445
- ),
1446
- 'condition' => array(
1447
- 'premium_person_social_default_colors!' => 'yes',
1448
- ),
1449
- )
1450
- );
1451
-
1452
- $this->add_group_control(
1453
- Group_Control_Border::get_type(),
1454
- array(
1455
- 'name' => 'premium_person_social_border',
1456
- 'selector' => '{{WRAPPER}} .premium-person-list-item a',
1457
- )
1458
- );
1459
-
1460
- $this->add_responsive_control(
1461
- 'premium_person_social_radius',
1462
- array(
1463
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1464
- 'type' => Controls_Manager::DIMENSIONS,
1465
- 'size_units' => array( 'px', 'em', '%' ),
1466
- 'selectors' => array(
1467
- '{{WRAPPER}} .premium-person-list-item a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1468
- ),
1469
- 'condition' => array(
1470
- 'social_adv_radius!' => 'yes',
1471
- ),
1472
- )
1473
- );
1474
-
1475
- $this->add_control(
1476
- 'social_adv_radius',
1477
- array(
1478
- 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1479
- 'type' => Controls_Manager::SWITCHER,
1480
- 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>',
1481
- )
1482
- );
1483
-
1484
- $this->add_control(
1485
- 'social_adv_radius_value',
1486
- array(
1487
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1488
- 'type' => Controls_Manager::TEXT,
1489
- 'dynamic' => array( 'active' => true ),
1490
- 'selectors' => array(
1491
- '{{WRAPPER}} .premium-person-list-item a' => 'border-radius: {{VALUE}};',
1492
- ),
1493
- 'condition' => array(
1494
- 'social_adv_radius' => 'yes',
1495
- ),
1496
- )
1497
- );
1498
-
1499
- $this->add_responsive_control(
1500
- 'premium_person_social_margin',
1501
- array(
1502
- 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1503
- 'type' => Controls_Manager::DIMENSIONS,
1504
- 'size_units' => array( 'px', 'em', '%' ),
1505
- 'selectors' => array(
1506
- '{{WRAPPER}} .premium-person-list-item a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1507
- ),
1508
- )
1509
- );
1510
-
1511
- $this->add_responsive_control(
1512
- 'premium_person_social_padding',
1513
- array(
1514
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1515
- 'type' => Controls_Manager::DIMENSIONS,
1516
- 'size_units' => array( 'px', 'em', '%' ),
1517
- 'selectors' => array(
1518
- '{{WRAPPER}} .premium-person-list-item a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1519
- ),
1520
- )
1521
- );
1522
-
1523
- $this->end_controls_section();
1524
-
1525
- $this->start_controls_section(
1526
- 'premium_person_general_style',
1527
- array(
1528
- 'label' => __( 'Content', 'premium-addons-for-elementor' ),
1529
- 'tab' => Controls_Manager::TAB_STYLE,
1530
- )
1531
- );
1532
-
1533
- $this->add_control(
1534
- 'premium_person_content_background_color',
1535
- array(
1536
- 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1537
- 'type' => Controls_Manager::COLOR,
1538
- 'default' => 'rgba(245,245,245,0.97)',
1539
- 'selectors' => array(
1540
- '{{WRAPPER}} .premium-person-info' => 'background-color: {{VALUE}};',
1541
- ),
1542
- )
1543
- );
1544
-
1545
- $this->add_responsive_control(
1546
- 'premium_person_border_bottom_width',
1547
- array(
1548
- 'label' => __( 'Bottom Offset', 'premium-addons-for-elementor' ),
1549
- 'type' => Controls_Manager::SLIDER,
1550
- 'size_units' => array( 'px', 'em', '%' ),
1551
- 'range' => array(
1552
- 'px' => array(
1553
- 'min' => 0,
1554
- 'max' => 700,
1555
- ),
1556
- ),
1557
- 'default' => array(
1558
- 'size' => 20,
1559
- 'unit' => 'px',
1560
- ),
1561
- 'label_block' => true,
1562
- 'condition' => array(
1563
- 'premium_person_style' => 'style1',
1564
- ),
1565
- 'selectors' => array(
1566
- '{{WRAPPER}} .premium-person-info' => 'bottom: {{SIZE}}{{UNIT}}',
1567
- ),
1568
- )
1569
- );
1570
-
1571
- $this->add_responsive_control(
1572
- 'premium_person_content_speed',
1573
- array(
1574
- 'label' => __( 'Transition Duration (sec)', 'premium-addons-for-elementor' ),
1575
- 'type' => Controls_Manager::SLIDER,
1576
- 'range' => array(
1577
- 'px' => array(
1578
- 'min' => 0,
1579
- 'max' => 5,
1580
- 'step' => 0.1,
1581
- ),
1582
- ),
1583
- 'selectors' => array(
1584
- '{{WRAPPER}} .premium-person-info, {{WRAPPER}} .premium-person-image-container img' => 'transition-duration: {{SIZE}}s',
1585
- ),
1586
- )
1587
- );
1588
-
1589
- $this->add_responsive_control(
1590
- 'premium_person_content_padding',
1591
- array(
1592
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1593
- 'type' => Controls_Manager::DIMENSIONS,
1594
- 'size_units' => array( 'px', 'em', '%' ),
1595
- 'selectors' => array(
1596
- '{{WRAPPER}} .premium-person-info-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1597
- ),
1598
- )
1599
- );
1600
-
1601
- $this->end_controls_section();
1602
-
1603
- $this->start_controls_section(
1604
- 'carousel_style',
1605
- array(
1606
- 'label' => __( 'Carousel', 'premium-addons-for-elementor' ),
1607
- 'tab' => Controls_Manager::TAB_STYLE,
1608
- 'condition' => array(
1609
- 'carousel' => 'yes',
1610
- ),
1611
- )
1612
- );
1613
-
1614
- $this->add_control(
1615
- 'arrow_color',
1616
- array(
1617
- 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1618
- 'type' => Controls_Manager::COLOR,
1619
- 'global' => array(
1620
- 'default' => Global_Colors::COLOR_PRIMARY,
1621
- ),
1622
- 'selectors' => array(
1623
- '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'color: {{VALUE}};',
1624
- ),
1625
- )
1626
- );
1627
-
1628
- $this->add_control(
1629
- 'arrow_hover_color',
1630
- array(
1631
- 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1632
- 'type' => Controls_Manager::COLOR,
1633
- 'global' => array(
1634
- 'default' => Global_Colors::COLOR_PRIMARY,
1635
- ),
1636
- 'selectors' => array(
1637
- '{{WRAPPER}} .premium-persons-container .slick-arrow:hover' => 'color: {{VALUE}};',
1638
- ),
1639
- )
1640
- );
1641
-
1642
- $this->add_responsive_control(
1643
- 'arrow_size',
1644
- array(
1645
- 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1646
- 'type' => Controls_Manager::SLIDER,
1647
- 'size_units' => array( 'px', '%', 'em' ),
1648
- 'selectors' => array(
1649
- '{{WRAPPER}} .premium-persons-container .slick-arrow i' => 'font-size: {{SIZE}}{{UNIT}};',
1650
- ),
1651
- )
1652
- );
1653
-
1654
- $this->add_control(
1655
- 'arrow_background',
1656
- array(
1657
- 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1658
- 'type' => Controls_Manager::COLOR,
1659
- 'global' => array(
1660
- 'default' => Global_Colors::COLOR_SECONDARY,
1661
- ),
1662
- 'selectors' => array(
1663
- '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'background-color: {{VALUE}};',
1664
- ),
1665
- )
1666
- );
1667
-
1668
- $this->add_control(
1669
- 'arrow_hover_background',
1670
- array(
1671
- 'label' => __( 'Background Hover Color', 'premium-addons-for-elementor' ),
1672
- 'type' => Controls_Manager::COLOR,
1673
- 'global' => array(
1674
- 'default' => Global_Colors::COLOR_SECONDARY,
1675
- ),
1676
- 'selectors' => array(
1677
- '{{WRAPPER}} .premium-persons-container .slick-arrow:hover' => 'background-color: {{VALUE}};',
1678
- ),
1679
- )
1680
- );
1681
-
1682
- $this->add_control(
1683
- 'arrow_border_radius',
1684
- array(
1685
- 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1686
- 'type' => Controls_Manager::SLIDER,
1687
- 'size_units' => array( 'px', '%', 'em' ),
1688
- 'selectors' => array(
1689
- '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'border-radius: {{SIZE}}{{UNIT}};',
1690
- ),
1691
- )
1692
- );
1693
-
1694
- $this->add_control(
1695
- 'arrow_padding',
1696
- array(
1697
- 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1698
- 'type' => Controls_Manager::SLIDER,
1699
- 'size_units' => array( 'px', '%', 'em' ),
1700
- 'selectors' => array(
1701
- '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'padding: {{SIZE}}{{UNIT}};',
1702
- ),
1703
- )
1704
- );
1705
-
1706
- $this->end_controls_section();
1707
-
1708
- }
1709
-
1710
- /**
1711
- * Render Persons widget output on the frontend.
1712
- *
1713
- * Written in PHP and used to generate the final HTML.
1714
- *
1715
- * @since 1.0.0
1716
- * @access protected
1717
- */
1718
- protected function render() {
1719
-
1720
- $settings = $this->get_settings_for_display();
1721
-
1722
- $image_effect = $settings['premium_person_hover_image_effect'];
1723
-
1724
- $image_html = '';
1725
- if ( ! empty( $settings['premium_person_image']['url'] ) ) {
1726
- $this->add_render_attribute( 'image', 'src', $settings['premium_person_image']['url'] );
1727
- $this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $settings['premium_person_image'] ) );
1728
- $this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $settings['premium_person_image'] ) );
1729
-
1730
- $image_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'premium_person_image' );
1731
- }
1732
-
1733
- $this->add_render_attribute(
1734
- 'persons_container',
1735
- 'class',
1736
- array(
1737
- 'premium-persons-container',
1738
- 'premium-person-' . $settings['premium_person_style'],
1739
- )
1740
- );
1741
-
1742
- $this->add_render_attribute(
1743
- 'person_container',
1744
- 'class',
1745
- array(
1746
- 'premium-person-container',
1747
- 'premium-person-' . $image_effect . '-effect',
1748
- )
1749
- );
1750
-
1751
- if ( 'yes' === $settings['multiple'] ) {
1752
- $persons = $settings['multiple_persons'];
1753
- $this->add_render_attribute( 'persons_container', 'class', 'multiple-persons' );
1754
- $this->add_render_attribute( 'persons_container', 'data-persons-equal', $settings['multiple_equal_height'] );
1755
- }
1756
-
1757
- $carousel = 'yes' === $settings['carousel'] ? true : false;
1758
-
1759
- if ( $carousel ) {
1760
-
1761
- $this->add_render_attribute( 'persons_container', 'data-carousel', $carousel );
1762
-
1763
- $speed = ! empty( $settings['carousel_autoplay_speed'] ) ? $settings['carousel_autoplay_speed'] : 5000;
1764
-
1765
- $this->add_render_attribute(
1766
- 'persons_container',
1767
- array(
1768
- 'data-rtl' => is_rtl(),
1769
- )
1770
- );
1771
-
1772
- }
1773
-
1774
- ?>
1775
- <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'persons_container' ) ); ?>>
1776
- <?php if ( 'yes' !== $settings['multiple'] ) : ?>
1777
- <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'person_container' ) ); ?>>
1778
- <div class="premium-person-image-container">
1779
- <div class="premium-person-image-wrap">
1780
- <?php echo wp_kses_post( $image_html ); ?>
1781
- </div>
1782
- <?php if ( 'style2' === $settings['premium_person_style'] && 'yes' === $settings['premium_person_social_enable'] ) : ?>
1783
- <div class="premium-person-social">
1784
- <?php $this->get_social_icons(); ?>
1785
- </div>
1786
- <?php endif; ?>
1787
- </div>
1788
- <div class="premium-person-info">
1789
- <?php $this->render_person_info(); ?>
1790
- </div>
1791
- </div>
1792
- <?php
1793
- else :
1794
- foreach ( $persons as $index => $person ) {
1795
-
1796
- $person_image_html = '';
1797
- if ( ! empty( $person['multiple_image']['url'] ) ) {
1798
- $this->add_render_attribute( 'image', 'src', $person['multiple_image']['url'] );
1799
- $this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $person['multiple_image'] ) );
1800
- $this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $person['multiple_image'] ) );
1801
-
1802
- $person_image_html = Group_Control_Image_Size::get_attachment_image_html( $person, 'thumbnail', 'multiple_image' );
1803
- }
1804
- ?>
1805
- <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'person_container' ) ); ?>>
1806
- <div class="premium-person-image-container">
1807
- <div class="premium-person-image-wrap">
1808
- <?php echo wp_kses_post( $person_image_html ); ?>
1809
- </div>
1810
- <?php if ( 'style2' === $settings['premium_person_style'] && 'yes' === $person['multiple_social_enable'] ) : ?>
1811
- <div class="premium-person-social">
1812
- <?php $this->get_social_icons( $person ); ?>
1813
- </div>
1814
- <?php endif; ?>
1815
- </div>
1816
- <div class="premium-person-info">
1817
- <?php $this->render_person_info( $person, $index ); ?>
1818
- </div>
1819
- </div>
1820
- <?php
1821
- }
1822
- endif;
1823
- ?>
1824
- </div>
1825
- <?php
1826
- }
1827
-
1828
- /**
1829
- * Get Social Icons
1830
- *
1831
- * Render person social icons list
1832
- *
1833
- * @since 3.8.4
1834
- * @access protected
1835
- *
1836
- * @param object $person current person.
1837
- */
1838
- private function get_social_icons( $person = '' ) {
1839
-
1840
- $settings = $this->get_settings_for_display();
1841
-
1842
- $social_sites = array(
1843
- 'facebook' => 'fa fa-facebook-f',
1844
- 'twitter' => 'fa fa-twitter',
1845
- 'linkedin' => 'fa fa-linkedin',
1846
- 'google' => 'fa fa-google-plus',
1847
- 'youtube' => 'fa fa-youtube',
1848
- 'instagram' => 'fa fa-instagram',
1849
- 'skype' => 'fa fa-skype',
1850
- 'pinterest' => 'fa fa-pinterest',
1851
- 'dribbble' => 'fa fa-dribbble',
1852
- 'behance' => 'fa fa-behance',
1853
- 'whatsapp' => 'fa fa-whatsapp',
1854
- 'telegram' => 'fa fa-telegram',
1855
- 'mail' => 'fa fa-envelope',
1856
- 'site' => 'fa fa-link',
1857
- 'number' => 'fa fa-phone',
1858
- );
1859
-
1860
- echo '<ul class="premium-person-social-list">';
1861
- foreach ( $social_sites as $site => $icon ) {
1862
-
1863
- if ( ! \Elementor\Plugin::instance()->editor->is_edit_mode() ) {
1864
- if ( 'number' === $site && ! wp_is_mobile() ) {
1865
- continue;
1866
- }
1867
- }
1868
-
1869
- $value = ( '' === $person ) ? $settings[ 'premium_person_' . $site ] : $person[ 'multiple_' . $site ];
1870
-
1871
- if ( ! empty( $value ) ) {
1872
- $icon_class = sprintf( 'elementor-icon premium-person-list-item premium-person-%s', $site );
1873
- ?>
1874
- <li class="<?php echo esc_attr( $icon_class ); ?>">
1875
- <a href="<?php echo esc_url( $value ); ?>" target="_blank">
1876
- <i class="<?php echo esc_attr( $icon ); ?>"></i>
1877
- </a>
1878
- </li>
1879
- <?php
1880
- }
1881
- }
1882
- echo '</ul>';
1883
-
1884
- }
1885
-
1886
- /**
1887
- * Render Person Info
1888
- *
1889
- * @since 3.12.0
1890
- * @access protected
1891
- *
1892
- * @param object $person current person.
1893
- * @param integer $index person index.
1894
- */
1895
- protected function render_person_info( $person = '', $index = '' ) {
1896
-
1897
- $settings = $this->get_settings_for_display();
1898
-
1899
- $this->add_inline_editing_attributes( 'premium_person_name', 'advanced' );
1900
-
1901
- $this->add_inline_editing_attributes( 'premium_person_title', 'advanced' );
1902
-
1903
- $this->add_inline_editing_attributes( 'premium_person_content', 'advanced' );
1904
-
1905
- $name_heading = Helper_Functions::validate_html_tag( $settings['premium_person_name_heading'] );
1906
-
1907
- $title_heading = Helper_Functions::validate_html_tag( $settings['premium_person_title_heading'] );
1908
-
1909
- $skin = $settings['premium_person_style'];
1910
-
1911
- if ( empty( $person ) ) :
1912
- ?>
1913
- <div class="premium-person-info-container">
1914
- <?php if ( 'style3' !== $skin && ! empty( $settings['premium_person_name'] ) ) : ?>
1915
- <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name"><span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_name' ) ); ?>><?php echo wp_kses_post( $settings['premium_person_name'] ); ?></span></<?php echo wp_kses_post( $name_heading ); ?>>
1916
- <?php
1917
- endif;
1918
-
1919
- if ( 'style3' === $skin ) :
1920
- ?>
1921
- <div class="premium-person-title-desc-wrap">
1922
- <?php
1923
- endif;
1924
- if ( ! empty( $settings['premium_person_title'] ) ) :
1925
- ?>
1926
- <<?php echo wp_kses_post( $title_heading ); ?> class="premium-person-title"><span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_title' ) ); ?>><?php echo wp_kses_post( $settings['premium_person_title'] ); ?></span></<?php echo wp_kses_post( $title_heading ); ?>>
1927
- <?php
1928
- endif;
1929
-
1930
- if ( ! empty( $settings['premium_person_content'] ) ) :
1931
- ?>
1932
- <div class="premium-person-content">
1933
- <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_content' ) ); ?>>
1934
- <?php echo $this->parse_text_editor( $settings['premium_person_content'] ); ?>
1935
- </div>
1936
- </div>
1937
- <?php
1938
- endif;
1939
- if ( 'style3' === $skin ) :
1940
- ?>
1941
- </div>
1942
- <?php
1943
- endif;
1944
-
1945
- if ( 'style3' === $skin ) :
1946
- ?>
1947
- <div class="premium-person-name-icons-wrap">
1948
- <?php if ( ! empty( $settings['premium_person_name'] ) ) : ?>
1949
- <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name"><span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_name' ) ); ?>><?php echo wp_kses_post( $settings['premium_person_name'] ); ?></span></<?php echo wp_kses_post( $name_heading ); ?>>
1950
- <?php
1951
- endif;
1952
- if ( 'yes' === $settings['premium_person_social_enable'] ) :
1953
- $this->get_social_icons();
1954
- endif;
1955
- ?>
1956
- </div>
1957
- <?php
1958
- endif;
1959
-
1960
- if ( 'style1' === $settings['premium_person_style'] && 'yes' === $settings['premium_person_social_enable'] ) :
1961
- $this->get_social_icons();
1962
- endif;
1963
- ?>
1964
- </div>
1965
- <?php
1966
- else :
1967
-
1968
- $name_setting_key = $this->get_repeater_setting_key( 'multiple_name', 'multiple_persons', $index );
1969
- $title_setting_key = $this->get_repeater_setting_key( 'multiple_title', 'multiple_persons', $index );
1970
- $desc_setting_key = $this->get_repeater_setting_key( 'multiple_description', 'multiple_persons', $index );
1971
-
1972
- $this->add_inline_editing_attributes( $name_setting_key, 'advanced' );
1973
- $this->add_inline_editing_attributes( $title_setting_key, 'advanced' );
1974
- $this->add_inline_editing_attributes( $desc_setting_key, 'advanced' );
1975
-
1976
- ?>
1977
- <div class="premium-person-info-container">
1978
- <?php if ( 'style3' !== $skin && ! empty( $person['multiple_name'] ) ) : ?>
1979
- <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name"><span <?php echo wp_kses_post( $this->get_render_attribute_string( $name_setting_key ) ); ?>><?php echo wp_kses_post( $person['multiple_name'] ); ?></span></<?php echo wp_kses_post( $name_heading ); ?>>
1980
- <?php
1981
- endif;
1982
-
1983
- if ( 'style3' === $skin ) :
1984
- ?>
1985
- <div class="premium-person-title-desc-wrap">
1986
- <?php
1987
- endif;
1988
- if ( ! empty( $person['multiple_title'] ) ) :
1989
- ?>
1990
- <<?php echo wp_kses_post( $title_heading ); ?> class="premium-person-title">
1991
- <span <?php echo wp_kses_post( $this->get_render_attribute_string( $title_setting_key ) ); ?>>
1992
- <?php echo wp_kses_post( $person['multiple_title'] ); ?>
1993
- </span>
1994
- </<?php echo wp_kses_post( $title_heading ); ?>>
1995
- <?php
1996
- endif;
1997
-
1998
- if ( ! empty( $person['multiple_description'] ) ) :
1999
- ?>
2000
- <div class="premium-person-content">
2001
- <div <?php echo wp_kses_post( $this->get_render_attribute_string( $desc_setting_key ) ); ?>>
2002
- <?php echo $this->parse_text_editor( $person['multiple_description'] ); ?>
2003
- </div>
2004
- </div>
2005
- <?php
2006
- endif;
2007
- if ( 'style3' === $skin ) :
2008
- ?>
2009
- </div>
2010
- <?php
2011
- endif;
2012
-
2013
- if ( 'style3' === $skin ) :
2014
- ?>
2015
- <div class="premium-person-name-icons-wrap">
2016
- <?php if ( ! empty( $person['multiple_name'] ) ) : ?>
2017
- <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name">
2018
- <span <?php echo wp_kses_post( $this->get_render_attribute_string( $name_setting_key ) ); ?>>
2019
- <?php echo wp_kses_post( $person['multiple_name'] ); ?>
2020
- </span>
2021
- </<?php echo wp_kses_post( $name_heading ); ?>>
2022
- <?php
2023
- endif;
2024
- if ( 'yes' === $person['multiple_social_enable'] ) :
2025
- $this->get_social_icons( $person );
2026
- endif;
2027
- ?>
2028
- </div>
2029
- <?php
2030
- endif;
2031
-
2032
- if ( 'style1' === $settings['premium_person_style'] && 'yes' === $person['multiple_social_enable'] ) :
2033
- $this->get_social_icons( $person );
2034
- endif;
2035
- ?>
2036
- </div>
2037
- <?php
2038
- endif;
2039
-
2040
- }
2041
-
2042
-
2043
- /**
2044
- * Render Persons widget output in the editor.
2045
- *
2046
- * Written as a Backbone JavaScript template and used to generate the live preview.
2047
- *
2048
- * @since 1.0.0
2049
- * @access protected
2050
- */
2051
- protected function content_template() {
2052
- ?>
2053
- <#
2054
-
2055
- view.addInlineEditingAttributes( 'premium_person_name', 'advanced' );
2056
-
2057
- view.addInlineEditingAttributes( 'premium_person_title', 'advanced' );
2058
-
2059
- view.addInlineEditingAttributes( 'premium_person_content', 'advanced' );
2060
-
2061
- var nameHeading = elementor.helpers.validateHTMLTag( settings.premium_person_name_heading ),
2062
-
2063
- titleHeading = elementor.helpers.validateHTMLTag( settings.premium_person_title_heading ),
2064
-
2065
- imageEffect = 'premium-person-' + settings.premium_person_hover_image_effect + '-effect' ;
2066
-
2067
- skin = settings.premium_person_style;
2068
-
2069
- view.addRenderAttribute( 'persons_container', 'class', [ 'premium-persons-container', 'premium-person-' + skin ] );
2070
-
2071
- view.addRenderAttribute('person_container', 'class', [ 'premium-person-container', imageEffect ] );
2072
-
2073
- var imageHtml = '';
2074
- if ( settings.premium_person_image.url ) {
2075
- var image = {
2076
- id: settings.premium_person_image.id,
2077
- url: settings.premium_person_image.url,
2078
- size: settings.thumbnail_size,
2079
- dimension: settings.thumbnail_custom_dimension,
2080
- model: view.getEditModel()
2081
- };
2082
-
2083
- var image_url = elementor.imagesManager.getImageUrl( image );
2084
-
2085
- imageHtml = '<img src="' + image_url + '"/>';
2086
-
2087
- }
2088
-
2089
- if ( settings.multiple ) {
2090
- var persons = settings.multiple_persons;
2091
- view.addRenderAttribute( 'persons_container', 'class', 'multiple-persons' );
2092
- view.addRenderAttribute( 'persons_container', 'data-persons-equal', settings.multiple_equal_height );
2093
- }
2094
-
2095
- var carousel = 'yes' === settings.carousel ? true : false;
2096
-
2097
- if( carousel ) {
2098
-
2099
- view.addRenderAttribute('persons_container', {
2100
- 'data-carousel': carousel,
2101
- });
2102
-
2103
- }
2104
-
2105
-
2106
- function getSocialIcons( person = null ) {
2107
-
2108
- var personSettings,
2109
- socialIcons;
2110
-
2111
- if( null === person ) {
2112
- personSettings = settings;
2113
- socialIcons = {
2114
- facebook: settings.premium_person_facebook,
2115
- twitter: settings.premium_person_twitter,
2116
- linkedin: settings.premium_person_linkedin,
2117
- google: settings.premium_person_google,
2118
- youtube: settings.premium_person_youtube,
2119
- instagram: settings.premium_person_instagram,
2120
- skype: settings.premium_person_skype,
2121
- pinterest: settings.premium_person_pinterest,
2122
- dribbble: settings.premium_person_dribbble,
2123
- behance: settings.premium_person_behance,
2124
- whatsapp: settings.premium_person_whatsapp,
2125
- telegram: settings.premium_person_telegram,
2126
- mail: settings.premium_person_mail,
2127
- site: settings.premium_person_site,
2128
- number: settings.premium_person_number
2129
- };
2130
- } else {
2131
- personSettings = person;
2132
- socialIcons = {
2133
- facebook: person.multiple_facebook,
2134
- twitter: person.multiple_twitter,
2135
- linkedin: person.multiple_linkedin,
2136
- google: person.multiple_google,
2137
- youtube: person.multiple_youtube,
2138
- instagram: person.multiple_instagram,
2139
- skype: person.multiple_skype,
2140
- pinterest: person.multiple_pinterest,
2141
- dribbble: person.multiple_dribbble,
2142
- behance: person.multiple_behance,
2143
- whatsapp: person.multiple_whatsapp,
2144
- telegram: person.multiple_telegram,
2145
- mail: person.multiple_mail,
2146
- site: person.multiple_site,
2147
- number: person.multiple_number
2148
- };
2149
- }
2150
-
2151
- #>
2152
- <ul class="premium-person-social-list">
2153
- <# if( '' != socialIcons.facebook ) { #>
2154
- <li class="elementor-icon premium-person-list-item premium-person-facebook"><a href="{{ socialIcons.facebook }}" target="_blank"><i class="fa fa-facebook-f"></i></a></li>
2155
- <# } #>
2156
-
2157
- <# if( '' != socialIcons.twitter ) { #>
2158
- <li class="elementor-icon premium-person-list-item premium-person-twitter"><a href="{{ socialIcons.twitter }}" target="_blank"><i class="fa fa-twitter"></i></a></li>
2159
- <# } #>
2160
-
2161
- <# if( '' != socialIcons.linkedin ) { #>
2162
- <li class="elementor-icon premium-person-list-item premium-person-linkedin"><a href="{{ socialIcons.linkedin }}" target="_blank"><i class="fa fa-linkedin"></i></a></li>
2163
- <# } #>
2164
-
2165
- <# if( '' != socialIcons.google ) { #>
2166
- <li class="elementor-icon premium-person-list-item premium-person-google"><a href="{{ socialIcons.google }}" target="_blank"><i class="fa fa-google-plus"></i></a></li>
2167
- <# } #>
2168
-
2169
- <# if( '' != socialIcons.youtube ) { #>
2170
- <li class="elementor-icon premium-person-list-item premium-person-youtube"><a href="{{ socialIcons.youtube }}" target="_blank"><i class="fa fa-youtube"></i></a></li>
2171
- <# } #>
2172
-
2173
- <# if( '' != socialIcons.instagram ) { #>
2174
- <li class="elementor-icon premium-person-list-item premium-person-instagram"><a href="{{ socialIcons.instagram }}" target="_blank"><i class="fa fa-instagram"></i></a></li>
2175
- <# } #>
2176
-
2177
- <# if( '' != socialIcons.skype ) { #>
2178
- <li class="elementor-icon premium-person-list-item premium-person-skype"><a href="{{ socialIcons.skype }}" target="_blank"><i class="fa fa-skype"></i></a></li>
2179
- <# } #>
2180
-
2181
- <# if( '' != socialIcons.pinterest ) { #>
2182
- <li class="elementor-icon premium-person-list-item premium-person-pinterest"><a href="{{ socialIcons.pinterest }}" target="_blank"><i class="fa fa-pinterest"></i></a></li>
2183
- <# } #>
2184
-
2185
- <# if( '' != socialIcons.dribbble ) { #>
2186
- <li class="elementor-icon premium-person-list-item premium-person-dribbble"><a href="{{ socialIcons.dribbble }}" target="_blank"><i class="fa fa-dribbble"></i></a></li>
2187
- <# } #>
2188
-
2189
- <# if( '' != socialIcons.behance ) { #>
2190
- <li class="elementor-icon premium-person-list-item premium-person-behance"><a href="{{ socialIcons.behance }}" target="_blank"><i class="fa fa-behance"></i></a></li>
2191
- <# } #>
2192
-
2193
- <# if( '' != socialIcons.whatsapp ) { #>
2194
- <li class="elementor-icon premium-person-list-item premium-person-whatsapp"><a href="{{ socialIcons.whatsapp }}" target="_blank"><i class="fa fa-whatsapp"></i></a></li>
2195
- <# } #>
2196
-
2197
- <# if( '' != socialIcons.telegram ) { #>
2198
- <li class="elementor-icon premium-person-list-item premium-person-telegram"><a href="{{ socialIcons.mail }}" target="_blank"><i class="fa fa-telegram"></i></a></li>
2199
- <# } #>
2200
-
2201
- <# if( '' != socialIcons.mail ) { #>
2202
- <li class="elementor-icon premium-person-list-item premium-person-mail"><a href="{{ socialIcons.mail }}" target="_blank"><i class="fa fa-envelope"></i></a></li>
2203
- <# } #>
2204
-
2205
- <# if( '' != socialIcons.site ) { #>
2206
- <li class="elementor-icon premium-person-list-item premium-person-site"><a href="{{ socialIcons.site }}" target="_blank"><i class="fa fa-link"></i></a></li>
2207
- <# } #>
2208
-
2209
- <# if( '' != socialIcons.number ) { #>
2210
- <li class="elementor-icon premium-person-list-item premium-person-number"><a href="{{ socialIcons.number }}" target="_blank"><i class="fa fa-phone"></i></a></li>
2211
- <# } #>
2212
-
2213
- </ul>
2214
- <# }
2215
- #>
2216
-
2217
- <div {{{ view.getRenderAttributeString('persons_container') }}}>
2218
- <# if( 'yes' !== settings.multiple ) { #>
2219
- <div {{{ view.getRenderAttributeString('person_container') }}}>
2220
- <div class="premium-person-image-container">
2221
- <div class="premium-person-image-wrap">
2222
- {{{imageHtml}}}
2223
- </div>
2224
- <# if ( 'style2' === settings.premium_person_style && 'yes' === settings.premium_person_social_enable ) { #>
2225
- <div class="premium-person-social">
2226
- <# getSocialIcons(); #>
2227
- </div>
2228
- <# } #>
2229
- </div>
2230
- <div class="premium-person-info">
2231
- <div class="premium-person-info-container">
2232
- <# if( 'style3' !== skin && '' != settings.premium_person_name ) { #>
2233
- <{{{nameHeading}}} class="premium-person-name">
2234
- <span {{{ view.getRenderAttributeString('premium_person_name') }}}>
2235
- {{{ settings.premium_person_name }}}
2236
- </span>
2237
- </{{{nameHeading}}}>
2238
- <# }
2239
-
2240
- if( 'style3' === skin ) { #>
2241
- <div class="premium-person-title-desc-wrap">
2242
- <# }
2243
- if( '' != settings.premium_person_title ) { #>
2244
- <{{{titleHeading}}} class="premium-person-title">
2245
- <span {{{ view.getRenderAttributeString('premium_person_title') }}}>
2246
- {{{ settings.premium_person_title }}}
2247
- </span>
2248
- </{{{titleHeading}}}>
2249
- <# }
2250
- if( '' != settings.premium_person_content ) { #>
2251
- <div class="premium-person-content">
2252
- <div {{{ view.getRenderAttributeString('premium_person_content') }}}>
2253
- {{{ settings.premium_person_content }}}
2254
- </div>
2255
- </div>
2256
- <# }
2257
- if( 'style3' === skin ) { #>
2258
- </div>
2259
- <# }
2260
-
2261
- if( 'style3' === skin ) { #>
2262
- <div class="premium-person-name-icons-wrap">
2263
- <# if( '' != settings.premium_person_name ) { #>
2264
- <{{{nameHeading}}} class="premium-person-name">
2265
- <span {{{ view.getRenderAttributeString('premium_person_name') }}}>
2266
- {{{ settings.premium_person_name }}}
2267
- </span>
2268
- </{{{nameHeading}}}>
2269
- <# }
2270
- if( 'yes' === settings.premium_person_social_enable ) {
2271
- getSocialIcons();
2272
- } #>
2273
- </div>
2274
- <# }
2275
-
2276
- if ( 'style1' === settings.premium_person_style && 'yes' === settings.premium_person_social_enable ) {
2277
- getSocialIcons();
2278
- } #>
2279
- </div>
2280
- </div>
2281
- </div>
2282
- <# } else {
2283
- _.each( persons, function( person, index ) {
2284
- var nameSettingKey = view.getRepeaterSettingKey( 'multiple_name', 'multiple_persons', index ),
2285
- titleSettingKey = view.getRepeaterSettingKey( 'multiple_title', 'multiple_persons', index ),
2286
- descSettingKey = view.getRepeaterSettingKey( 'multiple_description', 'multiple_persons', index );
2287
-
2288
-
2289
- view.addInlineEditingAttributes( nameSettingKey, 'advanced' );
2290
- view.addInlineEditingAttributes( titleSettingKey, 'advanced' );
2291
- view.addInlineEditingAttributes( descSettingKey, 'advanced' );
2292
-
2293
- var personImageHtml = '';
2294
- if ( person.multiple_image.url ) {
2295
- var personImage = {
2296
- id: person.multiple_image.id,
2297
- url: person.multiple_image.url,
2298
- size: settings.thumbnail_size,
2299
- dimension: settings.thumbnail_custom_dimension,
2300
- model: view.getEditModel()
2301
- };
2302
-
2303
- var personImageUrl = elementor.imagesManager.getImageUrl( personImage );
2304
-
2305
- personImageHtml = '<img src="' + personImageUrl + '"/>';
2306
-
2307
- }
2308
- #>
2309
- <div {{{ view.getRenderAttributeString('person_container') }}}>
2310
- <div class="premium-person-image-container">
2311
- <div class="premium-person-image-wrap">
2312
- {{{personImageHtml}}}
2313
- </div>
2314
- <# if ( 'style2' === settings.premium_person_style && 'yes' === person.multiple_social_enable ) { #>
2315
- <div class="premium-person-social">
2316
- <# getSocialIcons( person ); #>
2317
- </div>
2318
- <# } #>
2319
- </div>
2320
- <div class="premium-person-info">
2321
- <div class="premium-person-info-container">
2322
- <# if( 'style3' !== skin && '' != person.multiple_name ) { #>
2323
- <{{{nameHeading}}} class="premium-person-name">
2324
- <span {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2325
- {{{ person.multiple_name }}}
2326
- </span></{{{nameHeading}}}>
2327
- <# }
2328
-
2329
- if( 'style3' === skin ) { #>
2330
- <div class="premium-person-title-desc-wrap">
2331
- <# }
2332
- if( '' != person.multiple_title ) { #>
2333
- <{{{titleHeading}}} class="premium-person-title">
2334
- <span {{{ view.getRenderAttributeString( titleSettingKey ) }}}>
2335
- {{{ person.multiple_title }}}
2336
- </span></{{{titleHeading}}}>
2337
- <# }
2338
- if( '' != person.multiple_description ) { #>
2339
- <div class="premium-person-content">
2340
- <div {{{ view.getRenderAttributeString( descSettingKey ) }}}>
2341
- {{{ person.multiple_description }}}
2342
- </div>
2343
- </div>
2344
- <# }
2345
- if( 'style3' === skin ) { #>
2346
- </div>
2347
- <# }
2348
-
2349
- if( 'style3' === skin ) { #>
2350
- <div class="premium-person-name-icons-wrap">
2351
- <# if( '' != settings.premium_person_name ) { #>
2352
- <{{{nameHeading}}} class="premium-person-name">
2353
- <span {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2354
- {{{ person.multiple_name }}}
2355
- </span></{{{nameHeading}}}>
2356
- <# }
2357
- if( 'yes' === person.multiple_social_enable ) {
2358
- getSocialIcons( person );
2359
- } #>
2360
- </div>
2361
- <# }
2362
-
2363
- if ( 'style1' === settings.premium_person_style && 'yes' === person.multiple_social_enable ) {
2364
- getSocialIcons( person );
2365
- } #>
2366
- </div>
2367
- </div>
2368
- </div>
2369
- <# });
2370
- } #>
2371
-
2372
- </div>
2373
- <?php
2374
- }
2375
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Premium Persons.
4
+ */
5
+
6
+ namespace PremiumAddons\Widgets;
7
+
8
+ // Elementor Classes.
9
+ use Elementor\Widget_Base;
10
+ use Elementor\Utils;
11
+ use Elementor\Control_Media;
12
+ use Elementor\Controls_Manager;
13
+ use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
14
+ use Elementor\Repeater;
15
+ use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
16
+ use Elementor\Group_Control_Image_Size;
17
+ use Elementor\Group_Control_Typography;
18
+ use Elementor\Group_Control_Css_Filter;
19
+ use Elementor\Group_Control_Box_Shadow;
20
+ use Elementor\Group_Control_Text_Shadow;
21
+ use Elementor\Group_Control_Border;
22
+
23
+ // PremiumAddons Classes.
24
+ use PremiumAddons\Includes\Helper_Functions;
25
+
26
+ if ( ! defined( 'ABSPATH' ) ) {
27
+ exit; // If this file is called directly, abort.
28
+ }
29
+
30
+ /**
31
+ * Class Premium_Person
32
+ */
33
+ class Premium_Person extends Widget_Base {
34
+
35
+ /**
36
+ * Retrieve Widget Name.
37
+ *
38
+ * @since 1.0.0
39
+ * @access public
40
+ */
41
+ public function get_name() {
42
+ return 'premium-addon-person';
43
+ }
44
+
45
+ /**
46
+ * Retrieve Widget Title.
47
+ *
48
+ * @since 1.0.0
49
+ * @access public
50
+ */
51
+ public function get_title() {
52
+ return sprintf( '%1$s %2$s', Helper_Functions::get_prefix(), __( 'Team Members', 'premium-addons-for-elementor' ) );
53
+ }
54
+
55
+ /**
56
+ * Retrieve Widget Icon.
57
+ *
58
+ * @since 1.0.0
59
+ * @access public
60
+ *
61
+ * @return string widget icon.
62
+ */
63
+ public function get_icon() {
64
+ return 'pa-person';
65
+ }
66
+
67
+ /**
68
+ * Retrieve Widget Dependent CSS.
69
+ *
70
+ * @since 1.0.0
71
+ * @access public
72
+ *
73
+ * @return array CSS style handles.
74
+ */
75
+ public function get_style_depends() {
76
+ return array(
77
+ 'premium-addons',
78
+ );
79
+ }
80
+
81
+ /**
82
+ * Retrieve Widget Dependent JS.
83
+ *
84
+ * @since 1.0.0
85
+ * @access public
86
+ *
87
+ * @return array JS script handles.
88
+ */
89
+ public function get_script_depends() {
90
+ return array(
91
+ 'imagesloaded',
92
+ 'pa-slick',
93
+ 'premium-addons',
94
+ );
95
+ }
96
+
97
+ /**
98
+ * Retrieve Widget Categories.
99
+ *
100
+ * @since 1.5.1
101
+ * @access public
102
+ *
103
+ * @return array Widget categories.
104
+ */
105
+ public function get_categories() {
106
+ return array( 'premium-elements' );
107
+ }
108
+
109
+ /**
110
+ * Retrieve Widget Keywords.
111
+ *
112
+ * @since 1.0.0
113
+ * @access public
114
+ *
115
+ * @return string Widget keywords.
116
+ */
117
+ public function get_keywords() {
118
+ return array( 'person', 'carousel', 'slider', 'group' );
119
+ }
120
+
121
+ /**
122
+ * Retrieve Widget Support URL.
123
+ *
124
+ * @access public
125
+ *
126
+ * @return string support URL.
127
+ */
128
+ public function get_custom_help_url() {
129
+ return 'https://premiumaddons.com/support/';
130
+ }
131
+
132
+ /**
133
+ * Register Persons controls.
134
+ *
135
+ * @since 1.0.0
136
+ * @access protected
137
+ */
138
+ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
139
+
140
+ $this->start_controls_section(
141
+ 'premium_person_general_settings',
142
+ array(
143
+ 'label' => __( 'General Settings', 'premium-addons-for-elementor' ),
144
+ )
145
+ );
146
+
147
+ $this->add_control(
148
+ 'multiple',
149
+ array(
150
+ 'label' => __( 'Multiple Member', 'premium-addons-for-elementor' ),
151
+ 'description' => __( 'Enable this option if you need to add multiple persons', 'premium-addons-for-elementor' ),
152
+ 'type' => Controls_Manager::SWITCHER,
153
+ )
154
+ );
155
+
156
+ $this->add_control(
157
+ 'premium_person_style',
158
+ array(
159
+ 'label' => __( 'Style', 'premium-addons-for-elementor' ),
160
+ 'type' => Controls_Manager::SELECT,
161
+ 'default' => 'style1',
162
+ 'options' => array(
163
+ 'style1' => __( 'Style 1', 'premium-addons-for-elementor' ),
164
+ 'style2' => __( 'Style 2', 'premium-addons-for-elementor' ),
165
+ 'style3' => __( 'Style 3', 'premium-addons-for-elementor' ),
166
+ ),
167
+ 'label_block' => true,
168
+ 'render_type' => 'template',
169
+ )
170
+ );
171
+
172
+ $this->add_control(
173
+ 'title_rotate',
174
+ array(
175
+ 'label' => __( 'Title Rotate', 'premium-addons-for-elementor' ),
176
+ 'type' => Controls_Manager::SELECT,
177
+ 'options' => array(
178
+ 'cw' => __( '90 Degrees', 'premium-addons-for-elementor' ),
179
+ 'ccw' => __( '-90 Degrees', 'premium-addons-for-elementor' ),
180
+ ),
181
+ 'selectors_dictionary' => array(
182
+ 'cw' => '90deg',
183
+ 'ccw' => '-90deg',
184
+ ),
185
+ 'default' => 'cw',
186
+ 'prefix_class' => 'premium-persons-title-',
187
+ 'label_block' => true,
188
+ 'condition' => array(
189
+ 'premium_person_style' => 'style3',
190
+ ),
191
+ )
192
+ );
193
+
194
+ $this->add_group_control(
195
+ Group_Control_Image_Size::get_type(),
196
+ array(
197
+ 'name' => 'thumbnail',
198
+ 'default' => 'full',
199
+ 'separator' => 'none',
200
+ )
201
+ );
202
+
203
+ $this->add_responsive_control(
204
+ 'premium_person_image_width',
205
+ array(
206
+ 'label' => __( 'Width', 'premium-addons-for-elementor' ),
207
+ 'type' => Controls_Manager::SLIDER,
208
+ 'description' => __( 'Enter image width in (PX, EM, %), default is 100%', 'premium-addons-for-elementor' ),
209
+ 'size_units' => array( 'px', 'em', '%' ),
210
+ 'range' => array(
211
+ 'px' => array(
212
+ 'min' => 1,
213
+ 'max' => 800,
214
+ ),
215
+ 'em' => array(
216
+ 'min' => 1,
217
+ 'max' => 50,
218
+ ),
219
+ ),
220
+ 'default' => array(
221
+ 'unit' => '%',
222
+ 'size' => '100',
223
+ ),
224
+ 'label_block' => true,
225
+ 'selectors' => array(
226
+ '{{WRAPPER}} .premium-persons-container' => 'width: {{SIZE}}{{UNIT}};',
227
+ ),
228
+ )
229
+ );
230
+
231
+ $this->add_responsive_control(
232
+ 'premium_person_align',
233
+ array(
234
+ 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
235
+ 'type' => Controls_Manager::CHOOSE,
236
+ 'options' => array(
237
+ 'flex-start' => array(
238
+ 'title' => __( 'Left', 'premium-addons-for-elementor' ),
239
+ 'icon' => 'eicon-text-align-left',
240
+ ),
241
+ 'center' => array(
242
+ 'title' => __( 'Center', 'premium-addons-for-elementor' ),
243
+ 'icon' => 'eicon-text-align-center',
244
+ ),
245
+ 'flex-end' => array(
246
+ 'title' => __( 'Right', 'premium-addons-for-elementor' ),
247
+ 'icon' => 'eicon-text-align-right',
248
+ ),
249
+ ),
250
+ 'default' => 'center',
251
+ 'selectors' => array(
252
+ '{{WRAPPER}} .elementor-widget-container' => 'justify-content: {{VALUE}};',
253
+ ),
254
+ )
255
+ );
256
+
257
+ $this->add_control(
258
+ 'premium_person_hover_image_effect',
259
+ array(
260
+ 'label' => __( 'Hover Effect', 'premium-addons-for-elementor' ),
261
+ 'type' => Controls_Manager::SELECT,
262
+ 'options' => array(
263
+ 'none' => __( 'None', 'premium-addons-for-elementor' ),
264
+ 'zoomin' => __( 'Zoom In', 'premium-addons-for-elementor' ),
265
+ 'zoomout' => __( 'Zoom Out', 'premium-addons-for-elementor' ),
266
+ 'scale' => __( 'Scale', 'premium-addons-for-elementor' ),
267
+ 'grayscale' => __( 'Grayscale', 'premium-addons-for-elementor' ),
268
+ 'blur' => __( 'Blur', 'premium-addons-for-elementor' ),
269
+ 'bright' => __( 'Bright', 'premium-addons-for-elementor' ),
270
+ 'sepia' => __( 'Sepia', 'premium-addons-for-elementor' ),
271
+ 'trans' => __( 'Translate', 'premium-addons-for-elementor' ),
272
+ ),
273
+ 'default' => 'zoomin',
274
+ 'label_block' => true,
275
+ )
276
+ );
277
+
278
+ $this->add_responsive_control(
279
+ 'premium_person_text_align',
280
+ array(
281
+ 'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
282
+ 'type' => Controls_Manager::CHOOSE,
283
+ 'options' => array(
284
+ 'left' => array(
285
+ 'title' => __( 'Left', 'premium-addons-for-elementor' ),
286
+ 'icon' => 'eicon-text-align-left',
287
+ ),
288
+ 'center' => array(
289
+ 'title' => __( 'Center', 'premium-addons-for-elementor' ),
290
+ 'icon' => 'eicon-text-align-center',
291
+ ),
292
+ 'right' => array(
293
+ 'title' => __( 'Right', 'premium-addons-for-elementor' ),
294
+ 'icon' => 'eicon-text-align-right',
295
+ ),
296
+ ),
297
+ 'default' => 'left',
298
+ 'selectors' => array(
299
+ '{{WRAPPER}} .premium-person-info' => 'text-align: {{VALUE}};',
300
+ ),
301
+ )
302
+ );
303
+
304
+ $this->add_control(
305
+ 'premium_person_name_heading',
306
+ array(
307
+ 'label' => __( 'Name Tag', 'premium-addons-for-elementor' ),
308
+ 'type' => Controls_Manager::SELECT,
309
+ 'default' => 'h2',
310
+ 'options' => array(
311
+ 'h1' => 'H1',
312
+ 'h2' => 'H2',
313
+ 'h3' => 'H3',
314
+ 'h4' => 'H4',
315
+ 'h5' => 'H5',
316
+ 'h6' => 'H6',
317
+ 'div' => 'div',
318
+ 'span' => 'span',
319
+ 'p' => 'p',
320
+ ),
321
+ 'label_block' => true,
322
+ )
323
+ );
324
+
325
+ $this->add_control(
326
+ 'premium_person_title_heading',
327
+ array(
328
+ 'label' => __( 'Title Tag', 'premium-addons-for-elementor' ),
329
+ 'type' => Controls_Manager::SELECT,
330
+ 'default' => 'h4',
331
+ 'options' => array(
332
+ 'h1' => 'H1',
333
+ 'h2' => 'H2',
334
+ 'h3' => 'H3',
335
+ 'h4' => 'H4',
336
+ 'h5' => 'H5',
337
+ 'h6' => 'H6',
338
+ 'div' => 'div',
339
+ 'span' => 'span',
340
+ 'p' => 'p',
341
+ ),
342
+ 'label_block' => true,
343
+ )
344
+ );
345
+
346
+ $this->add_responsive_control(
347
+ 'persons_per_row',
348
+ array(
349
+ 'label' => __( 'Members/Row', 'premium-addons-for-elementor' ),
350
+ 'type' => Controls_Manager::SELECT,
351
+ 'options' => array(
352
+ '100%' => __( '1 Column', 'premium-addons-for-elementor' ),
353
+ '50%' => __( '2 Columns', 'premium-addons-for-elementor' ),
354
+ '33.33%' => __( '3 Columns', 'premium-addons-for-elementor' ),
355
+ '25%' => __( '4 Columns', 'premium-addons-for-elementor' ),
356
+ '20%' => __( '5 Columns', 'premium-addons-for-elementor' ),
357
+ '16.667%' => __( '6 Columns', 'premium-addons-for-elementor' ),
358
+ ),
359
+ 'default' => '33.33%',
360
+ 'tablet_default' => '100%',
361
+ 'mobile_default' => '100%',
362
+ 'render_type' => 'template',
363
+ 'selectors' => array(
364
+ '{{WRAPPER}} .premium-person-container' => 'width: {{VALUE}}',
365
+ ),
366
+ 'condition' => array(
367
+ 'multiple' => 'yes',
368
+ ),
369
+ 'frontend_available' => true,
370
+ )
371
+ );
372
+
373
+ $this->add_responsive_control(
374
+ 'spacing',
375
+ array(
376
+ 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),
377
+ 'type' => Controls_Manager::DIMENSIONS,
378
+ 'size_units' => array( 'px', '%', 'em' ),
379
+ 'default' => array(
380
+ 'top' => 5,
381
+ 'right' => 5,
382
+ 'bottom' => 5,
383
+ 'left' => 5,
384
+ ),
385
+ 'condition' => array(
386
+ 'multiple' => 'yes',
387
+ ),
388
+ 'selectors' => array(
389
+ '{{WRAPPER}} .premium-person-container' => 'padding: 0 {{RIGHT}}{{UNIT}} 0 {{LEFT}}{{UNIT}}; margin: {{TOP}}{{UNIT}} 0 {{BOTTOM}}{{UNIT}} 0',
390
+ ' {{WRAPPER}} .premium-person-style1 .premium-person-info' => 'left: {{LEFT}}{{UNIT}}; right: {{RIGHT}}{{UNIT}}',
391
+ ),
392
+ )
393
+ );
394
+
395
+ $this->add_control(
396
+ 'multiple_equal_height',
397
+ array(
398
+ 'label' => __( 'Equal Height', 'premium-addons-for-elementor' ),
399
+ 'type' => Controls_Manager::SWITCHER,
400
+ 'default' => 'yes',
401
+ 'description' => __( 'This option searches for the image with the largest height and applies that height to the other images', 'premium-addons-for-elementor' ),
402
+ 'condition' => array(
403
+ 'multiple' => 'yes',
404
+ 'custom_height[size]' => '',
405
+ ),
406
+ )
407
+ );
408
+
409
+ $this->add_responsive_control(
410
+ 'custom_height',
411
+ array(
412
+ 'label' => __( 'Custom Height', 'premium-addons-for-elementor' ),
413
+ 'type' => Controls_Manager::SLIDER,
414
+ 'size_units' => array( 'px', 'em' ),
415
+ 'range' => array(
416
+ 'px' => array(
417
+ 'min' => 0,
418
+ 'max' => 500,
419
+ ),
420
+ 'em' => array(
421
+ 'min' => 0,
422
+ 'max' => 50,
423
+ ),
424
+ ),
425
+ 'condition' => array(
426
+ 'multiple' => 'yes',
427
+ ),
428
+ 'selectors' => array(
429
+ '{{WRAPPER}} .premium-person-image-wrap' => 'height: {{SIZE}}{{UNIT}};',
430
+ ),
431
+ )
432
+ );
433
+
434
+ $this->end_controls_section();
435
+
436
+ $this->start_controls_section(
437
+ 'premium_person_settings',
438
+ array(
439
+ 'label' => __( 'Single Member Settings', 'premium-addons-for-elementor' ),
440
+ 'condition' => array(
441
+ 'multiple!' => 'yes',
442
+ ),
443
+ )
444
+ );
445
+
446
+ $this->add_control(
447
+ 'premium_person_image',
448
+ array(
449
+ 'label' => __( 'Image', 'premium-addons-for-elementor' ),
450
+ 'type' => Controls_Manager::MEDIA,
451
+ 'dynamic' => array( 'active' => true ),
452
+ 'default' => array(
453
+ 'url' => Utils::get_placeholder_image_src(),
454
+ ),
455
+ 'label_block' => true,
456
+ )
457
+ );
458
+
459
+ $this->add_control(
460
+ 'premium_person_name',
461
+ array(
462
+ 'label' => __( 'Name', 'premium-addons-for-elementor' ),
463
+ 'type' => Controls_Manager::TEXT,
464
+ 'dynamic' => array( 'active' => true ),
465
+ 'default' => 'John Frank',
466
+ 'separator' => 'before',
467
+ 'label_block' => true,
468
+ )
469
+ );
470
+
471
+ $this->add_control(
472
+ 'premium_person_title',
473
+ array(
474
+ 'label' => __( 'Title', 'premium-addons-for-elementor' ),
475
+ 'type' => Controls_Manager::TEXT,
476
+ 'dynamic' => array( 'active' => true ),
477
+ 'default' => __( 'Developer', 'premium-addons-for-elementor' ),
478
+ 'label_block' => true,
479
+ )
480
+ );
481
+
482
+ $this->add_control(
483
+ 'premium_person_content',
484
+ array(
485
+ 'label' => __( 'Description', 'premium-addons-for-elementor' ),
486
+ 'type' => Controls_Manager::WYSIWYG,
487
+ 'dynamic' => array( 'active' => true ),
488
+ 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', 'premium-addons-for-elementor' ),
489
+ )
490
+ );
491
+
492
+ $this->add_control(
493
+ 'premium_person_social_enable',
494
+ array(
495
+ 'label' => __( 'Enable Social Icons', 'premium-addons-for-elementor' ),
496
+ 'type' => Controls_Manager::SWITCHER,
497
+ 'default' => 'yes',
498
+ 'separator' => 'before',
499
+ )
500
+ );
501
+
502
+ $this->add_control(
503
+ 'premium_person_facebook',
504
+ array(
505
+ 'label' => __( 'Facebook', 'premium-addons-for-elementor' ),
506
+ 'type' => Controls_Manager::TEXT,
507
+ 'dynamic' => array( 'active' => true ),
508
+ 'default' => '#',
509
+ 'label_block' => true,
510
+ 'condition' => array(
511
+ 'premium_person_social_enable' => 'yes',
512
+ ),
513
+ )
514
+ );
515
+
516
+ $this->add_control(
517
+ 'premium_person_twitter',
518
+ array(
519
+ 'label' => __( 'Twitter', 'premium-addons-for-elementor' ),
520
+ 'type' => Controls_Manager::TEXT,
521
+ 'dynamic' => array( 'active' => true ),
522
+ 'default' => '#',
523
+ 'label_block' => true,
524
+ 'condition' => array(
525
+ 'premium_person_social_enable' => 'yes',
526
+ ),
527
+ )
528
+ );
529
+
530
+ $this->add_control(
531
+ 'premium_person_linkedin',
532
+ array(
533
+ 'label' => __( 'LinkedIn', 'premium-addons-for-elementor' ),
534
+ 'type' => Controls_Manager::TEXT,
535
+ 'dynamic' => array( 'active' => true ),
536
+ 'label_block' => true,
537
+ 'condition' => array(
538
+ 'premium_person_social_enable' => 'yes',
539
+ ),
540
+ )
541
+ );
542
+
543
+ $this->add_control(
544
+ 'premium_person_google',
545
+ array(
546
+ 'label' => __( 'Google+', 'premium-addons-for-elementor' ),
547
+ 'type' => Controls_Manager::TEXT,
548
+ 'dynamic' => array( 'active' => true ),
549
+ 'label_block' => true,
550
+ 'condition' => array(
551
+ 'premium_person_social_enable' => 'yes',
552
+ ),
553
+ )
554
+ );
555
+
556
+ $this->add_control(
557
+ 'premium_person_youtube',
558
+ array(
559
+ 'label' => __( 'YouTube', 'premium-addons-for-elementor' ),
560
+ 'type' => Controls_Manager::TEXT,
561
+ 'dynamic' => array( 'active' => true ),
562
+ 'label_block' => true,
563
+ 'condition' => array(
564
+ 'premium_person_social_enable' => 'yes',
565
+ ),
566
+ )
567
+ );
568
+
569
+ $this->add_control(
570
+ 'premium_person_instagram',
571
+ array(
572
+ 'label' => __( 'Instagram', 'premium-addons-for-elementor' ),
573
+ 'type' => Controls_Manager::TEXT,
574
+ 'dynamic' => array( 'active' => true ),
575
+ 'default' => '#',
576
+ 'label_block' => true,
577
+ 'condition' => array(
578
+ 'premium_person_social_enable' => 'yes',
579
+ ),
580
+ )
581
+ );
582
+
583
+ $this->add_control(
584
+ 'premium_person_skype',
585
+ array(
586
+ 'label' => __( 'Skype', 'premium-addons-for-elementor' ),
587
+ 'type' => Controls_Manager::TEXT,
588
+ 'dynamic' => array( 'active' => true ),
589
+ 'label_block' => true,
590
+ 'condition' => array(
591
+ 'premium_person_social_enable' => 'yes',
592
+ ),
593
+ )
594
+ );
595
+
596
+ $this->add_control(
597
+ 'premium_person_pinterest',
598
+ array(
599
+ 'label' => __( 'Pinterest', 'premium-addons-for-elementor' ),
600
+ 'type' => Controls_Manager::TEXT,
601
+ 'dynamic' => array( 'active' => true ),
602
+ 'label_block' => true,
603
+ 'condition' => array(
604
+ 'premium_person_social_enable' => 'yes',
605
+ ),
606
+ )
607
+ );
608
+
609
+ $this->add_control(
610
+ 'premium_person_dribbble',
611
+ array(
612
+ 'label' => __( 'Dribbble', 'premium-addons-for-elementor' ),
613
+ 'type' => Controls_Manager::TEXT,
614
+ 'dynamic' => array( 'active' => true ),
615
+ 'default' => '#',
616
+ 'label_block' => true,
617
+ 'condition' => array(
618
+ 'premium_person_social_enable' => 'yes',
619
+ ),
620
+ )
621
+ );
622
+
623
+ $this->add_control(
624
+ 'premium_person_behance',
625
+ array(
626
+ 'label' => __( 'Behance', 'premium-addons-for-elementor' ),
627
+ 'type' => Controls_Manager::TEXT,
628
+ 'dynamic' => array( 'active' => true ),
629
+ 'label_block' => true,
630
+ 'condition' => array(
631
+ 'premium_person_social_enable' => 'yes',
632
+ ),
633
+ )
634
+ );
635
+
636
+ $this->add_control(
637
+ 'premium_person_whatsapp',
638
+ array(
639
+ 'label' => __( 'WhatsApp', 'premium-addons-for-elementor' ),
640
+ 'type' => Controls_Manager::TEXT,
641
+ 'dynamic' => array( 'active' => true ),
642
+ 'label_block' => true,
643
+ 'condition' => array(
644
+ 'premium_person_social_enable' => 'yes',
645
+ ),
646
+ )
647
+ );
648
+
649
+ $this->add_control(
650
+ 'premium_person_telegram',
651
+ array(
652
+ 'label' => __( 'Telegram', 'premium-addons-for-elementor' ),
653
+ 'type' => Controls_Manager::TEXT,
654
+ 'dynamic' => array( 'active' => true ),
655
+ 'label_block' => true,
656
+ 'condition' => array(
657
+ 'premium_person_social_enable' => 'yes',
658
+ ),
659
+ )
660
+ );
661
+
662
+ $this->add_control(
663
+ 'premium_person_mail',
664
+ array(
665
+ 'label' => __( 'Email Address', 'premium-addons-for-elementor' ),
666
+ 'type' => Controls_Manager::TEXT,
667
+ 'dynamic' => array( 'active' => true ),
668
+ 'label_block' => true,
669
+ 'condition' => array(
670
+ 'premium_person_social_enable' => 'yes',
671
+ ),
672
+ )
673
+ );
674
+
675
+ $this->add_control(
676
+ 'premium_person_site',
677
+ array(
678
+ 'label' => __( 'Website', 'premium-addons-for-elementor' ),
679
+ 'type' => Controls_Manager::TEXT,
680
+ 'dynamic' => array( 'active' => true ),
681
+ 'label_block' => true,
682
+ 'condition' => array(
683
+ 'premium_person_social_enable' => 'yes',
684
+ ),
685
+ )
686
+ );
687
+
688
+ $this->add_control(
689
+ 'premium_person_number',
690
+ array(
691
+ 'label' => __( 'Phone Number', 'premium-addons-for-elementor' ),
692
+ 'type' => Controls_Manager::TEXT,
693
+ 'dynamic' => array( 'active' => true ),
694
+ 'description' => __( 'Example: tel: +012 345 678 910', 'premium-addons-for-elementor' ),
695
+ 'label_block' => true,
696
+ 'condition' => array(
697
+ 'premium_person_social_enable' => 'yes',
698
+ ),
699
+ )
700
+ );
701
+
702
+ $this->add_control(
703
+ 'phone_notice',
704
+ array(
705
+ 'raw' => __( 'Please note that Phone Number icon will show only on mobile devices.', 'premium-addons-for-elementor' ),
706
+ 'type' => Controls_Manager::RAW_HTML,
707
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
708
+ 'condition' => array(
709
+ 'premium_person_social_enable' => 'yes',
710
+ ),
711
+ )
712
+ );
713
+
714
+ $this->end_controls_section();
715
+
716
+ $this->start_controls_section(
717
+ 'multiple_settings',
718
+ array(
719
+ 'label' => __( 'Multiple Members Settings', 'premium-addons-for-elementor' ),
720
+ 'condition' => array(
721
+ 'multiple' => 'yes',
722
+ ),
723
+ )
724
+ );
725
+
726
+ $repeater = new REPEATER();
727
+
728
+ $repeater->add_control(
729
+ 'multiple_image',
730
+ array(
731
+ 'label' => __( 'Image', 'premium-addons-for-elementor' ),
732
+ 'type' => Controls_Manager::MEDIA,
733
+ 'dynamic' => array( 'active' => true ),
734
+ 'default' => array(
735
+ 'url' => Utils::get_placeholder_image_src(),
736
+ ),
737
+ )
738
+ );
739
+
740
+ $repeater->add_control(
741
+ 'multiple_name',
742
+ array(
743
+ 'label' => __( 'Name', 'premium-addons-for-elementor' ),
744
+ 'type' => Controls_Manager::TEXT,
745
+ 'dynamic' => array( 'active' => true ),
746
+ 'default' => 'John Frank',
747
+ 'separator' => 'before',
748
+ 'label_block' => true,
749
+ )
750
+ );
751
+
752
+ $repeater->add_control(
753
+ 'multiple_title',
754
+ array(
755
+ 'label' => __( 'Title', 'premium-addons-for-elementor' ),
756
+ 'type' => Controls_Manager::TEXT,
757
+ 'dynamic' => array( 'active' => true ),
758
+ 'default' => __( 'Developer', 'premium-addons-for-elementor' ),
759
+ 'label_block' => true,
760
+ )
761
+ );
762
+
763
+ $repeater->add_control(
764
+ 'multiple_description',
765
+ array(
766
+ 'label' => __( 'Description', 'premium-addons-for-elementor' ),
767
+ 'type' => Controls_Manager::WYSIWYG,
768
+ 'dynamic' => array( 'active' => true ),
769
+ 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', 'premium-addons-for-elementor' ),
770
+ )
771
+ );
772
+
773
+ $repeater->add_control(
774
+ 'multiple_social_enable',
775
+ array(
776
+ 'label' => __( 'Enable Social Icons', 'premium-addons-for-elementor' ),
777
+ 'type' => Controls_Manager::SWITCHER,
778
+ 'default' => 'yes',
779
+ 'separator' => 'before',
780
+ )
781
+ );
782
+
783
+ $repeater->add_control(
784
+ 'multiple_facebook',
785
+ array(
786
+ 'label' => __( 'Facebook', 'premium-addons-for-elementor' ),
787
+ 'type' => Controls_Manager::TEXT,
788
+ 'dynamic' => array( 'active' => true ),
789
+ 'default' => '#',
790
+ 'label_block' => true,
791
+ 'condition' => array(
792
+ 'multiple_social_enable' => 'yes',
793
+ ),
794
+ )
795
+ );
796
+
797
+ $repeater->add_control(
798
+ 'multiple_twitter',
799
+ array(
800
+ 'label' => __( 'Twitter', 'premium-addons-for-elementor' ),
801
+ 'type' => Controls_Manager::TEXT,
802
+ 'dynamic' => array( 'active' => true ),
803
+ 'default' => '#',
804
+ 'label_block' => true,
805
+ 'condition' => array(
806
+ 'multiple_social_enable' => 'yes',
807
+ ),
808
+ )
809
+ );
810
+
811
+ $repeater->add_control(
812
+ 'multiple_linkedin',
813
+ array(
814
+ 'label' => __( 'LinkedIn', 'premium-addons-for-elementor' ),
815
+ 'type' => Controls_Manager::TEXT,
816
+ 'dynamic' => array( 'active' => true ),
817
+ 'label_block' => true,
818
+ 'condition' => array(
819
+ 'multiple_social_enable' => 'yes',
820
+ ),
821
+ )
822
+ );
823
+
824
+ $repeater->add_control(
825
+ 'multiple_google',
826
+ array(
827
+ 'label' => __( 'Google+', 'premium-addons-for-elementor' ),
828
+ 'type' => Controls_Manager::TEXT,
829
+ 'dynamic' => array( 'active' => true ),
830
+ 'label_block' => true,
831
+ 'condition' => array(
832
+ 'multiple_social_enable' => 'yes',
833
+ ),
834
+ )
835
+ );
836
+
837
+ $repeater->add_control(
838
+ 'multiple_youtube',
839
+ array(
840
+ 'label' => __( 'YouTube', 'premium-addons-for-elementor' ),
841
+ 'type' => Controls_Manager::TEXT,
842
+ 'dynamic' => array( 'active' => true ),
843
+ 'label_block' => true,
844
+ 'condition' => array(
845
+ 'multiple_social_enable' => 'yes',
846
+ ),
847
+ )
848
+ );
849
+
850
+ $repeater->add_control(
851
+ 'multiple_instagram',
852
+ array(
853
+ 'label' => __( 'Instagram', 'premium-addons-for-elementor' ),
854
+ 'type' => Controls_Manager::TEXT,
855
+ 'dynamic' => array( 'active' => true ),
856
+ 'default' => '#',
857
+ 'label_block' => true,
858
+ 'condition' => array(
859
+ 'multiple_social_enable' => 'yes',
860
+ ),
861
+ )
862
+ );
863
+
864
+ $repeater->add_control(
865
+ 'multiple_skype',
866
+ array(
867
+ 'label' => __( 'Skype', 'premium-addons-for-elementor' ),
868
+ 'type' => Controls_Manager::TEXT,
869
+ 'dynamic' => array( 'active' => true ),
870
+ 'label_block' => true,
871
+ 'condition' => array(
872
+ 'multiple_social_enable' => 'yes',
873
+ ),
874
+ )
875
+ );
876
+
877
+ $repeater->add_control(
878
+ 'multiple_pinterest',
879
+ array(
880
+ 'label' => __( 'Pinterest', 'premium-addons-for-elementor' ),
881
+ 'type' => Controls_Manager::TEXT,
882
+ 'dynamic' => array( 'active' => true ),
883
+ 'label_block' => true,
884
+ 'condition' => array(
885
+ 'multiple_social_enable' => 'yes',
886
+ ),
887
+ )
888
+ );
889
+
890
+ $repeater->add_control(
891
+ 'multiple_dribbble',
892
+ array(
893
+ 'label' => __( 'Dribbble', 'premium-addons-for-elementor' ),
894
+ 'type' => Controls_Manager::TEXT,
895
+ 'dynamic' => array( 'active' => true ),
896
+ 'default' => '#',
897
+ 'label_block' => true,
898
+ 'condition' => array(
899
+ 'multiple_social_enable' => 'yes',
900
+ ),
901
+ )
902
+ );
903
+
904
+ $repeater->add_control(
905
+ 'multiple_behance',
906
+ array(
907
+ 'label' => __( 'Behance', 'premium-addons-for-elementor' ),
908
+ 'type' => Controls_Manager::TEXT,
909
+ 'dynamic' => array( 'active' => true ),
910
+ 'label_block' => true,
911
+ 'condition' => array(
912
+ 'multiple_social_enable' => 'yes',
913
+ ),
914
+ )
915
+ );
916
+
917
+ $repeater->add_control(
918
+ 'multiple_whatsapp',
919
+ array(
920
+ 'label' => __( 'WhatsApp', 'premium-addons-for-elementor' ),
921
+ 'type' => Controls_Manager::TEXT,
922
+ 'dynamic' => array( 'active' => true ),
923
+ 'label_block' => true,
924
+ 'condition' => array(
925
+ 'multiple_social_enable' => 'yes',
926
+ ),
927
+ )
928
+ );
929
+
930
+ $repeater->add_control(
931
+ 'multiple_telegram',
932
+ array(
933
+ 'label' => __( 'Telegram', 'premium-addons-for-elementor' ),
934
+ 'type' => Controls_Manager::TEXT,
935
+ 'dynamic' => array( 'active' => true ),
936
+ 'label_block' => true,
937
+ 'condition' => array(
938
+ 'multiple_social_enable' => 'yes',
939
+ ),
940
+ )
941
+ );
942
+
943
+ $repeater->add_control(
944
+ 'multiple_mail',
945
+ array(
946
+ 'label' => __( 'Email Address', 'premium-addons-for-elementor' ),
947
+ 'type' => Controls_Manager::TEXT,
948
+ 'dynamic' => array( 'active' => true ),
949
+ 'label_block' => true,
950
+ 'condition' => array(
951
+ 'multiple_social_enable' => 'yes',
952
+ ),
953
+ )
954
+ );
955
+
956
+ $repeater->add_control(
957
+ 'multiple_site',
958
+ array(
959
+ 'label' => __( 'Website', 'premium-addons-for-elementor' ),
960
+ 'type' => Controls_Manager::TEXT,
961
+ 'dynamic' => array( 'active' => true ),
962
+ 'label_block' => true,
963
+ 'condition' => array(
964
+ 'multiple_social_enable' => 'yes',
965
+ ),
966
+ )
967
+ );
968
+
969
+ $repeater->add_control(
970
+ 'multiple_number',
971
+ array(
972
+ 'label' => __( 'Phone Number', 'premium-addons-for-elementor' ),
973
+ 'type' => Controls_Manager::TEXT,
974
+ 'dynamic' => array( 'active' => true ),
975
+ 'description' => __( 'Example: tel: +012 345 678 910', 'premium-addons-for-elementor' ),
976
+ 'label_block' => true,
977
+ 'condition' => array(
978
+ 'multiple_social_enable' => 'yes',
979
+ ),
980
+ )
981
+ );
982
+
983
+ $repeater->add_control(
984
+ 'phone_notice',
985
+ array(
986
+ 'raw' => __( 'Please note that Phone Number icon will show only on mobile devices.', 'premium-addons-for-elementor' ),
987
+ 'type' => Controls_Manager::RAW_HTML,
988
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
989
+ 'condition' => array(
990
+ 'multiple_social_enable' => 'yes',
991
+ ),
992
+ )
993
+ );
994
+
995
+ $this->add_control(
996
+ 'multiple_persons',
997
+ array(
998
+ 'label' => __( 'Members', 'premium-addons-for-elementor' ),
999
+ 'type' => Controls_Manager::REPEATER,
1000
+ 'default' => array(
1001
+ array(
1002
+ 'multiple_name' => 'John Frank',
1003
+ ),
1004
+ array(
1005
+ 'multiple_name' => 'John Frank',
1006
+ ),
1007
+ array(
1008
+ 'multiple_name' => 'John Frank',
1009
+ ),
1010
+ ),
1011
+ 'fields' => $repeater->get_controls(),
1012
+ 'title_field' => '{{{multiple_name}}} - {{{multiple_title}}}',
1013
+ 'prevent_empty' => false,
1014
+ )
1015
+ );
1016
+
1017
+ $this->add_control(
1018
+ 'carousel',
1019
+ array(
1020
+ 'label' => __( 'Carousel', 'premium-addons-for-elementor' ),
1021
+ 'type' => Controls_Manager::SWITCHER,
1022
+ 'frontend_available' => true,
1023
+ )
1024
+ );
1025
+
1026
+ $this->add_control(
1027
+ 'carousel_play',
1028
+ array(
1029
+ 'label' => __( 'Auto Play', 'premium-addons-for-elementor' ),
1030
+ 'type' => Controls_Manager::SWITCHER,
1031
+ 'condition' => array(
1032
+ 'carousel' => 'yes',
1033
+ ),
1034
+ 'frontend_available' => true,
1035
+ )
1036
+ );
1037
+
1038
+ $this->add_control(
1039
+ 'carousel_autoplay_speed',
1040
+ array(
1041
+ 'label' => __( 'Autoplay Speed', 'premium-addons-for-elementor' ),
1042
+ 'description' => __( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
1043
+ 'type' => Controls_Manager::NUMBER,
1044
+ 'default' => 5000,
1045
+ 'condition' => array(
1046
+ 'carousel' => 'yes',
1047
+ 'carousel_play' => 'yes',
1048
+ ),
1049
+ 'frontend_available' => true,
1050
+ )
1051
+ );
1052
+
1053
+ $this->add_responsive_control(
1054
+ 'carousel_arrows_pos',
1055
+ array(
1056
+ 'label' => __( 'Arrows Position', 'premium-addons-for-elementor' ),
1057
+ 'type' => Controls_Manager::SLIDER,
1058
+ 'size_units' => array( 'px', 'em' ),
1059
+ 'range' => array(
1060
+ 'px' => array(
1061
+ 'min' => -100,
1062
+ 'max' => 100,
1063
+ ),
1064
+ 'em' => array(
1065
+ 'min' => -10,
1066
+ 'max' => 10,
1067
+ ),
1068
+ ),
1069
+ 'condition' => array(
1070
+ 'carousel' => 'yes',
1071
+ ),
1072
+ 'selectors' => array(
1073
+ '{{WRAPPER}} .premium-persons-container a.carousel-arrow.carousel-next' => 'right: {{SIZE}}{{UNIT}};',
1074
+ '{{WRAPPER}} .premium-persons-container a.carousel-arrow.carousel-prev' => 'left: {{SIZE}}{{UNIT}};',
1075
+ ),
1076
+ )
1077
+ );
1078
+
1079
+ $this->end_controls_section();
1080
+
1081
+ $this->start_controls_section(
1082
+ 'section_pa_docs',
1083
+ array(
1084
+ 'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),
1085
+ )
1086
+ );
1087
+
1088
+ $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/persons-widget-tutorial/', 'editor-page', 'wp-editor', 'get-support' );
1089
+ $doc2_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/why-im-not-able-to-see-elementor-font-awesome-5-icons-in-premium-add-ons', 'editor-page', 'wp-editor', 'get-support' );
1090
+
1091
+ $this->add_control(
1092
+ 'doc_1',
1093
+ array(
1094
+ 'type' => Controls_Manager::RAW_HTML,
1095
+ 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ),
1096
+ 'content_classes' => 'editor-pa-doc',
1097
+ )
1098
+ );
1099
+
1100
+ $this->add_control(
1101
+ 'doc_2',
1102
+ array(
1103
+ 'type' => Controls_Manager::RAW_HTML,
1104
+ 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc2_url, __( 'I\'m not able to see Font Awesome icons in the widget »', 'premium-addons-for-elementor' ) ),
1105
+ 'content_classes' => 'editor-pa-doc',
1106
+ )
1107
+ );
1108
+
1109
+ $this->end_controls_section();
1110
+
1111
+ $this->start_controls_section(
1112
+ 'premium_person_image_style',
1113
+ array(
1114
+ 'label' => __( 'Image', 'premium-addons-for-elementor' ),
1115
+ 'tab' => Controls_Manager::TAB_STYLE,
1116
+ )
1117
+ );
1118
+
1119
+ $this->add_responsive_control(
1120
+ 'image_border_radius',
1121
+ array(
1122
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1123
+ 'type' => Controls_Manager::DIMENSIONS,
1124
+ 'size_units' => array( 'px', 'em', '%' ),
1125
+ 'selectors' => array(
1126
+ '{{WRAPPER}} .premium-person-image-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1127
+ ),
1128
+ 'condition' => array(
1129
+ 'premium_person_style' => 'style2',
1130
+ ),
1131
+ )
1132
+ );
1133
+
1134
+ $this->add_control(
1135
+ 'image_adv_radius',
1136
+ array(
1137
+ 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1138
+ 'type' => Controls_Manager::SWITCHER,
1139
+ 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>',
1140
+ 'condition' => array(
1141
+ 'premium_person_style' => 'style2',
1142
+ ),
1143
+ )
1144
+ );
1145
+
1146
+ $this->add_control(
1147
+ 'image_adv_radius_value',
1148
+ array(
1149
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1150
+ 'type' => Controls_Manager::TEXT,
1151
+ 'dynamic' => array( 'active' => true ),
1152
+ 'selectors' => array(
1153
+ '{{WRAPPER}} .premium-person-image-container' => 'border-radius: {{VALUE}};',
1154
+ ),
1155
+ 'condition' => array(
1156
+ 'premium_person_style' => 'style2',
1157
+ 'image_adv_radius' => 'yes',
1158
+ ),
1159
+ )
1160
+ );
1161
+
1162
+ $this->add_group_control(
1163
+ Group_Control_Css_Filter::get_type(),
1164
+ array(
1165
+ 'name' => 'css_filters',
1166
+ 'selector' => '{{WRAPPER}} .premium-person-container img',
1167
+ )
1168
+ );
1169
+
1170
+ $this->add_group_control(
1171
+ Group_Control_Css_Filter::get_type(),
1172
+ array(
1173
+ 'name' => 'hover_css_filters',
1174
+ 'label' => __( 'Hover CSS Filters', 'premium-addons-for-elementor' ),
1175
+ 'selector' => '{{WRAPPER}} .premium-person-container:hover img',
1176
+ )
1177
+ );
1178
+
1179
+ $this->add_group_control(
1180
+ Group_Control_Box_Shadow::get_type(),
1181
+ array(
1182
+ 'name' => 'premium_person_shadow',
1183
+ 'selector' => '{{WRAPPER}} .premium-person-social',
1184
+ 'condition' => array(
1185
+ 'premium_person_style' => 'style2',
1186
+ ),
1187
+ )
1188
+ );
1189
+
1190
+ $this->add_control(
1191
+ 'blend_mode',
1192
+ array(
1193
+ 'label' => __( 'Blend Mode', 'elementor' ),
1194
+ 'type' => Controls_Manager::SELECT,
1195
+ 'options' => array(
1196
+ '' => __( 'Normal', 'elementor' ),
1197
+ 'multiply' => 'Multiply',
1198
+ 'screen' => 'Screen',
1199
+ 'overlay' => 'Overlay',
1200
+ 'darken' => 'Darken',
1201
+ 'lighten' => 'Lighten',
1202
+ 'color-dodge' => 'Color Dodge',
1203
+ 'saturation' => 'Saturation',
1204
+ 'color' => 'Color',
1205
+ 'luminosity' => 'Luminosity',
1206
+ ),
1207
+ 'separator' => 'before',
1208
+ 'selectors' => array(
1209
+ '{{WRAPPER}} .premium-person-image-container img' => 'mix-blend-mode: {{VALUE}}',
1210
+ ),
1211
+ )
1212
+ );
1213
+
1214
+ $this->end_controls_section();
1215
+
1216
+ $this->start_controls_section(
1217
+ 'premium_person_name_style',
1218
+ array(
1219
+ 'label' => __( 'Name', 'premium-addons-for-elementor' ),
1220
+ 'tab' => Controls_Manager::TAB_STYLE,
1221
+ )
1222
+ );
1223
+
1224
+ $this->add_control(
1225
+ 'premium_person_name_color',
1226
+ array(
1227
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1228
+ 'type' => Controls_Manager::COLOR,
1229
+ 'global' => array(
1230
+ 'default' => Global_Colors::COLOR_PRIMARY,
1231
+ ),
1232
+ 'selectors' => array(
1233
+ '{{WRAPPER}} .premium-person-name' => 'color: {{VALUE}};',
1234
+ ),
1235
+ )
1236
+ );
1237
+
1238
+ $this->add_group_control(
1239
+ Group_Control_Typography::get_type(),
1240
+ array(
1241
+ 'name' => 'name_typography',
1242
+ 'global' => array(
1243
+ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1244
+ ),
1245
+ 'selector' => '{{WRAPPER}} .premium-person-name',
1246
+ )
1247
+ );
1248
+
1249
+ $this->add_group_control(
1250
+ Group_Control_Text_Shadow::get_type(),
1251
+ array(
1252
+ 'name' => 'name_shadow',
1253
+ 'selector' => '{{WRAPPER}} .premium-person-name',
1254
+ )
1255
+ );
1256
+
1257
+ $this->add_responsive_control(
1258
+ 'name_padding',
1259
+ array(
1260
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1261
+ 'type' => Controls_Manager::DIMENSIONS,
1262
+ 'size_units' => array( 'px', 'em', '%' ),
1263
+ 'selectors' => array(
1264
+ '{{WRAPPER}} .premium-person-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1265
+ ),
1266
+ )
1267
+ );
1268
+
1269
+ $this->end_controls_section();
1270
+
1271
+ $this->start_controls_section(
1272
+ 'premium_person_title_style',
1273
+ array(
1274
+ 'label' => __( 'Job Title', 'premium-addons-for-elementor' ),
1275
+ 'tab' => Controls_Manager::TAB_STYLE,
1276
+ )
1277
+ );
1278
+
1279
+ $this->add_control(
1280
+ 'premium_person_title_color',
1281
+ array(
1282
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1283
+ 'type' => Controls_Manager::COLOR,
1284
+ 'global' => array(
1285
+ 'default' => Global_Colors::COLOR_SECONDARY,
1286
+ ),
1287
+ 'selectors' => array(
1288
+ '{{WRAPPER}} .premium-person-title' => 'color: {{VALUE}};',
1289
+ ),
1290
+ )
1291
+ );
1292
+
1293
+ $this->add_group_control(
1294
+ Group_Control_Typography::get_type(),
1295
+ array(
1296
+ 'name' => 'title_typography',
1297
+ 'global' => array(
1298
+ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1299
+ ),
1300
+ 'selector' => '{{WRAPPER}} .premium-person-title',
1301
+ )
1302
+ );
1303
+
1304
+ $this->add_group_control(
1305
+ Group_Control_Text_Shadow::get_type(),
1306
+ array(
1307
+ 'name' => 'title_shadow',
1308
+ 'selector' => '{{WRAPPER}} .premium-person-title',
1309
+ )
1310
+ );
1311
+
1312
+ $this->add_responsive_control(
1313
+ 'title_margin',
1314
+ array(
1315
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1316
+ 'type' => Controls_Manager::DIMENSIONS,
1317
+ 'size_units' => array( 'px', 'em', '%' ),
1318
+ 'selectors' => array(
1319
+ '{{WRAPPER}} .premium-person-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1320
+ ),
1321
+ )
1322
+ );
1323
+
1324
+ $this->add_responsive_control(
1325
+ 'title_padding',
1326
+ array(
1327
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1328
+ 'type' => Controls_Manager::DIMENSIONS,
1329
+ 'size_units' => array( 'px', 'em', '%' ),
1330
+ 'selectors' => array(
1331
+ '{{WRAPPER}} .premium-person-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1332
+ ),
1333
+ )
1334
+ );
1335
+
1336
+ $this->end_controls_section();
1337
+
1338
+ $this->start_controls_section(
1339
+ 'premium_person_description_style',
1340
+ array(
1341
+ 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1342
+ 'tab' => Controls_Manager::TAB_STYLE,
1343
+ )
1344
+ );
1345
+
1346
+ $this->add_control(
1347
+ 'premium_person_description_color',
1348
+ array(
1349
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1350
+ 'type' => Controls_Manager::COLOR,
1351
+ 'global' => array(
1352
+ 'default' => Global_Colors::COLOR_TEXT,
1353
+ ),
1354
+ 'selectors' => array(
1355
+ '{{WRAPPER}} .premium-person-content' => 'color: {{VALUE}};',
1356
+ ),
1357
+ )
1358
+ );
1359
+
1360
+ $this->add_group_control(
1361
+ Group_Control_Typography::get_type(),
1362
+ array(
1363
+ 'name' => 'description_typography',
1364
+ 'global' => array(
1365
+ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1366
+ ),
1367
+ 'selector' => '{{WRAPPER}} .premium-person-content',
1368
+ )
1369
+ );
1370
+
1371
+ $this->add_group_control(
1372
+ Group_Control_Text_Shadow::get_type(),
1373
+ array(
1374
+ 'name' => 'description_shadow',
1375
+ 'selector' => '{{WRAPPER}} .premium-person-content',
1376
+ )
1377
+ );
1378
+
1379
+ $this->add_responsive_control(
1380
+ 'description_padding',
1381
+ array(
1382
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1383
+ 'type' => Controls_Manager::DIMENSIONS,
1384
+ 'size_units' => array( 'px', 'em', '%' ),
1385
+ 'selectors' => array(
1386
+ '{{WRAPPER}} .premium-person-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1387
+ ),
1388
+ )
1389
+ );
1390
+
1391
+ $this->end_controls_section();
1392
+
1393
+ $this->start_controls_section(
1394
+ 'premium_person_social_icon_style',
1395
+ array(
1396
+ 'label' => __( 'Social Icons', 'premium-addons-for-elementor' ),
1397
+ 'tab' => Controls_Manager::TAB_STYLE,
1398
+ 'condition' => array(
1399
+ 'premium_person_social_enable' => 'yes',
1400
+ ),
1401
+ )
1402
+ );
1403
+
1404
+ $this->add_responsive_control(
1405
+ 'premium_person_social_size',
1406
+ array(
1407
+ 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1408
+ 'type' => Controls_Manager::SLIDER,
1409
+ 'size_units' => array( 'px', 'em', '%' ),
1410
+ 'label_block' => true,
1411
+ 'selectors' => array(
1412
+ '{{WRAPPER}} .premium-person-list-item i' => 'font-size: {{SIZE}}{{UNIT}};',
1413
+ ),
1414
+ )
1415
+ );
1416
+
1417
+ $this->add_control(
1418
+ 'premium_person_social_color',
1419
+ array(
1420
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1421
+ 'type' => Controls_Manager::COLOR,
1422
+ 'global' => array(
1423
+ 'default' => Global_Colors::COLOR_PRIMARY,
1424
+ ),
1425
+ 'selectors' => array(
1426
+ '{{WRAPPER}} .premium-person-list-item i' => 'color: {{VALUE}};',
1427
+ ),
1428
+ )
1429
+ );
1430
+
1431
+ $this->add_control(
1432
+ 'premium_person_social_hover_color',
1433
+ array(
1434
+ 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1435
+ 'type' => Controls_Manager::COLOR,
1436
+ 'global' => array(
1437
+ 'default' => Global_Colors::COLOR_SECONDARY,
1438
+ ),
1439
+ 'selectors' => array(
1440
+ '{{WRAPPER}} .premium-person-list-item:hover i' => 'color: {{VALUE}}',
1441
+ ),
1442
+ )
1443
+ );
1444
+
1445
+ $this->add_control(
1446
+ 'premium_person_social_background',
1447
+ array(
1448
+ 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1449
+ 'type' => Controls_Manager::COLOR,
1450
+ 'selectors' => array(
1451
+ '{{WRAPPER}} .premium-person-list-item a' => 'background-color: {{VALUE}}',
1452
+ ),
1453
+ )
1454
+ );
1455
+
1456
+ $this->add_control(
1457
+ 'premium_person_social_default_colors',
1458
+ array(
1459
+ 'label' => __( 'Brands Default Colors', 'premium-addons-for-elementor' ),
1460
+ 'type' => Controls_Manager::SWITCHER,
1461
+ 'prefix_class' => 'premium-person-defaults-',
1462
+ )
1463
+ );
1464
+
1465
+ $this->add_control(
1466
+ 'premium_person_social_hover_background',
1467
+ array(
1468
+ 'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
1469
+ 'type' => Controls_Manager::COLOR,
1470
+ 'selectors' => array(
1471
+ '{{WRAPPER}} li.premium-person-list-item:hover a' => 'background-color: {{VALUE}}',
1472
+ ),
1473
+ 'condition' => array(
1474
+ 'premium_person_social_default_colors!' => 'yes',
1475
+ ),
1476
+ )
1477
+ );
1478
+
1479
+ $this->add_group_control(
1480
+ Group_Control_Border::get_type(),
1481
+ array(
1482
+ 'name' => 'premium_person_social_border',
1483
+ 'selector' => '{{WRAPPER}} .premium-person-list-item a',
1484
+ )
1485
+ );
1486
+
1487
+ $this->add_responsive_control(
1488
+ 'premium_person_social_radius',
1489
+ array(
1490
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1491
+ 'type' => Controls_Manager::DIMENSIONS,
1492
+ 'size_units' => array( 'px', 'em', '%' ),
1493
+ 'selectors' => array(
1494
+ '{{WRAPPER}} .premium-person-list-item a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1495
+ ),
1496
+ 'condition' => array(
1497
+ 'social_adv_radius!' => 'yes',
1498
+ ),
1499
+ )
1500
+ );
1501
+
1502
+ $this->add_control(
1503
+ 'social_adv_radius',
1504
+ array(
1505
+ 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1506
+ 'type' => Controls_Manager::SWITCHER,
1507
+ 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>',
1508
+ )
1509
+ );
1510
+
1511
+ $this->add_control(
1512
+ 'social_adv_radius_value',
1513
+ array(
1514
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1515
+ 'type' => Controls_Manager::TEXT,
1516
+ 'dynamic' => array( 'active' => true ),
1517
+ 'selectors' => array(
1518
+ '{{WRAPPER}} .premium-person-list-item a' => 'border-radius: {{VALUE}};',
1519
+ ),
1520
+ 'condition' => array(
1521
+ 'social_adv_radius' => 'yes',
1522
+ ),
1523
+ )
1524
+ );
1525
+
1526
+ $this->add_responsive_control(
1527
+ 'premium_person_social_margin',
1528
+ array(
1529
+ 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1530
+ 'type' => Controls_Manager::DIMENSIONS,
1531
+ 'size_units' => array( 'px', 'em', '%' ),
1532
+ 'selectors' => array(
1533
+ '{{WRAPPER}} .premium-person-list-item a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1534
+ ),
1535
+ )
1536
+ );
1537
+
1538
+ $this->add_responsive_control(
1539
+ 'premium_person_social_padding',
1540
+ array(
1541
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1542
+ 'type' => Controls_Manager::DIMENSIONS,
1543
+ 'size_units' => array( 'px', 'em', '%' ),
1544
+ 'selectors' => array(
1545
+ '{{WRAPPER}} .premium-person-list-item a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1546
+ ),
1547
+ )
1548
+ );
1549
+
1550
+ $this->end_controls_section();
1551
+
1552
+ $this->start_controls_section(
1553
+ 'premium_person_general_style',
1554
+ array(
1555
+ 'label' => __( 'Content', 'premium-addons-for-elementor' ),
1556
+ 'tab' => Controls_Manager::TAB_STYLE,
1557
+ )
1558
+ );
1559
+
1560
+ $this->add_control(
1561
+ 'premium_person_content_background_color',
1562
+ array(
1563
+ 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1564
+ 'type' => Controls_Manager::COLOR,
1565
+ 'default' => 'rgba(245,245,245,0.97)',
1566
+ 'selectors' => array(
1567
+ '{{WRAPPER}} .premium-person-info' => 'background-color: {{VALUE}};',
1568
+ ),
1569
+ )
1570
+ );
1571
+
1572
+ $this->add_responsive_control(
1573
+ 'premium_person_border_bottom_width',
1574
+ array(
1575
+ 'label' => __( 'Bottom Offset', 'premium-addons-for-elementor' ),
1576
+ 'type' => Controls_Manager::SLIDER,
1577
+ 'size_units' => array( 'px', 'em', '%' ),
1578
+ 'range' => array(
1579
+ 'px' => array(
1580
+ 'min' => 0,
1581
+ 'max' => 700,
1582
+ ),
1583
+ ),
1584
+ 'default' => array(
1585
+ 'size' => 20,
1586
+ 'unit' => 'px',
1587
+ ),
1588
+ 'label_block' => true,
1589
+ 'condition' => array(
1590
+ 'premium_person_style' => 'style1',
1591
+ ),
1592
+ 'selectors' => array(
1593
+ '{{WRAPPER}} .premium-person-info' => 'bottom: {{SIZE}}{{UNIT}}',
1594
+ ),
1595
+ )
1596
+ );
1597
+
1598
+ $this->add_responsive_control(
1599
+ 'premium_person_content_speed',
1600
+ array(
1601
+ 'label' => __( 'Transition Duration (sec)', 'premium-addons-for-elementor' ),
1602
+ 'type' => Controls_Manager::SLIDER,
1603
+ 'range' => array(
1604
+ 'px' => array(
1605
+ 'min' => 0,
1606
+ 'max' => 5,
1607
+ 'step' => 0.1,
1608
+ ),
1609
+ ),
1610
+ 'selectors' => array(
1611
+ '{{WRAPPER}} .premium-person-info, {{WRAPPER}} .premium-person-image-container img' => 'transition-duration: {{SIZE}}s',
1612
+ ),
1613
+ )
1614
+ );
1615
+
1616
+ $this->add_responsive_control(
1617
+ 'premium_person_content_padding',
1618
+ array(
1619
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1620
+ 'type' => Controls_Manager::DIMENSIONS,
1621
+ 'size_units' => array( 'px', 'em', '%' ),
1622
+ 'selectors' => array(
1623
+ '{{WRAPPER}} .premium-person-info-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1624
+ ),
1625
+ )
1626
+ );
1627
+
1628
+ $this->end_controls_section();
1629
+
1630
+ $this->start_controls_section(
1631
+ 'carousel_style',
1632
+ array(
1633
+ 'label' => __( 'Carousel', 'premium-addons-for-elementor' ),
1634
+ 'tab' => Controls_Manager::TAB_STYLE,
1635
+ 'condition' => array(
1636
+ 'carousel' => 'yes',
1637
+ ),
1638
+ )
1639
+ );
1640
+
1641
+ $this->add_control(
1642
+ 'arrow_color',
1643
+ array(
1644
+ 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1645
+ 'type' => Controls_Manager::COLOR,
1646
+ 'global' => array(
1647
+ 'default' => Global_Colors::COLOR_PRIMARY,
1648
+ ),
1649
+ 'selectors' => array(
1650
+ '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'color: {{VALUE}};',
1651
+ ),
1652
+ )
1653
+ );
1654
+
1655
+ $this->add_control(
1656
+ 'arrow_hover_color',
1657
+ array(
1658
+ 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1659
+ 'type' => Controls_Manager::COLOR,
1660
+ 'global' => array(
1661
+ 'default' => Global_Colors::COLOR_PRIMARY,
1662
+ ),
1663
+ 'selectors' => array(
1664
+ '{{WRAPPER}} .premium-persons-container .slick-arrow:hover' => 'color: {{VALUE}};',
1665
+ ),
1666
+ )
1667
+ );
1668
+
1669
+ $this->add_responsive_control(
1670
+ 'arrow_size',
1671
+ array(
1672
+ 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1673
+ 'type' => Controls_Manager::SLIDER,
1674
+ 'size_units' => array( 'px', '%', 'em' ),
1675
+ 'selectors' => array(
1676
+ '{{WRAPPER}} .premium-persons-container .slick-arrow i' => 'font-size: {{SIZE}}{{UNIT}};',
1677
+ ),
1678
+ )
1679
+ );
1680
+
1681
+ $this->add_control(
1682
+ 'arrow_background',
1683
+ array(
1684
+ 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1685
+ 'type' => Controls_Manager::COLOR,
1686
+ 'global' => array(
1687
+ 'default' => Global_Colors::COLOR_SECONDARY,
1688
+ ),
1689
+ 'selectors' => array(
1690
+ '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'background-color: {{VALUE}};',
1691
+ ),
1692
+ )
1693
+ );
1694
+
1695
+ $this->add_control(
1696
+ 'arrow_hover_background',
1697
+ array(
1698
+ 'label' => __( 'Background Hover Color', 'premium-addons-for-elementor' ),
1699
+ 'type' => Controls_Manager::COLOR,
1700
+ 'global' => array(
1701
+ 'default' => Global_Colors::COLOR_SECONDARY,
1702
+ ),
1703
+ 'selectors' => array(
1704
+ '{{WRAPPER}} .premium-persons-container .slick-arrow:hover' => 'background-color: {{VALUE}};',
1705
+ ),
1706
+ )
1707
+ );
1708
+
1709
+ $this->add_control(
1710
+ 'arrow_border_radius',
1711
+ array(
1712
+ 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1713
+ 'type' => Controls_Manager::SLIDER,
1714
+ 'size_units' => array( 'px', '%', 'em' ),
1715
+ 'selectors' => array(
1716
+ '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'border-radius: {{SIZE}}{{UNIT}};',
1717
+ ),
1718
+ )
1719
+ );
1720
+
1721
+ $this->add_control(
1722
+ 'arrow_padding',
1723
+ array(
1724
+ 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1725
+ 'type' => Controls_Manager::SLIDER,
1726
+ 'size_units' => array( 'px', '%', 'em' ),
1727
+ 'selectors' => array(
1728
+ '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'padding: {{SIZE}}{{UNIT}};',
1729
+ ),
1730
+ )
1731
+ );
1732
+
1733
+ $this->end_controls_section();
1734
+
1735
+ }
1736
+
1737
+ /**
1738
+ * Render Persons widget output on the frontend.
1739
+ *
1740
+ * Written in PHP and used to generate the final HTML.
1741
+ *
1742
+ * @since 1.0.0
1743
+ * @access protected
1744
+ */
1745
+ protected function render() {
1746
+
1747
+ $settings = $this->get_settings_for_display();
1748
+
1749
+ $image_effect = $settings['premium_person_hover_image_effect'];
1750
+
1751
+ $image_html = '';
1752
+ if ( ! empty( $settings['premium_person_image']['url'] ) ) {
1753
+ $this->add_render_attribute( 'image', 'src', $settings['premium_person_image']['url'] );
1754
+ $this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $settings['premium_person_image'] ) );
1755
+ $this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $settings['premium_person_image'] ) );
1756
+
1757
+ $image_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'premium_person_image' );
1758
+ }
1759
+
1760
+ $this->add_render_attribute(
1761
+ 'persons_container',
1762
+ 'class',
1763
+ array(
1764
+ 'premium-persons-container',
1765
+ 'premium-person-' . $settings['premium_person_style'],
1766
+ )
1767
+ );
1768
+
1769
+ $this->add_render_attribute(
1770
+ 'person_container',
1771
+ 'class',
1772
+ array(
1773
+ 'premium-person-container',
1774
+ 'premium-person-' . $image_effect . '-effect',
1775
+ )
1776
+ );
1777
+
1778
+ if ( 'yes' === $settings['multiple'] ) {
1779
+ $persons = $settings['multiple_persons'];
1780
+ $this->add_render_attribute( 'persons_container', 'class', 'multiple-persons' );
1781
+ $this->add_render_attribute( 'persons_container', 'data-persons-equal', $settings['multiple_equal_height'] );
1782
+ }
1783
+
1784
+ $carousel = 'yes' === $settings['carousel'] ? true : false;
1785
+
1786
+ if ( $carousel ) {
1787
+
1788
+ $this->add_render_attribute( 'persons_container', 'data-carousel', $carousel );
1789
+
1790
+ $speed = ! empty( $settings['carousel_autoplay_speed'] ) ? $settings['carousel_autoplay_speed'] : 5000;
1791
+
1792
+ $this->add_render_attribute(
1793
+ 'persons_container',
1794
+ array(
1795
+ 'data-rtl' => is_rtl(),
1796
+ )
1797
+ );
1798
+
1799
+ }
1800
+
1801
+ ?>
1802
+ <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'persons_container' ) ); ?>>
1803
+ <?php if ( 'yes' !== $settings['multiple'] ) : ?>
1804
+ <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'person_container' ) ); ?>>
1805
+ <div class="premium-person-image-container">
1806
+ <div class="premium-person-image-wrap">
1807
+ <?php echo wp_kses_post( $image_html ); ?>
1808
+ </div>
1809
+ <?php if ( 'style2' === $settings['premium_person_style'] && 'yes' === $settings['premium_person_social_enable'] ) : ?>
1810
+ <div class="premium-person-social">
1811
+ <?php $this->get_social_icons(); ?>
1812
+ </div>
1813
+ <?php endif; ?>
1814
+ </div>
1815
+ <div class="premium-person-info">
1816
+ <?php $this->render_person_info(); ?>
1817
+ </div>
1818
+ </div>
1819
+ <?php
1820
+ else :
1821
+ foreach ( $persons as $index => $person ) {
1822
+
1823
+ $person_image_html = '';
1824
+ if ( ! empty( $person['multiple_image']['url'] ) ) {
1825
+ $this->add_render_attribute( 'image', 'src', $person['multiple_image']['url'] );
1826
+ $this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $person['multiple_image'] ) );
1827
+ $this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $person['multiple_image'] ) );
1828
+
1829
+ $person_image_html = Group_Control_Image_Size::get_attachment_image_html( $person, 'thumbnail', 'multiple_image' );
1830
+ }
1831
+ ?>
1832
+ <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'person_container' ) ); ?>>
1833
+ <div class="premium-person-image-container">
1834
+ <div class="premium-person-image-wrap">
1835
+ <?php echo wp_kses_post( $person_image_html ); ?>
1836
+ </div>
1837
+ <?php if ( 'style2' === $settings['premium_person_style'] && 'yes' === $person['multiple_social_enable'] ) : ?>
1838
+ <div class="premium-person-social">
1839
+ <?php $this->get_social_icons( $person ); ?>
1840
+ </div>
1841
+ <?php endif; ?>
1842
+ </div>
1843
+ <div class="premium-person-info">
1844
+ <?php $this->render_person_info( $person, $index ); ?>
1845
+ </div>
1846
+ </div>
1847
+ <?php
1848
+ }
1849
+ endif;
1850
+ ?>
1851
+ </div>
1852
+ <?php
1853
+ }
1854
+
1855
+ /**
1856
+ * Get Social Icons
1857
+ *
1858
+ * Render person social icons list
1859
+ *
1860
+ * @since 3.8.4
1861
+ * @access protected
1862
+ *
1863
+ * @param object $person current person.
1864
+ */
1865
+ private function get_social_icons( $person = '' ) {
1866
+
1867
+ $settings = $this->get_settings_for_display();
1868
+
1869
+ $social_sites = array(
1870
+ 'facebook' => 'fa fa-facebook-f',
1871
+ 'twitter' => 'fa fa-twitter',
1872
+ 'linkedin' => 'fa fa-linkedin',
1873
+ 'google' => 'fa fa-google-plus',
1874
+ 'youtube' => 'fa fa-youtube',
1875
+ 'instagram' => 'fa fa-instagram',
1876
+ 'skype' => 'fa fa-skype',
1877
+ 'pinterest' => 'fa fa-pinterest',
1878
+ 'dribbble' => 'fa fa-dribbble',
1879
+ 'behance' => 'fa fa-behance',
1880
+ 'whatsapp' => 'fa fa-whatsapp',
1881
+ 'telegram' => 'fa fa-telegram',
1882
+ 'mail' => 'fa fa-envelope',
1883
+ 'site' => 'fa fa-link',
1884
+ 'number' => 'fa fa-phone',
1885
+ );
1886
+
1887
+ echo '<ul class="premium-person-social-list">';
1888
+ foreach ( $social_sites as $site => $icon ) {
1889
+
1890
+ if ( ! \Elementor\Plugin::instance()->editor->is_edit_mode() ) {
1891
+ if ( 'number' === $site && ! wp_is_mobile() ) {
1892
+ continue;
1893
+ }
1894
+ }
1895
+
1896
+ $value = ( '' === $person ) ? $settings[ 'premium_person_' . $site ] : $person[ 'multiple_' . $site ];
1897
+
1898
+ if ( ! empty( $value ) ) {
1899
+ $icon_class = sprintf( 'elementor-icon premium-person-list-item premium-person-%s', $site );
1900
+ ?>
1901
+ <li class="<?php echo esc_attr( $icon_class ); ?>">
1902
+ <a href="<?php echo esc_url( $value ); ?>" target="_blank">
1903
+ <i class="<?php echo esc_attr( $icon ); ?>"></i>
1904
+ </a>
1905
+ </li>
1906
+ <?php
1907
+ }
1908
+ }
1909
+ echo '</ul>';
1910
+
1911
+ }
1912
+
1913
+ /**
1914
+ * Render Person Info
1915
+ *
1916
+ * @since 3.12.0
1917
+ * @access protected
1918
+ *
1919
+ * @param object $person current person.
1920
+ * @param integer $index person index.
1921
+ */
1922
+ protected function render_person_info( $person = '', $index = '' ) {
1923
+
1924
+ $settings = $this->get_settings_for_display();
1925
+
1926
+ $this->add_inline_editing_attributes( 'premium_person_name', 'advanced' );
1927
+
1928
+ $this->add_inline_editing_attributes( 'premium_person_title', 'advanced' );
1929
+
1930
+ $this->add_inline_editing_attributes( 'premium_person_content', 'advanced' );
1931
+
1932
+ $name_heading = Helper_Functions::validate_html_tag( $settings['premium_person_name_heading'] );
1933
+
1934
+ $title_heading = Helper_Functions::validate_html_tag( $settings['premium_person_title_heading'] );
1935
+
1936
+ $skin = $settings['premium_person_style'];
1937
+
1938
+ if ( empty( $person ) ) :
1939
+ ?>
1940
+ <div class="premium-person-info-container">
1941
+ <?php if ( 'style3' !== $skin && ! empty( $settings['premium_person_name'] ) ) : ?>
1942
+ <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name"><span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_name' ) ); ?>><?php echo wp_kses_post( $settings['premium_person_name'] ); ?></span></<?php echo wp_kses_post( $name_heading ); ?>>
1943
+ <?php
1944
+ endif;
1945
+
1946
+ if ( 'style3' === $skin ) :
1947
+ ?>
1948
+ <div class="premium-person-title-desc-wrap">
1949
+ <?php
1950
+ endif;
1951
+ if ( ! empty( $settings['premium_person_title'] ) ) :
1952
+ ?>
1953
+ <<?php echo wp_kses_post( $title_heading ); ?> class="premium-person-title"><span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_title' ) ); ?>><?php echo wp_kses_post( $settings['premium_person_title'] ); ?></span></<?php echo wp_kses_post( $title_heading ); ?>>
1954
+ <?php
1955
+ endif;
1956
+
1957
+ if ( ! empty( $settings['premium_person_content'] ) ) :
1958
+ ?>
1959
+ <div class="premium-person-content">
1960
+ <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_content' ) ); ?>>
1961
+ <?php echo $this->parse_text_editor( $settings['premium_person_content'] ); ?>
1962
+ </div>
1963
+ </div>
1964
+ <?php
1965
+ endif;
1966
+ if ( 'style3' === $skin ) :
1967
+ ?>
1968
+ </div>
1969
+ <?php
1970
+ endif;
1971
+
1972
+ if ( 'style3' === $skin ) :
1973
+ ?>
1974
+ <div class="premium-person-name-icons-wrap">
1975
+ <?php if ( ! empty( $settings['premium_person_name'] ) ) : ?>
1976
+ <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name"><span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_person_name' ) ); ?>><?php echo wp_kses_post( $settings['premium_person_name'] ); ?></span></<?php echo wp_kses_post( $name_heading ); ?>>
1977
+ <?php
1978
+ endif;
1979
+ if ( 'yes' === $settings['premium_person_social_enable'] ) :
1980
+ $this->get_social_icons();
1981
+ endif;
1982
+ ?>
1983
+ </div>
1984
+ <?php
1985
+ endif;
1986
+
1987
+ if ( 'style1' === $settings['premium_person_style'] && 'yes' === $settings['premium_person_social_enable'] ) :
1988
+ $this->get_social_icons();
1989
+ endif;
1990
+ ?>
1991
+ </div>
1992
+ <?php
1993
+ else :
1994
+
1995
+ $name_setting_key = $this->get_repeater_setting_key( 'multiple_name', 'multiple_persons', $index );
1996
+ $title_setting_key = $this->get_repeater_setting_key( 'multiple_title', 'multiple_persons', $index );
1997
+ $desc_setting_key = $this->get_repeater_setting_key( 'multiple_description', 'multiple_persons', $index );
1998
+
1999
+ $this->add_inline_editing_attributes( $name_setting_key, 'advanced' );
2000
+ $this->add_inline_editing_attributes( $title_setting_key, 'advanced' );
2001
+ $this->add_inline_editing_attributes( $desc_setting_key, 'advanced' );
2002
+
2003
+ ?>
2004
+ <div class="premium-person-info-container">
2005
+ <?php if ( 'style3' !== $skin && ! empty( $person['multiple_name'] ) ) : ?>
2006
+ <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name"><span <?php echo wp_kses_post( $this->get_render_attribute_string( $name_setting_key ) ); ?>><?php echo wp_kses_post( $person['multiple_name'] ); ?></span></<?php echo wp_kses_post( $name_heading ); ?>>
2007
+ <?php
2008
+ endif;
2009
+
2010
+ if ( 'style3' === $skin ) :
2011
+ ?>
2012
+ <div class="premium-person-title-desc-wrap">
2013
+ <?php
2014
+ endif;
2015
+ if ( ! empty( $person['multiple_title'] ) ) :
2016
+ ?>
2017
+ <<?php echo wp_kses_post( $title_heading ); ?> class="premium-person-title">
2018
+ <span <?php echo wp_kses_post( $this->get_render_attribute_string( $title_setting_key ) ); ?>>
2019
+ <?php echo wp_kses_post( $person['multiple_title'] ); ?>
2020
+ </span>
2021
+ </<?php echo wp_kses_post( $title_heading ); ?>>
2022
+ <?php
2023
+ endif;
2024
+
2025
+ if ( ! empty( $person['multiple_description'] ) ) :
2026
+ ?>
2027
+ <div class="premium-person-content">
2028
+ <div <?php echo wp_kses_post( $this->get_render_attribute_string( $desc_setting_key ) ); ?>>
2029
+ <?php echo $this->parse_text_editor( $person['multiple_description'] ); ?>
2030
+ </div>
2031
+ </div>
2032
+ <?php
2033
+ endif;
2034
+ if ( 'style3' === $skin ) :
2035
+ ?>
2036
+ </div>
2037
+ <?php
2038
+ endif;
2039
+
2040
+ if ( 'style3' === $skin ) :
2041
+ ?>
2042
+ <div class="premium-person-name-icons-wrap">
2043
+ <?php if ( ! empty( $person['multiple_name'] ) ) : ?>
2044
+ <<?php echo wp_kses_post( $name_heading ); ?> class="premium-person-name">
2045
+ <span <?php echo wp_kses_post( $this->get_render_attribute_string( $name_setting_key ) ); ?>>
2046
+ <?php echo wp_kses_post( $person['multiple_name'] ); ?>
2047
+ </span>
2048
+ </<?php echo wp_kses_post( $name_heading ); ?>>
2049
+ <?php
2050
+ endif;
2051
+ if ( 'yes' === $person['multiple_social_enable'] ) :
2052
+ $this->get_social_icons( $person );
2053
+ endif;
2054
+ ?>
2055
+ </div>
2056
+ <?php
2057
+ endif;
2058
+
2059
+ if ( 'style1' === $settings['premium_person_style'] && 'yes' === $person['multiple_social_enable'] ) :
2060
+ $this->get_social_icons( $person );
2061
+ endif;
2062
+ ?>
2063
+ </div>
2064
+ <?php
2065
+ endif;
2066
+
2067
+ }
2068
+
2069
+
2070
+ /**
2071
+ * Render Persons widget output in the editor.
2072
+ *
2073
+ * Written as a Backbone JavaScript template and used to generate the live preview.
2074
+ *
2075
+ * @since 1.0.0
2076
+ * @access protected
2077
+ */
2078
+ protected function content_template() {
2079
+ ?>
2080
+ <#
2081
+
2082
+ view.addInlineEditingAttributes( 'premium_person_name', 'advanced' );
2083
+
2084
+ view.addInlineEditingAttributes( 'premium_person_title', 'advanced' );
2085
+
2086
+ view.addInlineEditingAttributes( 'premium_person_content', 'advanced' );
2087
+
2088
+ var nameHeading = elementor.helpers.validateHTMLTag( settings.premium_person_name_heading ),
2089
+
2090
+ titleHeading = elementor.helpers.validateHTMLTag( settings.premium_person_title_heading ),
2091
+
2092
+ imageEffect = 'premium-person-' + settings.premium_person_hover_image_effect + '-effect' ;
2093
+
2094
+ skin = settings.premium_person_style;
2095
+
2096
+ view.addRenderAttribute( 'persons_container', 'class', [ 'premium-persons-container', 'premium-person-' + skin ] );
2097
+
2098
+ view.addRenderAttribute('person_container', 'class', [ 'premium-person-container', imageEffect ] );
2099
+
2100
+ var imageHtml = '';
2101
+ if ( settings.premium_person_image.url ) {
2102
+ var image = {
2103
+ id: settings.premium_person_image.id,
2104
+ url: settings.premium_person_image.url,
2105
+ size: settings.thumbnail_size,
2106
+ dimension: settings.thumbnail_custom_dimension,
2107
+ model: view.getEditModel()
2108
+ };
2109
+
2110
+ var image_url = elementor.imagesManager.getImageUrl( image );
2111
+
2112
+ imageHtml = '<img src="' + image_url + '"/>';
2113
+
2114
+ }
2115
+
2116
+ if ( settings.multiple ) {
2117
+ var persons = settings.multiple_persons;
2118
+ view.addRenderAttribute( 'persons_container', 'class', 'multiple-persons' );
2119
+ view.addRenderAttribute( 'persons_container', 'data-persons-equal', settings.multiple_equal_height );
2120
+ }
2121
+
2122
+ var carousel = 'yes' === settings.carousel ? true : false;
2123
+
2124
+ if( carousel ) {
2125
+
2126
+ view.addRenderAttribute('persons_container', {
2127
+ 'data-carousel': carousel,
2128
+ });
2129
+
2130
+ }
2131
+
2132
+
2133
+ function getSocialIcons( person = null ) {
2134
+
2135
+ var personSettings,
2136
+ socialIcons;
2137
+
2138
+ if( null === person ) {
2139
+ personSettings = settings;
2140
+ socialIcons = {
2141
+ facebook: settings.premium_person_facebook,
2142
+ twitter: settings.premium_person_twitter,
2143
+ linkedin: settings.premium_person_linkedin,
2144
+ google: settings.premium_person_google,
2145
+ youtube: settings.premium_person_youtube,
2146
+ instagram: settings.premium_person_instagram,
2147
+ skype: settings.premium_person_skype,
2148
+ pinterest: settings.premium_person_pinterest,
2149
+ dribbble: settings.premium_person_dribbble,
2150
+ behance: settings.premium_person_behance,
2151
+ whatsapp: settings.premium_person_whatsapp,
2152
+ telegram: settings.premium_person_telegram,
2153
+ mail: settings.premium_person_mail,
2154
+ site: settings.premium_person_site,
2155
+ number: settings.premium_person_number
2156
+ };
2157
+ } else {
2158
+ personSettings = person;
2159
+ socialIcons = {
2160
+ facebook: person.multiple_facebook,
2161
+ twitter: person.multiple_twitter,
2162
+ linkedin: person.multiple_linkedin,
2163
+ google: person.multiple_google,
2164
+ youtube: person.multiple_youtube,
2165
+ instagram: person.multiple_instagram,
2166
+ skype: person.multiple_skype,
2167
+ pinterest: person.multiple_pinterest,
2168
+ dribbble: person.multiple_dribbble,
2169
+ behance: person.multiple_behance,
2170
+ whatsapp: person.multiple_whatsapp,
2171
+ telegram: person.multiple_telegram,
2172
+ mail: person.multiple_mail,
2173
+ site: person.multiple_site,
2174
+ number: person.multiple_number
2175
+ };
2176
+ }
2177
+
2178
+ #>
2179
+ <ul class="premium-person-social-list">
2180
+ <# if( '' != socialIcons.facebook ) { #>
2181
+ <li class="elementor-icon premium-person-list-item premium-person-facebook"><a href="{{ socialIcons.facebook }}" target="_blank"><i class="fa fa-facebook-f"></i></a></li>
2182
+ <# } #>
2183
+
2184
+ <# if( '' != socialIcons.twitter ) { #>
2185
+ <li class="elementor-icon premium-person-list-item premium-person-twitter"><a href="{{ socialIcons.twitter }}" target="_blank"><i class="fa fa-twitter"></i></a></li>
2186
+ <# } #>
2187
+
2188
+ <# if( '' != socialIcons.linkedin ) { #>
2189
+ <li class="elementor-icon premium-person-list-item premium-person-linkedin"><a href="{{ socialIcons.linkedin }}" target="_blank"><i class="fa fa-linkedin"></i></a></li>
2190
+ <# } #>
2191
+
2192
+ <# if( '' != socialIcons.google ) { #>
2193
+ <li class="elementor-icon premium-person-list-item premium-person-google"><a href="{{ socialIcons.google }}" target="_blank"><i class="fa fa-google-plus"></i></a></li>
2194
+ <# } #>
2195
+
2196
+ <# if( '' != socialIcons.youtube ) { #>
2197
+ <li class="elementor-icon premium-person-list-item premium-person-youtube"><a href="{{ socialIcons.youtube }}" target="_blank"><i class="fa fa-youtube"></i></a></li>
2198
+ <# } #>
2199
+
2200
+ <# if( '' != socialIcons.instagram ) { #>
2201
+ <li class="elementor-icon premium-person-list-item premium-person-instagram"><a href="{{ socialIcons.instagram }}" target="_blank"><i class="fa fa-instagram"></i></a></li>
2202
+ <# } #>
2203
+
2204
+ <# if( '' != socialIcons.skype ) { #>
2205
+ <li class="elementor-icon premium-person-list-item premium-person-skype"><a href="{{ socialIcons.skype }}" target="_blank"><i class="fa fa-skype"></i></a></li>
2206
+ <# } #>
2207
+
2208
+ <# if( '' != socialIcons.pinterest ) { #>
2209
+ <li class="elementor-icon premium-person-list-item premium-person-pinterest"><a href="{{ socialIcons.pinterest }}" target="_blank"><i class="fa fa-pinterest"></i></a></li>
2210
+ <# } #>
2211
+
2212
+ <# if( '' != socialIcons.dribbble ) { #>
2213
+ <li class="elementor-icon premium-person-list-item premium-person-dribbble"><a href="{{ socialIcons.dribbble }}" target="_blank"><i class="fa fa-dribbble"></i></a></li>
2214
+ <# } #>
2215
+
2216
+ <# if( '' != socialIcons.behance ) { #>
2217
+ <li class="elementor-icon premium-person-list-item premium-person-behance"><a href="{{ socialIcons.behance }}" target="_blank"><i class="fa fa-behance"></i></a></li>
2218
+ <# } #>
2219
+
2220
+ <# if( '' != socialIcons.whatsapp ) { #>
2221
+ <li class="elementor-icon premium-person-list-item premium-person-whatsapp"><a href="{{ socialIcons.whatsapp }}" target="_blank"><i class="fa fa-whatsapp"></i></a></li>
2222
+ <# } #>
2223
+
2224
+ <# if( '' != socialIcons.telegram ) { #>
2225
+ <li class="elementor-icon premium-person-list-item premium-person-telegram"><a href="{{ socialIcons.mail }}" target="_blank"><i class="fa fa-telegram"></i></a></li>
2226
+ <# } #>
2227
+
2228
+ <# if( '' != socialIcons.mail ) { #>
2229
+ <li class="elementor-icon premium-person-list-item premium-person-mail"><a href="{{ socialIcons.mail }}" target="_blank"><i class="fa fa-envelope"></i></a></li>
2230
+ <# } #>
2231
+
2232
+ <# if( '' != socialIcons.site ) { #>
2233
+ <li class="elementor-icon premium-person-list-item premium-person-site"><a href="{{ socialIcons.site }}" target="_blank"><i class="fa fa-link"></i></a></li>
2234
+ <# } #>
2235
+
2236
+ <# if( '' != socialIcons.number ) { #>
2237
+ <li class="elementor-icon premium-person-list-item premium-person-number"><a href="{{ socialIcons.number }}" target="_blank"><i class="fa fa-phone"></i></a></li>
2238
+ <# } #>
2239
+
2240
+ </ul>
2241
+ <# }
2242
+ #>
2243
+
2244
+ <div {{{ view.getRenderAttributeString('persons_container') }}}>
2245
+ <# if( 'yes' !== settings.multiple ) { #>
2246
+ <div {{{ view.getRenderAttributeString('person_container') }}}>
2247
+ <div class="premium-person-image-container">
2248
+ <div class="premium-person-image-wrap">
2249
+ {{{imageHtml}}}
2250
+ </div>
2251
+ <# if ( 'style2' === settings.premium_person_style && 'yes' === settings.premium_person_social_enable ) { #>
2252
+ <div class="premium-person-social">
2253
+ <# getSocialIcons(); #>
2254
+ </div>
2255
+ <# } #>
2256
+ </div>
2257
+ <div class="premium-person-info">
2258
+ <div class="premium-person-info-container">
2259
+ <# if( 'style3' !== skin && '' != settings.premium_person_name ) { #>
2260
+ <{{{nameHeading}}} class="premium-person-name">
2261
+ <span {{{ view.getRenderAttributeString('premium_person_name') }}}>
2262
+ {{{ settings.premium_person_name }}}
2263
+ </span>
2264
+ </{{{nameHeading}}}>
2265
+ <# }
2266
+
2267
+ if( 'style3' === skin ) { #>
2268
+ <div class="premium-person-title-desc-wrap">
2269
+ <# }
2270
+ if( '' != settings.premium_person_title ) { #>
2271
+ <{{{titleHeading}}} class="premium-person-title">
2272
+ <span {{{ view.getRenderAttributeString('premium_person_title') }}}>
2273
+ {{{ settings.premium_person_title }}}
2274
+ </span>
2275
+ </{{{titleHeading}}}>
2276
+ <# }
2277
+ if( '' != settings.premium_person_content ) { #>
2278
+ <div class="premium-person-content">
2279
+ <div {{{ view.getRenderAttributeString('premium_person_content') }}}>
2280
+ {{{ settings.premium_person_content }}}
2281
+ </div>
2282
+ </div>
2283
+ <# }
2284
+ if( 'style3' === skin ) { #>
2285
+ </div>
2286
+ <# }
2287
+
2288
+ if( 'style3' === skin ) { #>
2289
+ <div class="premium-person-name-icons-wrap">
2290
+ <# if( '' != settings.premium_person_name ) { #>
2291
+ <{{{nameHeading}}} class="premium-person-name">
2292
+ <span {{{ view.getRenderAttributeString('premium_person_name') }}}>
2293
+ {{{ settings.premium_person_name }}}
2294
+ </span>
2295
+ </{{{nameHeading}}}>
2296
+ <# }
2297
+ if( 'yes' === settings.premium_person_social_enable ) {
2298
+ getSocialIcons();
2299
+ } #>
2300
+ </div>
2301
+ <# }
2302
+
2303
+ if ( 'style1' === settings.premium_person_style && 'yes' === settings.premium_person_social_enable ) {
2304
+ getSocialIcons();
2305
+ } #>
2306
+ </div>
2307
+ </div>
2308
+ </div>
2309
+ <# } else {
2310
+ _.each( persons, function( person, index ) {
2311
+ var nameSettingKey = view.getRepeaterSettingKey( 'multiple_name', 'multiple_persons', index ),
2312
+ titleSettingKey = view.getRepeaterSettingKey( 'multiple_title', 'multiple_persons', index ),
2313
+ descSettingKey = view.getRepeaterSettingKey( 'multiple_description', 'multiple_persons', index );
2314
+
2315
+
2316
+ view.addInlineEditingAttributes( nameSettingKey, 'advanced' );
2317
+ view.addInlineEditingAttributes( titleSettingKey, 'advanced' );
2318
+ view.addInlineEditingAttributes( descSettingKey, 'advanced' );
2319
+
2320
+ var personImageHtml = '';
2321
+ if ( person.multiple_image.url ) {
2322
+ var personImage = {
2323
+ id: person.multiple_image.id,
2324
+ url: person.multiple_image.url,
2325
+ size: settings.thumbnail_size,
2326
+ dimension: settings.thumbnail_custom_dimension,
2327
+ model: view.getEditModel()
2328
+ };
2329
+
2330
+ var personImageUrl = elementor.imagesManager.getImageUrl( personImage );
2331
+
2332
+ personImageHtml = '<img src="' + personImageUrl + '"/>';
2333
+
2334
+ }
2335
+ #>
2336
+ <div {{{ view.getRenderAttributeString('person_container') }}}>
2337
+ <div class="premium-person-image-container">
2338
+ <div class="premium-person-image-wrap">
2339
+ {{{personImageHtml}}}
2340
+ </div>
2341
+ <# if ( 'style2' === settings.premium_person_style && 'yes' === person.multiple_social_enable ) { #>
2342
+ <div class="premium-person-social">
2343
+ <# getSocialIcons( person ); #>
2344
+ </div>
2345
+ <# } #>
2346
+ </div>
2347
+ <div class="premium-person-info">
2348
+ <div class="premium-person-info-container">
2349
+ <# if( 'style3' !== skin && '' != person.multiple_name ) { #>
2350
+ <{{{nameHeading}}} class="premium-person-name">
2351
+ <span {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2352
+ {{{ person.multiple_name }}}
2353
+ </span></{{{nameHeading}}}>
2354
+ <# }
2355
+
2356
+ if( 'style3' === skin ) { #>
2357
+ <div class="premium-person-title-desc-wrap">
2358
+ <# }
2359
+ if( '' != person.multiple_title ) { #>
2360
+ <{{{titleHeading}}} class="premium-person-title">
2361
+ <span {{{ view.getRenderAttributeString( titleSettingKey ) }}}>
2362
+ {{{ person.multiple_title }}}
2363
+ </span></{{{titleHeading}}}>
2364
+ <# }
2365
+ if( '' != person.multiple_description ) { #>
2366
+ <div class="premium-person-content">
2367
+ <div {{{ view.getRenderAttributeString( descSettingKey ) }}}>
2368
+ {{{ person.multiple_description }}}
2369
+ </div>
2370
+ </div>
2371
+ <# }
2372
+ if( 'style3' === skin ) { #>
2373
+ </div>
2374
+ <# }
2375
+
2376
+ if( 'style3' === skin ) { #>
2377
+ <div class="premium-person-name-icons-wrap">
2378
+ <# if( '' != settings.premium_person_name ) { #>
2379
+ <{{{nameHeading}}} class="premium-person-name">
2380
+ <span {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2381
+ {{{ person.multiple_name }}}
2382
+ </span></{{{nameHeading}}}>
2383
+ <# }
2384
+ if( 'yes' === person.multiple_social_enable ) {
2385
+ getSocialIcons( person );
2386
+ } #>
2387
+ </div>
2388
+ <# }
2389
+
2390
+ if ( 'style1' === settings.premium_person_style && 'yes' === person.multiple_social_enable ) {
2391
+ getSocialIcons( person );
2392
+ } #>
2393
+ </div>
2394
+ </div>
2395
+ </div>
2396
+ <# });
2397
+ } #>
2398
+
2399
+ </div>
2400
+ <?php
2401
+ }
2402
+ }