Premium Addons for Elementor - Version 2.5.0

Version Description

  • New: Added Premium Addons PRO Controls.
Download this release

Release Info

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

Code changes from version 2.4.1 to 2.5.0

Files changed (42) hide show
  1. admin/assets/admin.css +36 -13
  2. admin/assets/admin.js +71 -8
  3. admin/assets/pa-elements-font/css/pa-elements.css +1 -4
  4. admin/assets/pa-elements-font/css/pafont.css +13 -1
  5. admin/settings/about.php +93 -0
  6. admin/{settings-page.php → settings/elements.php} +300 -151
  7. admin/settings/gomaps.php +120 -0
  8. admin/settings/gopro.php +79 -0
  9. admin/settings/sys-info.php +59 -0
  10. admin/settings/version-control.php +126 -0
  11. assets/css/premium-addons.css +18 -17
  12. assets/js/lib/mixitup.min.js +0 -18
  13. assets/js/lib/modal.js +1 -1
  14. assets/js/premium-addons.js +21 -30
  15. elementor-helper.php +6 -6
  16. includes/beta-testers.php +1 -1
  17. includes/helper-functions.php +97 -0
  18. includes/rollback.php +0 -1
  19. plugin.php +39 -0
  20. premium-addons-for-elementor.php +380 -185
  21. queries.php +2 -2
  22. readme.txt +49 -9
  23. widgets/premium-banner.php +27 -29
  24. widgets/premium-blog.php +76 -75
  25. widgets/premium-button.php +5 -5
  26. widgets/premium-carousel.php +3 -3
  27. widgets/premium-contactform.php +2 -2
  28. widgets/premium-countdown.php +2 -2
  29. widgets/premium-counter.php +8 -8
  30. widgets/premium-dual-header.php +7 -7
  31. widgets/premium-fancytext.php +10 -10
  32. widgets/premium-grid.php +15 -15
  33. widgets/premium-image-button.php +6 -6
  34. widgets/{premium-image-separator.php → premium-imageseparator.php} +5 -5
  35. widgets/premium-maps.php +7 -7
  36. widgets/premium-modalbox.php +7 -7
  37. widgets/premium-person.php +16 -17
  38. widgets/premium-pricing-table.php +76 -70
  39. widgets/premium-progressbar.php +8 -6
  40. widgets/premium-testimonials.php +3 -3
  41. widgets/premium-title.php +4 -4
  42. widgets/premium-videobox.php +4 -4
admin/assets/admin.css CHANGED
@@ -17,9 +17,13 @@ h1.pa-title-main {
17
  font-weight: normal;
18
  margin-left: 3px;
19
  }
20
- .pa-title-right{
21
  float: right;
22
  }
 
 
 
 
23
  .button.pa-btn {
24
  border: none;
25
  color: #fff;
@@ -89,6 +93,7 @@ li.ui-state-active a{
89
  }
90
  .pa-settings-tabs {
91
  padding: 15px 25px;
 
92
  }
93
  #pa-about {
94
  margin-top: 50px;
@@ -126,7 +131,7 @@ li.ui-state-active a{
126
  font-size: 13px;
127
  margin: 1em 0;
128
  }
129
- /*ELements Settings Tab*/
130
  .pa-elements-table {
131
  border-collapse: collapse;
132
  margin-top: 0.5em;
@@ -167,9 +172,9 @@ li.ui-state-active a{
167
  .switch input {
168
  display:none;
169
  }
170
-
171
  /* The slider */
172
- .slider {
 
173
  position: absolute;
174
  cursor: pointer;
175
  top: 0;
@@ -181,8 +186,8 @@ li.ui-state-active a{
181
  -webkit-transition: .4s;
182
  transition: .4s;
183
  }
184
-
185
- .slider:before {
186
  position: absolute;
187
  content: "";
188
  height: 27.5px;
@@ -197,19 +202,15 @@ li.ui-state-active a{
197
  margin: 0;
198
  border: 1px solid rgb(198,198,198);
199
  box-shadow: 0px 2.5px 5px rgb(184,184,185);
200
-
201
  }
202
-
203
  input:checked + .slider {
204
  background-color: rgb(24,164,253);
205
  box-shadow: 0 0 2px 1px rgb(20,154,253) inset;
206
  border: 1px solid rgb(20,154,253);
207
  }
208
-
209
  input:focus + .slider {
210
  box-shadow: 0 0 1px rgb(24,164,253);
211
  }
212
-
213
  input:checked + .slider:before {
214
  box-shadow: 0px 2.5px 5px #0d6fbd;
215
  border: 1px solid #0d6fbd;
@@ -219,11 +220,13 @@ input:checked + .slider:before {
219
  }
220
 
221
  /* Rounded sliders */
222
- .slider.round {
 
223
  border: 1px solid rgb(184,184,185);
224
  border-radius: 34px;
225
  }
226
- .slider.round:before {
 
227
  border-radius: 50%;
228
  }
229
  .pa-maps-table {
@@ -251,7 +254,6 @@ input:checked + .slider:before {
251
  width: 400px;
252
  margin-left: 30px;
253
  }
254
-
255
  #pa-maintenance {
256
  margin-top: 30px;
257
  }
@@ -340,3 +342,24 @@ input:checked + .slider:before {
340
  margin-bottom: 10px;
341
  font-weight: 500;
342
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  font-weight: normal;
18
  margin-left: 3px;
19
  }
20
+ .pa-title-right {
21
  float: right;
22
  }
23
+ .pa-title-right img {
24
+ width: 100px;
25
+ height: 100px;
26
+ }
27
  .button.pa-btn {
28
  border: none;
29
  color: #fff;
93
  }
94
  .pa-settings-tabs {
95
  padding: 15px 25px;
96
+ margin-top: -3em;
97
  }
98
  #pa-about {
99
  margin-top: 50px;
131
  font-size: 13px;
132
  margin: 1em 0;
133
  }
134
+ /*Elements Settings Tab*/
135
  .pa-elements-table {
136
  border-collapse: collapse;
137
  margin-top: 0.5em;
172
  .switch input {
173
  display:none;
174
  }
 
175
  /* The slider */
176
+ .slider,
177
+ .pro-slider {
178
  position: absolute;
179
  cursor: pointer;
180
  top: 0;
186
  -webkit-transition: .4s;
187
  transition: .4s;
188
  }
189
+ .slider:before,
190
+ .pro-slider:before {
191
  position: absolute;
192
  content: "";
193
  height: 27.5px;
202
  margin: 0;
203
  border: 1px solid rgb(198,198,198);
204
  box-shadow: 0px 2.5px 5px rgb(184,184,185);
 
205
  }
 
206
  input:checked + .slider {
207
  background-color: rgb(24,164,253);
208
  box-shadow: 0 0 2px 1px rgb(20,154,253) inset;
209
  border: 1px solid rgb(20,154,253);
210
  }
 
211
  input:focus + .slider {
212
  box-shadow: 0 0 1px rgb(24,164,253);
213
  }
 
214
  input:checked + .slider:before {
215
  box-shadow: 0px 2.5px 5px #0d6fbd;
216
  border: 1px solid #0d6fbd;
220
  }
221
 
222
  /* Rounded sliders */
223
+ .slider.round,
224
+ .pro-slider.round {
225
  border: 1px solid rgb(184,184,185);
226
  border-radius: 34px;
227
  }
228
+ .slider.round:before,
229
+ .pro-slider.round:before {
230
  border-radius: 50%;
231
  }
232
  .pa-maps-table {
254
  width: 400px;
255
  margin-left: 30px;
256
  }
 
257
  #pa-maintenance {
258
  margin-top: 30px;
259
  }
342
  margin-bottom: 10px;
343
  font-weight: 500;
344
  }
345
+ tr.pa-sec-elems-tr {
346
+ border: none;
347
+ }
348
+ tr.pa-sec-elems-tr th {
349
+ padding-bottom: 0;
350
+ }
351
+ tr.pa-sec-elems-tr th h1{
352
+ font-weight: bold;
353
+ font-size: 25px;
354
+ letter-spacing: 1px;
355
+ color: #555;
356
+ margin-bottom: 0;
357
+ }
358
+ .pa-swal-head {
359
+ display: block;
360
+ margin-bottom: 20px;
361
+ }
362
+ .pa-swal-desc {
363
+ font-weight: bold;
364
+ color: #0f6aa7;
365
+ }
admin/assets/admin.js CHANGED
@@ -1,14 +1,8 @@
1
  //Go Between the Tabs
2
  ( function ( $ ){
 
 
3
  "use strict";
4
- $(".pa-settings-tabs").tabs();
5
-
6
-
7
- $("a.pa-tab-list-item").on("click", function () {
8
- var tabHref = $(this).attr('href');
9
- window.location.hash = tabHref;
10
- $("html , body").scrollTop(tabHref);
11
- });
12
 
13
  $(".pa-checkbox").on("click", function(){
14
  if($(this).prop("checked") == true) {
@@ -18,6 +12,23 @@
18
  }
19
  });
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  $( 'form#pa-settings' ).on( 'submit', function(e) {
22
  e.preventDefault();
23
  $.ajax( {
@@ -43,8 +54,60 @@
43
  } );
44
 
45
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  $( '.pa-rollback-button' ).on( 'click', function( event ) {
49
  event.preventDefault();
50
 
1
  //Go Between the Tabs
2
  ( function ( $ ){
3
+
4
+ var redirectionLink = " https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=";
5
  "use strict";
 
 
 
 
 
 
 
 
6
 
7
  $(".pa-checkbox").on("click", function(){
8
  if($(this).prop("checked") == true) {
12
  }
13
  });
14
 
15
+ $(".pro-slider").on('click', function(){
16
+
17
+ swal({
18
+ title: '<span class="pa-swal-head">Get PRO Widgets & Addons<span>',
19
+ html: 'Supercharge your Elementor with PRO widgets and addons that you won’t find anywhere else.',
20
+ type: 'warning',
21
+ showCloseButton: true,
22
+ showCancelButton: true,
23
+ cancelButtonText: "More Info",
24
+ focusConfirm: true
25
+ }).then(function(json_data) {}, function(dismiss) {
26
+ if (dismiss === 'cancel') {
27
+ window.location.href = redirectionLink + settings.theme;
28
+ }
29
+ });
30
+ });
31
+
32
  $( 'form#pa-settings' ).on( 'submit', function(e) {
33
  e.preventDefault();
34
  $.ajax( {
54
  } );
55
 
56
  } );
57
+
58
+ $('form#pa-maps').on('submit',function(e){
59
+ e.preventDefault();
60
+ $.ajax( {
61
+ url: settings.ajaxurl,
62
+ type: 'post',
63
+ data: {
64
+ action: 'pa_maps_save_settings',
65
+ fields: $('form#pa-maps').serialize(),
66
+ },
67
+ success: function (response){
68
+ swal(
69
+ 'Settings Saved!',
70
+ 'Click OK to continue',
71
+ 'success'
72
+ );
73
+ },
74
+ error: function(){
75
+ swal(
76
+ 'Oops...',
77
+ 'Something Wrong!',
78
+ );
79
+ }
80
+ });
81
+ });
82
 
83
 
84
+ $('form#pa-beta-form').on('submit',function(e){
85
+ e.preventDefault();
86
+ $.ajax( {
87
+ url: settings.ajaxurl,
88
+ type: 'post',
89
+ data: {
90
+ action: 'pa_beta_save_settings',
91
+ fields: $('form#pa-beta-form').serialize(),
92
+ },
93
+ success: function (response){
94
+ swal(
95
+ 'Settings Saved!',
96
+ 'Click OK to continue',
97
+ 'success'
98
+ );
99
+ },
100
+ error: function(){
101
+ swal(
102
+ 'Oops...',
103
+ 'Something Wrong!',
104
+ );
105
+ }
106
+ });
107
+ });
108
+
109
+
110
+
111
  $( '.pa-rollback-button' ).on( 'click', function( event ) {
112
  event.preventDefault();
113
 
admin/assets/pa-elements-font/css/pa-elements.css CHANGED
@@ -57,9 +57,6 @@
57
  .pa-image-separator:before {
58
  content: "\e90a";
59
  }
60
- .pa-flip-box:before {
61
- content: "\e90b";
62
- }
63
  .pa-fancy-text:before {
64
  content: "\e90c";
65
  }
@@ -89,4 +86,4 @@
89
  }
90
  .pa-button:before {
91
  content: "\e915";
92
- }
57
  .pa-image-separator:before {
58
  content: "\e90a";
59
  }
 
 
 
60
  .pa-fancy-text:before {
61
  content: "\e90c";
62
  }
86
  }
87
  .pa-button:before {
88
  content: "\e915";
89
+ }
admin/assets/pa-elements-font/css/pafont.css CHANGED
@@ -8,7 +8,7 @@
8
  font-weight: normal;
9
  font-style: normal;
10
  }
11
- .toplevel_page_pa-settings-page > div.wp-menu-image::before {
12
  position: relative;
13
  top: 5px;
14
  content: "\e900";
@@ -24,3 +24,15 @@
24
  -moz-osx-font-smoothing: grayscale;
25
  font-size: 21px;
26
  }
 
 
 
 
 
 
 
 
 
 
 
 
8
  font-weight: normal;
9
  font-style: normal;
10
  }
11
+ .toplevel_page_premium-addons > div.wp-menu-image::before {
12
  position: relative;
13
  top: 5px;
14
  content: "\e900";
24
  -moz-osx-font-smoothing: grayscale;
25
  font-size: 21px;
26
  }
27
+ #toplevel_page_premium-addons a[href="admin.php?page=premium-addons-pro"] {
28
+ color:#1A7FC2;
29
+ }
30
+ #toplevel_page_premium-addons a[href="admin.php?page=premium-addons-pro"]:hover {
31
+ color:#1A7FC2;
32
+ }
33
+ #toplevel_page_premium-addons li.current a[href="admin.php?page=premium-addons-pro"] {
34
+ color:#1A7FC2;
35
+ }
36
+ #toplevel_page_premium-addons li.current a[href="admin.php?page=premium-addons-pro"]:hover {
37
+ color:#1A7FC2;
38
+ }
admin/settings/about.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace PremiumAddons;
3
+
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ class PA_About {
7
+
8
+ public function create_about_menu(){
9
+ if ( ! Helper_Functions::is_show_about()){
10
+ add_submenu_page(
11
+ 'premium-addons',
12
+ '',
13
+ esc_html__('About','premium-addons-for-elementor'),
14
+ 'manage_options',
15
+ 'premium-addons-about',
16
+ [ $this, 'pa_about_page' ]
17
+ );
18
+ }
19
+ }
20
+
21
+ public function pa_about_page(){
22
+
23
+ $theme = wp_get_theme();
24
+
25
+ if( $theme->parent() ) {
26
+ $theme_name = $theme->parent()->get('Name');
27
+ } else {
28
+ $theme_name = $theme->get('Name');
29
+ }
30
+
31
+ $theme_name = sanitize_key( $theme_name );
32
+
33
+ $url = sprintf('https://premiumaddons.com/pro/?utm_source=about-page&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme_name );
34
+
35
+ $support_url = sprintf('https://premiumaddons.com/support/?utm_source=about-page&utm_medium=wp-dash&utm_campaign=get-support&utm_term=%s', $theme_name );
36
+
37
+ ?>
38
+ <div class="wrap">
39
+ <div class="response-wrap"></div>
40
+ <div class="pa-header-wrapper">
41
+ <div class="pa-title-left">
42
+ <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
43
+ <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
44
+ </div>
45
+ <?php if( ! Helper_Functions::is_show_logo()) : ?>
46
+ <div class="pa-title-right">
47
+ <img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
48
+ </div>
49
+ <?php endif; ?>
50
+ </div>
51
+ <div class="pa-settings-tabs">
52
+ <div id="pa-about" class="pa-settings-tab">
53
+ <div class="pa-row">
54
+ <div class="pa-col-half">
55
+ <div class="pa-about-panel">
56
+ <div class="pa-icon-container">
57
+ <i class="dashicons dashicons-info abt-icon-style"></i>
58
+ </div>
59
+ <div class="pa-text-container">
60
+ <h4>What is Premium Addons?</h4>
61
+ <p>Premium Addons for Elementor extends Elementor Page Builder capabilities with many fully customizable widgets and addons that help you to build impressive websites with no coding required.</p>
62
+ <?php if( !defined('PREMIUM_PRO_ADDONS_VERSION') ) : ?>
63
+ <p>Get more widgets and addons with <strong>Premium Addons Pro</strong> <a href="<?php echo esc_url( $url ); ?>" target="_blank" >Click Here</a> to know more.</p>
64
+ <?php endif; ?>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <div class="pa-col-half">
69
+ <div class="pa-about-panel">
70
+ <div class="pa-icon-container">
71
+ <i class="dashicons dashicons-universal-access-alt abt-icon-style"></i>
72
+ </div>
73
+ <div class="pa-text-container">
74
+ <h4>Docs and Support</h4>
75
+ <p>It’s highly recommended to check out documentation and FAQ before using this plugin. <a target="_blank" href="<?php echo esc_url( $support_url ); ?>">Click Here </a> for more details. You can also join our <a href="https://www.facebook.com/groups/PremiumAddons" target="_blank">Facebook Group</a> and Our <a href="https://my.leap13.com/forums/" target="_blank">Community Forums</a></p>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ <?php if( ! Helper_Functions::is_show_rate()) : ?>
81
+ <div>
82
+ <p>Did you like Premium Addons for Elementor Plugin? Please <a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank">Click Here to Rate it ★★★★★</a></p>
83
+ </div>
84
+ <?php endif; ?>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <?php }
89
+
90
+ public function __construct() {
91
+ add_action( 'admin_menu', array ($this,'create_about_menu' ), 100 );
92
+ }
93
+ }
admin/{settings-page.php → settings/elements.php} RENAMED
@@ -1,25 +1,26 @@
1
  <?php
2
 
 
 
3
  if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
4
 
5
  class PA_admin_settings {
6
 
7
- protected $page_slug = 'pa-settings-page';
8
-
9
 
10
- public $pa_elements_keys = ['premium-banner', 'premium-blog','premium-carousel', 'premium-countdown','premium-counter','premium-dual-header','premium-fancytext','premium-image-separator','premium-maps','premium-modalbox','premium-person','premium-progressbar','premium-testimonials','premium-title','premium-videobox','premium-pricing-table','premium-button','premium-contactform', 'premium-image-button', 'premium-map-api', 'premium-map-disable-api','premium-grid', 'is-beta-tester'];
11
 
12
  private $pa_default_settings;
13
 
14
  private $pa_settings;
15
 
16
  private $pa_get_settings;
17
-
18
  public function __construct() {
19
  add_action( 'admin_menu', array( $this,'pa_admin_menu') );
20
- add_action( 'admin_enqueue_scripts', array( $this, 'pa_admin_page_scripts' ) );
21
  add_action( 'wp_ajax_pa_save_admin_addons_settings', array( $this, 'pa_save_settings_with_ajax' ) );
22
- add_action( 'admin_enqueue_scripts',array( $this, 'localize_js_script' ) );
23
  }
24
 
25
  public function localize_js_script(){
@@ -39,7 +40,7 @@ class PA_admin_settings {
39
  }
40
 
41
  public function pa_admin_page_scripts () {
42
- wp_enqueue_style( 'pa_admin_icon', plugins_url( '/', __FILE__ ).'assets/pa-elements-font/css/pafont.css' );
43
  $current_screen = get_current_screen();
44
  if( strpos($current_screen->id , $this->page_slug) !== false ){
45
 
@@ -49,7 +50,7 @@ class PA_admin_settings {
49
  wp_register_style( 'premium-addons-sweetalert-style', PREMIUM_ADDONS_URL.'admin/assets/js/sweetalert2/css/sweetalert2.min.css' );
50
  wp_enqueue_style('premium-addons-sweetalert-style');
51
 
52
- wp_register_script('premium-addons-admin-js', PREMIUM_ADDONS_URL .'admin/assets/admin.js' , array('jquery','jquery-ui-tabs'), PREMIUM_ADDONS_VERSION , true );
53
  wp_enqueue_script('premium-addons-admin-js');
54
 
55
  wp_register_script('premium-addons-admin-dialog', PREMIUM_ADDONS_URL . 'admin/assets/js/dialog/dialog.js',array('jquery-ui-position'),PREMIUM_ADDONS_VERSION,true);
@@ -65,15 +66,34 @@ class PA_admin_settings {
65
  }
66
 
67
  public function pa_admin_menu() {
68
- add_menu_page( 'Premium Addons for Elementor', 'Premium Addons for Elementor', 'manage_options', 'pa-settings-page', array( $this , 'pa_admin_page' ), '' , 100 );
 
 
 
 
 
 
69
  }
70
 
71
  public function pa_admin_page(){
 
 
 
 
 
 
 
 
 
 
 
72
  $js_info = array(
73
- 'ajaxurl' => admin_url( 'admin-ajax.php' )
 
74
  );
 
75
  wp_localize_script( 'premium-addons-admin-js', 'settings', $js_info );
76
-
77
  $this->pa_default_settings = array_fill_keys( $this->pa_elements_keys, true );
78
 
79
  $this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
@@ -85,79 +105,25 @@ class PA_admin_settings {
85
  update_option( 'pa_save_settings', $pa_updated_settings );
86
  }
87
  $this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
88
-
 
 
89
  ?>
90
  <div class="wrap">
91
  <div class="response-wrap"></div>
92
  <form action="" method="POST" id="pa-settings" name="pa-settings">
93
  <div class="pa-header-wrapper">
94
  <div class="pa-title-left">
95
- <h1 class="pa-title-main"><?php echo esc_html__('Premium Addons for Elementor', 'premium-addons-for-elementor'); ?></h1>
96
- <h3 class="pa-title-sub"><?php echo esc_html__('Thank you for using Premium Addons for Elementor. This plugin has been developed by Leap13 and we hope you enjoy using it.', 'premium-addons-for-elementor'); ?></h3>
97
  </div>
 
98
  <div class="pa-title-right">
99
-
100
- <img class="pa-logo" src="<?php echo plugins_url('/',__FILE__) . 'images/premium-addons-logo.png';?>">
101
  </div>
 
102
  </div>
103
  <div class="pa-settings-tabs">
104
- <ul class="pa-settings-tabs-list">
105
- <li><a class="pa-tab-list-item" href="#pa-about">About</a></li>
106
- <li><a class="pa-tab-list-item" href="#pa-modules">Elements</a></li>
107
- <li><a class="pa-tab-list-item" href="#pa-maps-api">Google Maps API</a></li>
108
- <li><a class="pa-tab-list-item" href="#pa-maintenance">Version Control</a></li>
109
- <li><a class="pa-tab-list-item" href="#pa-system">System Info</a></li>
110
- </ul>
111
- <div id="pa-about" class="pa-settings-tab">
112
- <div class="pa-row">
113
- <div class="pa-col-half">
114
- <div class="pa-about-panel">
115
- <div class="pa-icon-container">
116
- <i class="dashicons dashicons-info abt-icon-style"></i>
117
- </div>
118
- <div class="pa-text-container">
119
- <h4>What is Premium Addons?</h4>
120
- <p>Premium Addons for Elementor that extends Elementor Page Builder capabilities with 20 fully customizable elements that helps you build impressive websites with no coding required.</p>
121
- </div>
122
- </div>
123
- </div>
124
- <div class="pa-col-half">
125
- <div class="pa-about-panel">
126
- <div class="pa-icon-container">
127
- <i class="dashicons dashicons-universal-access-alt abt-icon-style"></i>
128
- </div>
129
- <div class="pa-text-container">
130
- <h4>Documentation & FAQ</h4>
131
- <p>It’s highly recommended to check out documentation and FAQ before using this plugin. <a target="_blanl" href="http://premiumaddons.com/premium-addons-for-elementor-plugin-documentation/">Click Here </a> for more details.</p>
132
- </div>
133
- </div>
134
- </div>
135
- </div>
136
- <div class="pa-row">
137
- <div class="pa-col-half">
138
- <div class="pa-about-panel">
139
- <div class="pa-icon-container">
140
- <i class="dashicons dashicons-share abt-icon-style"></i>
141
- </div>
142
- <div class="pa-text-container">
143
- <h4>Need More Help?</h4>
144
- <p>Feel free to join us in our <a target="_blank" href="https://www.facebook.com/groups/2042193629353325/">Facebook Group</a> and our <a target="_blank" href="http://www.leap13.com/forums/forum/premium-addons-for-elementor-plugin-community-support/">Community Forums</a> if you need more help using the plugin.</p>
145
- </div>
146
- </div>
147
- </div>
148
- <div class="pa-col-half">
149
- <div class="pa-about-panel">
150
- <div class="pa-icon-container">
151
- <i class="dashicons dashicons-download abt-icon-style"></i>
152
- </div>
153
- <div class="pa-text-container">
154
- <h4>Keep Updated</h4>
155
- <p>Join our Newsletter to get more info about our products updates. <a target="_blank" href="http://premiumaddons.com/premium-addons-elementor-newsletter/">Click Here</a> to Join Now.</p>
156
- </div>
157
- </div>
158
- </div>
159
- </div>
160
- </div>
161
  <div id="pa-modules" class="pa-settings-tab">
162
  <div>
163
  <br>
@@ -167,14 +133,14 @@ class PA_admin_settings {
167
  <table class="pa-elements-table">
168
  <tbody>
169
  <tr>
170
- <th><?php echo esc_html__('Premium Banner', 'premium-addons-for-elementor'); ?></th>
171
  <td>
172
  <label class="switch">
173
  <input type="checkbox" id="premium-banner" name="premium-banner" <?php checked(1, $this->pa_get_settings['premium-banner'], true) ?>>
174
  <span class="slider round"></span>
175
  </label>
176
  </td>
177
- <th><?php echo esc_html__('Premium Blog', 'premium-addons-for-elementor'); ?></th>
178
  <td>
179
  <label class="switch">
180
  <input type="checkbox" id="premium-blog" name="premium-blog" <?php checked(1, $this->pa_get_settings['premium-blog'], true) ?>>
@@ -185,14 +151,14 @@ class PA_admin_settings {
185
 
186
 
187
  <tr>
188
- <th><?php echo esc_html__('Premium Carousel', 'premium-addons-for-elementor'); ?></th>
189
  <td>
190
  <label class="switch">
191
  <input type="checkbox" id="premium-carousel" name="premium-carousel" <?php checked(1, $this->pa_get_settings['premium-carousel'], true) ?>>
192
  <span class="slider round"></span>
193
  </label>
194
  </td>
195
- <th><?php echo esc_html__('Premium Countdown', 'premium-addons-for-elementor'); ?></th>
196
  <td>
197
  <label class="switch">
198
  <input type="checkbox" id="premium-countdown" name="premium-countdown" <?php checked(1, $this->pa_get_settings['premium-countdown'], true) ?>>
@@ -202,14 +168,14 @@ class PA_admin_settings {
202
  </tr>
203
 
204
  <tr>
205
- <th><?php echo esc_html__('Premium Counter', 'premium-addons-for-elementor'); ?></th>
206
  <td>
207
  <label class="switch">
208
  <input type="checkbox" id="premium-counter" name="premium-counter" <?php checked(1, $this->pa_get_settings['premium-counter'], true) ?>>
209
  <span class="slider round"></span>
210
  </label>
211
  </td>
212
- <th><?php echo esc_html__('Premium Dual Header', 'premium-addons-for-elementor'); ?></th>
213
  <td>
214
  <label class="switch">
215
  <input type="checkbox" id="premium-dual-header" name="premium-dual-header" <?php checked(1, $this->pa_get_settings['premium-dual-header'], true) ?>>
@@ -218,9 +184,8 @@ class PA_admin_settings {
218
  </td>
219
  </tr>
220
 
221
-
222
  <tr>
223
- <th><?php echo esc_html__('Premium Fancy Text', 'premium-addons-for-elementor'); ?></th>
224
  <td>
225
  <label class="switch">
226
  <input type="checkbox" id="premium-fancytext" name="premium-fancytext" <?php checked(1, $this->pa_get_settings['premium-fancytext'], true) ?>>
@@ -236,17 +201,16 @@ class PA_admin_settings {
236
  </td>
237
  </tr>
238
 
239
-
240
  <tr>
241
 
242
- <th><?php echo esc_html__('Premium Maps', 'premium-addons-for-elementor'); ?></th>
243
  <td>
244
  <label class="switch">
245
  <input type="checkbox" id="premium-maps" name="premium-maps" <?php checked(1, $this->pa_get_settings['premium-maps'], true) ?>>
246
  <span class="slider round"></span>
247
  </label>
248
  </td>
249
- <th><?php echo esc_html__('Premium Modal Box', 'premium-addons-for-elementor'); ?></th>
250
  <td>
251
  <label class="switch">
252
  <input type="checkbox" id="premium-modalbox" name="premium-modalbox" <?php checked(1, $this->pa_get_settings['premium-modalbox'], true) ?>>
@@ -256,14 +220,14 @@ class PA_admin_settings {
256
  </tr>
257
 
258
  <tr>
259
- <th><?php echo esc_html__('Premium Person', 'premium-addons-for-elementor'); ?></th>
260
  <td>
261
  <label class="switch">
262
  <input type="checkbox" id="premium-person" name="premium-person" <?php checked(1, $this->pa_get_settings['premium-person'], true) ?>>
263
  <span class="slider round"></span>
264
  </label>
265
  </td>
266
- <th><?php echo esc_html__('Premium Progress Bar', 'premium-addons-for-elementor'); ?></th>
267
  <td>
268
  <label class="switch">
269
  <input type="checkbox" id="premium-progressbar" name="premium-progressbar" <?php checked(1, $this->pa_get_settings['premium-progressbar'], true) ?>>
@@ -274,14 +238,14 @@ class PA_admin_settings {
274
  </tr>
275
 
276
  <tr>
277
- <th><?php echo esc_html__('Premium Testimonials', 'premium-addons-for-elementor'); ?></th>
278
  <td>
279
  <label class="switch">
280
  <input type="checkbox" id="premium-testimonials" name="premium-testimonials" <?php checked(1, $this->pa_get_settings['premium-testimonials'], true) ?>>
281
  <span class="slider round"></span>
282
  </label>
283
  </td>
284
- <th><?php echo esc_html__('Premium Title', 'premium-addons-for-elementor'); ?></th>
285
  <td>
286
  <label class="switch">
287
  <input type="checkbox" id="premium-title" name="premium-title" <?php checked(1, $this->pa_get_settings['premium-title'], true) ?>>
@@ -291,14 +255,14 @@ class PA_admin_settings {
291
  </tr>
292
 
293
  <tr>
294
- <th><?php echo esc_html__('Premium Video Box', 'premium-addons-for-elementor'); ?></th>
295
  <td>
296
  <label class="switch">
297
  <input type="checkbox" id="premium-videobox" name="premium-videobox" <?php checked(1, $this->pa_get_settings['premium-videobox'], true) ?>>
298
  <span class="slider round"></span>
299
  </label>
300
  </td>
301
- <th><?php echo esc_html__('Premium Pricing Table', 'premium-addons-for-elementor'); ?></th>
302
  <td>
303
  <label class="switch">
304
  <input type="checkbox" id="premium-pricing-table" name="premium-pricing-table" <?php checked(1, $this->pa_get_settings['premium-pricing-table'], true) ?>>
@@ -308,14 +272,14 @@ class PA_admin_settings {
308
  </tr>
309
 
310
  <tr>
311
- <th><?php echo esc_html__('Premium Button', 'premium-addons-for-elementor'); ?></th>
312
  <td>
313
  <label class="switch">
314
  <input type="checkbox" id="premium-button" name="premium-button" <?php checked(1, $this->pa_get_settings['premium-button'], true) ?>>
315
  <span class="slider round"></span>
316
  </label>
317
  </td>
318
- <th><?php echo esc_html__('Premium Contact Form7', 'premium-addons-for-elementor'); ?></th>
319
  <td>
320
  <label class="switch">
321
  <input type="checkbox" id="premium-contactform" name="premium-contactform" <?php checked(1, $this->pa_get_settings['premium-contactform'], true) ?>>
@@ -325,7 +289,7 @@ class PA_admin_settings {
325
  </tr>
326
 
327
  <tr>
328
- <th><?php echo esc_html__('Premium Image Button', 'premium-addons-for-elementor'); ?></th>
329
  <td>
330
  <label class="switch">
331
  <input type="checkbox" id="premium-image-button" name="premium-image-button" <?php checked(1, $this->pa_get_settings['premium-image-button'], true) ?>>
@@ -333,7 +297,7 @@ class PA_admin_settings {
333
  </label>
334
  </td>
335
 
336
- <th><?php echo esc_html__('Premium Grid', 'premium-addons-for-elementor'); ?></th>
337
  <td>
338
  <label class="switch">
339
  <input type="checkbox" id="premium-grid" name="premium-grid" <?php checked(1, $this->pa_get_settings['premium-grid'], true) ?>>
@@ -341,70 +305,262 @@ class PA_admin_settings {
341
  </label>
342
  </td>
343
  </tr>
344
- </tbody>
345
- </table>
346
- <input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
347
-
348
- </div>
349
- <div id="pa-maps-api" class="pa-maps-tab">
350
- <div class="pa-row">
351
- <table class="pa-maps-table">
352
  <tr>
353
- <p class="pa-maps-api-notice">
354
- Premium Maps Element requires Google API key to be entered below. If you don’t have one, Click <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank"> Here</a> to get your key.
355
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  </tr>
 
357
  <tr>
358
- <th><h4 class="pa-api-title"><label>Google Maps API Key:</label><input name="premium-map-api" id="premium-map-api" type="text" placeholder="API Key" value="<?php echo $this->pa_get_settings['premium-map-api']; ?>"></h4></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  </tr>
 
360
  <tr>
361
- <th><h4 class="pa-api-disable-title"><label><?php echo esc_html__('Enable Maps API JS File:','premium-addons-for-elementor'); ?></label><input name="premium-map-disable-api" id="premium-map-disable-api" type="checkbox" <?php checked(1, $this->pa_get_settings['premium-map-disable-api'], true) ?>><span>This will Enable the API JS file if it's not included by another theme or plugin</span></h4></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  </tr>
363
- </table>
364
- <input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
365
- </div>
366
- </div>
367
- <div id="pa-maintenance" class="pa-settings-tab">
368
- <div class="pa-row">
369
- <table class="pa-beta-table">
370
  <tr>
371
- <th><h4 class="pa-roll-back">Rollback to Previous Version</h4><span class="pa-roll-back-span"><?php echo sprintf('Experiencing an issue with Premium Addons for Elementor version %s? Rollback to a previous version before the issue appeared.',PREMIUM_ADDONS_VERSION); ?></span></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  </tr>
373
 
374
- <tr class="pa-roll-row">
375
- <th>Rollback Version</th>
376
- <td><div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.4.0</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div><p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
377
  </tr>
 
378
  <tr>
379
- <th><h4 class="pa-beta-test">Become a Beta Tester</h4><span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  </tr>
381
- <tr class="pa-beta-row">
382
- <th><?php echo esc_html__('Beta Tester','premium-addons-for-elementor');?></th>
383
- <td><div><input name="is-beta-tester" id="is-beta-tester" type="checkbox" <?php checked(0, $this->pa_get_settings['is-beta-tester'], true) ?>><span><?php echo esc_html__('Check this box to get updates for beta versions','premium-addons-for-elementor'); ?></span></div><p class="pa-beta-desc"><span>Please Note: We do not recommend updating to a beta version on production sites.</span></p></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  </tr>
385
 
386
- </table>
387
-
388
- <input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
389
-
390
- </div>
391
- </div>
392
- <div id="pa-system" class="pa-settings-tab pa-sys-info-tab">
393
- <div class="pa-row">
394
-
395
- <h3 class="pa-sys-info-title"><?php echo esc_html__('System setup information useful for debugging purposes.','premium-addons-for-elementor');?></h3>
396
- <div class="pa-system-info-container">
397
- <?php
398
- echo nl2br(pa_get_sysinfo());
399
- ?>
400
- </div>
401
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
  </div>
403
-
404
  <div>
405
- <p>Did you like Premium Addons for Elementor Plugin? Please<a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank"> Click Here to Rate it ★★★★★</a></p>
406
  </div>
407
-
408
  </div>
409
  </form>
410
  </div>
@@ -412,7 +568,7 @@ class PA_admin_settings {
412
  }
413
 
414
  public function pa_save_settings_with_ajax() {
415
-
416
  if( isset( $_POST['fields'] ) ) {
417
  parse_str( $_POST['fields'], $settings );
418
  }else {
@@ -440,18 +596,11 @@ class PA_admin_settings {
440
  'premium-contactform' => intval( $settings['premium-contactform'] ? 1 : 0),
441
  'premium-image-button' => intval( $settings['premium-image-button'] ? 1 : 0),
442
  'premium-grid' => intval( $settings['premium-grid'] ? 1 : 0),
443
- 'premium-map-api' => $settings['premium-map-api'],
444
- 'premium-map-disable-api' => intval( $settings['premium-map-disable-api'] ? 1 : 0),
445
- 'is-beta-tester' => intval( $settings['is-beta-tester'] ? 0 : 1),
446
  );
 
447
  update_option( 'pa_save_settings', $this->pa_settings );
448
 
449
  return true;
450
  die();
451
-
452
-
453
  }
454
- }
455
-
456
-
457
- new PA_admin_settings();
1
  <?php
2
 
3
+ namespace PremiumAddons;
4
+
5
  if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
6
 
7
  class PA_admin_settings {
8
 
9
+ protected $page_slug = 'premium-addons';
 
10
 
11
+ public $pa_elements_keys = ['premium-banner', 'premium-blog','premium-carousel', 'premium-countdown','premium-counter','premium-dual-header','premium-fancytext','premium-image-separator','premium-maps','premium-modalbox','premium-person','premium-progressbar','premium-testimonials','premium-title','premium-videobox','premium-pricing-table','premium-button','premium-contactform', 'premium-image-button', 'premium-grid'];
12
 
13
  private $pa_default_settings;
14
 
15
  private $pa_settings;
16
 
17
  private $pa_get_settings;
18
+
19
  public function __construct() {
20
  add_action( 'admin_menu', array( $this,'pa_admin_menu') );
21
+ add_action('admin_enqueue_scripts', array( $this, 'pa_admin_page_scripts' ) );
22
  add_action( 'wp_ajax_pa_save_admin_addons_settings', array( $this, 'pa_save_settings_with_ajax' ) );
23
+ add_action('admin_enqueue_scripts',array( $this, 'localize_js_script' ) );
24
  }
25
 
26
  public function localize_js_script(){
40
  }
41
 
42
  public function pa_admin_page_scripts () {
43
+ wp_enqueue_style( 'pa_admin_icon', PREMIUM_ADDONS_URL .'admin/assets/pa-elements-font/css/pafont.css' );
44
  $current_screen = get_current_screen();
45
  if( strpos($current_screen->id , $this->page_slug) !== false ){
46
 
50
  wp_register_style( 'premium-addons-sweetalert-style', PREMIUM_ADDONS_URL.'admin/assets/js/sweetalert2/css/sweetalert2.min.css' );
51
  wp_enqueue_style('premium-addons-sweetalert-style');
52
 
53
+ wp_register_script('premium-addons-admin-js', PREMIUM_ADDONS_URL .'admin/assets/admin.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true );
54
  wp_enqueue_script('premium-addons-admin-js');
55
 
56
  wp_register_script('premium-addons-admin-dialog', PREMIUM_ADDONS_URL . 'admin/assets/js/dialog/dialog.js',array('jquery-ui-position'),PREMIUM_ADDONS_VERSION,true);
66
  }
67
 
68
  public function pa_admin_menu() {
69
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') && isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-plugin-name']) && '' != get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-plugin-name'] ){
70
+ $plugin_name = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-plugin-name'];
71
+ } else {
72
+ $plugin_name = 'Premium Addons for Elementor';
73
+ }
74
+
75
+ add_menu_page( $plugin_name, $plugin_name , 'manage_options', 'premium-addons', array( $this , 'pa_admin_page' ), '' , 100 );
76
  }
77
 
78
  public function pa_admin_page(){
79
+
80
+ $theme = wp_get_theme();
81
+
82
+ if( $theme->parent() ) {
83
+ $theme_name = $theme->parent()->get('Name');
84
+ } else {
85
+ $theme_name = $theme->get('Name');
86
+ }
87
+
88
+ $theme_name = sanitize_key($theme_name);
89
+
90
  $js_info = array(
91
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
92
+ 'theme' => $theme_name
93
  );
94
+
95
  wp_localize_script( 'premium-addons-admin-js', 'settings', $js_info );
96
+
97
  $this->pa_default_settings = array_fill_keys( $this->pa_elements_keys, true );
98
 
99
  $this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
105
  update_option( 'pa_save_settings', $pa_updated_settings );
106
  }
107
  $this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
108
+
109
+ $prefix = Helper_Functions::get_prefix();
110
+
111
  ?>
112
  <div class="wrap">
113
  <div class="response-wrap"></div>
114
  <form action="" method="POST" id="pa-settings" name="pa-settings">
115
  <div class="pa-header-wrapper">
116
  <div class="pa-title-left">
117
+ <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
118
+ <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
119
  </div>
120
+ <?php if( ! Helper_Functions::is_show_logo()) : ?>
121
  <div class="pa-title-right">
122
+ <img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
 
123
  </div>
124
+ <?php endif; ?>
125
  </div>
126
  <div class="pa-settings-tabs">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  <div id="pa-modules" class="pa-settings-tab">
128
  <div>
129
  <br>
133
  <table class="pa-elements-table">
134
  <tbody>
135
  <tr>
136
+ <th><?php echo sprintf("%s Banner",$prefix); ?></th>
137
  <td>
138
  <label class="switch">
139
  <input type="checkbox" id="premium-banner" name="premium-banner" <?php checked(1, $this->pa_get_settings['premium-banner'], true) ?>>
140
  <span class="slider round"></span>
141
  </label>
142
  </td>
143
+ <th><?php echo sprintf("%s Blog",$prefix); ?></th>
144
  <td>
145
  <label class="switch">
146
  <input type="checkbox" id="premium-blog" name="premium-blog" <?php checked(1, $this->pa_get_settings['premium-blog'], true) ?>>
151
 
152
 
153
  <tr>
154
+ <th><?php echo sprintf("%s Carousel",$prefix); ?></th>
155
  <td>
156
  <label class="switch">
157
  <input type="checkbox" id="premium-carousel" name="premium-carousel" <?php checked(1, $this->pa_get_settings['premium-carousel'], true) ?>>
158
  <span class="slider round"></span>
159
  </label>
160
  </td>
161
+ <th><?php echo sprintf("%s Countdown",$prefix); ?></th>
162
  <td>
163
  <label class="switch">
164
  <input type="checkbox" id="premium-countdown" name="premium-countdown" <?php checked(1, $this->pa_get_settings['premium-countdown'], true) ?>>
168
  </tr>
169
 
170
  <tr>
171
+ <th><?php echo sprintf("%s Counter",$prefix); ?></th>
172
  <td>
173
  <label class="switch">
174
  <input type="checkbox" id="premium-counter" name="premium-counter" <?php checked(1, $this->pa_get_settings['premium-counter'], true) ?>>
175
  <span class="slider round"></span>
176
  </label>
177
  </td>
178
+ <th><?php echo sprintf("%s Dual Heading",$prefix); ?></th>
179
  <td>
180
  <label class="switch">
181
  <input type="checkbox" id="premium-dual-header" name="premium-dual-header" <?php checked(1, $this->pa_get_settings['premium-dual-header'], true) ?>>
184
  </td>
185
  </tr>
186
 
 
187
  <tr>
188
+ <th><?php echo sprintf("%s Fancy Text",$prefix); ?></th>
189
  <td>
190
  <label class="switch">
191
  <input type="checkbox" id="premium-fancytext" name="premium-fancytext" <?php checked(1, $this->pa_get_settings['premium-fancytext'], true) ?>>
201
  </td>
202
  </tr>
203
 
 
204
  <tr>
205
 
206
+ <th><?php echo sprintf("%s Maps",$prefix); ?></th>
207
  <td>
208
  <label class="switch">
209
  <input type="checkbox" id="premium-maps" name="premium-maps" <?php checked(1, $this->pa_get_settings['premium-maps'], true) ?>>
210
  <span class="slider round"></span>
211
  </label>
212
  </td>
213
+ <th><?php echo sprintf("%s Modal Box",$prefix); ?></th>
214
  <td>
215
  <label class="switch">
216
  <input type="checkbox" id="premium-modalbox" name="premium-modalbox" <?php checked(1, $this->pa_get_settings['premium-modalbox'], true) ?>>
220
  </tr>
221
 
222
  <tr>
223
+ <th><?php echo sprintf("%s Person",$prefix); ?></th>
224
  <td>
225
  <label class="switch">
226
  <input type="checkbox" id="premium-person" name="premium-person" <?php checked(1, $this->pa_get_settings['premium-person'], true) ?>>
227
  <span class="slider round"></span>
228
  </label>
229
  </td>
230
+ <th><?php echo sprintf("%s Progress Bar",$prefix); ?></th>
231
  <td>
232
  <label class="switch">
233
  <input type="checkbox" id="premium-progressbar" name="premium-progressbar" <?php checked(1, $this->pa_get_settings['premium-progressbar'], true) ?>>
238
  </tr>
239
 
240
  <tr>
241
+ <th><?php echo sprintf("%s Testimonials",$prefix); ?></th>
242
  <td>
243
  <label class="switch">
244
  <input type="checkbox" id="premium-testimonials" name="premium-testimonials" <?php checked(1, $this->pa_get_settings['premium-testimonials'], true) ?>>
245
  <span class="slider round"></span>
246
  </label>
247
  </td>
248
+ <th><?php echo sprintf("%s Title",$prefix); ?></th>
249
  <td>
250
  <label class="switch">
251
  <input type="checkbox" id="premium-title" name="premium-title" <?php checked(1, $this->pa_get_settings['premium-title'], true) ?>>
255
  </tr>
256
 
257
  <tr>
258
+ <th><?php echo sprintf("%s Video Box",$prefix); ?></th>
259
  <td>
260
  <label class="switch">
261
  <input type="checkbox" id="premium-videobox" name="premium-videobox" <?php checked(1, $this->pa_get_settings['premium-videobox'], true) ?>>
262
  <span class="slider round"></span>
263
  </label>
264
  </td>
265
+ <th><?php echo sprintf("%s Pricing Table",$prefix); ?></th>
266
  <td>
267
  <label class="switch">
268
  <input type="checkbox" id="premium-pricing-table" name="premium-pricing-table" <?php checked(1, $this->pa_get_settings['premium-pricing-table'], true) ?>>
272
  </tr>
273
 
274
  <tr>
275
+ <th><?php echo sprintf("%s Button",$prefix); ?></th>
276
  <td>
277
  <label class="switch">
278
  <input type="checkbox" id="premium-button" name="premium-button" <?php checked(1, $this->pa_get_settings['premium-button'], true) ?>>
279
  <span class="slider round"></span>
280
  </label>
281
  </td>
282
+ <th><?php echo sprintf("%s Contact Form7",$prefix); ?></th>
283
  <td>
284
  <label class="switch">
285
  <input type="checkbox" id="premium-contactform" name="premium-contactform" <?php checked(1, $this->pa_get_settings['premium-contactform'], true) ?>>
289
  </tr>
290
 
291
  <tr>
292
+ <th><?php echo sprintf("%s Image Button",$prefix); ?></th>
293
  <td>
294
  <label class="switch">
295
  <input type="checkbox" id="premium-image-button" name="premium-image-button" <?php checked(1, $this->pa_get_settings['premium-image-button'], true) ?>>
297
  </label>
298
  </td>
299
 
300
+ <th><?php echo sprintf("%s Grid",$prefix); ?></th>
301
  <td>
302
  <label class="switch">
303
  <input type="checkbox" id="premium-grid" name="premium-grid" <?php checked(1, $this->pa_get_settings['premium-grid'], true) ?>>
305
  </label>
306
  </td>
307
  </tr>
308
+
309
+ <?php if( !defined('PREMIUM_PRO_ADDONS_VERSION') ) : ?>
310
+ <tr class="pa-sec-elems-tr"><th><h1>PRO Elements</h1></th></tr>
311
+
 
 
 
 
312
  <tr>
313
+
314
+ <th><?php echo esc_html__('Premium Alert Box', 'premium-addons-for-elementor'); ?></th>
315
+ <td>
316
+ <label class="switch">
317
+ <input type="checkbox" id="premium-notbar" name="premium-notbar">
318
+ <span class="pro-slider round"></span>
319
+ </label>
320
+ </td>
321
+
322
+ <th><?php echo esc_html__('Premium Icon Box', 'premium-addons-for-elementor'); ?></th>
323
+ <td>
324
+ <label class="switch">
325
+ <input type="checkbox" id="premium-iconbox" name="premium-iconbox">
326
+ <span class="pro-slider round"></span>
327
+ </label>
328
+ </td>
329
+
330
  </tr>
331
+
332
  <tr>
333
+
334
+
335
+ <th><?php echo esc_html__('Premium Twitter Feed', 'premium-addons-for-elementor'); ?></th>
336
+ <td>
337
+ <label class="switch">
338
+ <input type="checkbox" id="premium-twitter-feed" name="premium-twitter-feed">
339
+ <span class="pro-slider round"></span>
340
+ </label>
341
+ </td>
342
+
343
+ <th><?php echo esc_html__('Premium Instagram Feed', 'premium-addons-for-elementor'); ?></th>
344
+ <td>
345
+ <label class="switch">
346
+ <input type="checkbox" id="premium-instagram-feed" name="premium-instagram-feed">
347
+ <span class="pro-slider round"></span>
348
+ </label>
349
+ </td>
350
+
351
  </tr>
352
+
353
  <tr>
354
+ <th><?php echo esc_html__('Premium Flip Box', 'premium-addons-for-elementor'); ?></th>
355
+ <td>
356
+ <label class="switch">
357
+ <input type="checkbox" id="premium-flipbox" name="premium-flipbox">
358
+ <span class="pro-slider round"></span>
359
+ </label>
360
+ </td>
361
+
362
+ <th><?php echo esc_html__('Premium Unfold', 'premium-addons-for-elementor'); ?></th>
363
+ <td>
364
+ <label class="switch">
365
+ <input type="checkbox" id="premium-unfold" name="premium-unfold">
366
+ <span class="pro-slider round"></span>
367
+ </label>
368
+ </td>
369
  </tr>
370
+
 
 
 
 
 
 
371
  <tr>
372
+
373
+ <th><?php echo esc_html__('Premium Messenger Chat', 'premium-addons-for-elementor'); ?></th>
374
+ <td>
375
+ <label class="switch">
376
+ <input type="checkbox" id="premium-fb-chat" name="premium-fb-chat">
377
+ <span class="pro-slider round"></span>
378
+ </label>
379
+ </td>
380
+
381
+ <th><?php echo esc_html__('Premium Tabs', 'premium-addons-for-elementor'); ?></th>
382
+ <td>
383
+ <label class="switch">
384
+ <input type="checkbox" id="premium-tabs" name="premium-tabs">
385
+ <span class="pro-slider round"></span>
386
+ </label>
387
+ </td>
388
  </tr>
389
 
390
+ <tr>
391
+ <th><?php echo esc_html__('Premium Chart', 'premium-addons-for-elementor'); ?></th>
392
+ <td>
393
+ <label class="switch">
394
+ <input type="checkbox" id="premium-charts" name="premium-charts">
395
+ <span class="pro-slider round"></span>
396
+ </label>
397
+ </td>
398
+
399
+ <th><?php echo esc_html__('Premium Preview Window', 'premium-addons-for-elementor'); ?></th>
400
+ <td>
401
+ <label class="switch">
402
+ <input type="checkbox" id="premium-prev-img" name="premium-prev-img">
403
+ <span class="pro-slider round"></span>
404
+ </label>
405
+ </td>
406
  </tr>
407
+
408
  <tr>
409
+ <th><?php echo esc_html__('Premium Image Hotspots', 'premium-addons-for-elementor'); ?></th>
410
+ <td>
411
+ <label class="switch">
412
+ <input type="checkbox" id="premium-image-hotspots" name="premium-image-hotspots">
413
+ <span class="pro-slider round"></span>
414
+ </label>
415
+ </td>
416
+
417
+ <th><?php echo esc_html__('Premium Facebook Reviews', 'premium-addons-for-elementor'); ?></th>
418
+ <td>
419
+ <label class="switch">
420
+ <input type="checkbox" id="premium-facebook-reviews" name="premium-facebook-reviews">
421
+ <span class="pro-slider round"></span>
422
+ </label>
423
+ </td>
424
  </tr>
425
+
426
+ <tr>
427
+ <th><?php echo esc_html__('Premium Image Comparison', 'premium-addons-for-elementor'); ?></th>
428
+ <td>
429
+ <label class="switch">
430
+ <input type="checkbox" id="premium-image-comparison" name="premium-image-comparison">
431
+ <span class="pro-slider round"></span>
432
+ </label>
433
+ </td>
434
+
435
+ <th><?php echo esc_html__('Premium Divider', 'premium-addons-for-elementor'); ?></th>
436
+ <td>
437
+ <label class="switch">
438
+ <input type="checkbox" id="premium-divider" name="premium-divider">
439
+ <span class="pro-slider round"></span>
440
+ </label>
441
+ </td>
442
+
443
+ <!-- <th><?php echo esc_html__('Premium Facebook Feed', 'premium-addons-for-elementor'); ?></th>
444
+ <td>
445
+ <label class="switch">
446
+ <input type="checkbox" id="premium-facebook-feed" name="premium-facebook-feed">
447
+ <span class="pro-slider round"></span>
448
+ </label>
449
+ </td>-->
450
  </tr>
451
 
452
+ <tr>
453
+ <th><?php echo esc_html__('Premium Magic Section', 'premium-addons-for-elementor'); ?></th>
454
+ <td>
455
+ <label class="switch">
456
+ <input type="checkbox" id="premium-magic-section" name="premium-magic-section">
457
+ <span class="pro-slider round"></span>
458
+ </label>
459
+ </td>
460
+
461
+ <th><?php echo esc_html__('Premium Google Reviews', 'premium-addons-for-elementor'); ?></th>
462
+ <td>
463
+ <label class="switch">
464
+ <input type="checkbox" id="premium-google-reviews" name="premium-google-reviews">
465
+ <span class="pro-slider round"></span>
466
+ </label>
467
+ </td>
468
+ </tr>
469
+
470
+ <tr>
471
+ <th><?php echo esc_html__('Premium Behance Feed', 'premium-addons-for-elementor'); ?></th>
472
+ <td>
473
+ <label class="switch">
474
+ <input type="checkbox" id="premium-behance" name="premium-behance">
475
+ <span class="pro-slider round"></span>
476
+ </label>
477
+ </td>
478
+
479
+ <th><?php echo esc_html__('Premium Tables', 'premium-addons-for-elementor'); ?></th>
480
+ <td>
481
+ <label class="switch">
482
+ <input type="checkbox" id="premium-tables" name="premium-tables">
483
+ <span class="pro-slider round"></span>
484
+ </label>
485
+ </td>
486
+
487
+ </tr>
488
+
489
+ <tr>
490
+ <th><?php echo esc_html__('Premium Image Layers', 'premium-addons-for-elementor'); ?></th>
491
+ <td>
492
+ <label class="switch">
493
+ <input type="checkbox" id="premium-img-layers" name="premium-img-layers">
494
+ <span class="pro-slider round"></span>
495
+ </label>
496
+ </td>
497
+
498
+ <th><?php echo esc_html__('Premium iHover', 'premium-addons-for-elementor'); ?></th>
499
+ <td>
500
+ <label class="switch">
501
+ <input type="checkbox" id="premium-ihover" name="premium-ihover">
502
+ <span class="pro-slider round"></span>
503
+ </label>
504
+ </td>
505
+
506
+ </tr>
507
+
508
+ <tr>
509
+ <th><?php echo esc_html__('Premium Content Switcher', 'premium-addons-for-elementor'); ?></th>
510
+ <td>
511
+ <label class="switch">
512
+ <input type="checkbox" id="premium-content-toggle" name="premium-content-toggle">
513
+ <span class="pro-slider round"></span>
514
+ </label>
515
+ </td>
516
+
517
+ </tr>
518
+
519
+ <tr>
520
+ <th><?php echo esc_html__('Premium Section Parallax', 'premium-addons-for-elementor'); ?></th>
521
+ <td>
522
+ <label class="switch">
523
+ <input type="checkbox" id="premium-section-parallax" name="premium-section-parallax">
524
+ <span class="pro-slider round"></span>
525
+ </label>
526
+ </td>
527
+ <th><?php echo esc_html__('Premium Section Particles', 'premium-addons-for-elementor'); ?></th>
528
+ <td>
529
+ <label class="switch">
530
+ <input type="checkbox" id="premium-section-particles" name="premium-section-particles">
531
+ <span class="pro-slider round"></span>
532
+ </label>
533
+ </td>
534
+ </tr>
535
+
536
+ <tr>
537
+ <th><?php echo esc_html__('Premium Section Animated Gradient', 'premium-addons-for-elementor'); ?></th>
538
+ <td>
539
+ <label class="switch">
540
+ <input type="checkbox" id="premium-section-gradient" name="premium-section-gradient">
541
+ <span class="pro-slider round"></span>
542
+ </label>
543
+ </td>
544
+ <th><?php echo esc_html__('Premium Section Ken Burns', 'premium-addons-for-elementor'); ?></th>
545
+ <td>
546
+ <label class="switch">
547
+ <input type="checkbox" id="premium-section-kenburns" name="premium-section-kenburns">
548
+ <span class="pro-slider round"></span>
549
+ </label>
550
+ </td>
551
+ </tr>
552
+
553
+ <?php endif; ?>
554
+ </tbody>
555
+ </table>
556
+ <input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
557
+
558
  </div>
559
+ <?php if( ! Helper_Functions::is_show_rate()) : ?>
560
  <div>
561
+ <p>Did you like Premium Addons for Elementor Plugin? Please <a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank">Click Here to Rate it ★★★★★</a></p>
562
  </div>
563
+ <?php endif; ?>
564
  </div>
565
  </form>
566
  </div>
568
  }
569
 
570
  public function pa_save_settings_with_ajax() {
571
+
572
  if( isset( $_POST['fields'] ) ) {
573
  parse_str( $_POST['fields'], $settings );
574
  }else {
596
  'premium-contactform' => intval( $settings['premium-contactform'] ? 1 : 0),
597
  'premium-image-button' => intval( $settings['premium-image-button'] ? 1 : 0),
598
  'premium-grid' => intval( $settings['premium-grid'] ? 1 : 0),
 
 
 
599
  );
600
+
601
  update_option( 'pa_save_settings', $this->pa_settings );
602
 
603
  return true;
604
  die();
 
 
605
  }
606
+ }
 
 
 
admin/settings/gomaps.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PremiumAddons;
4
+
5
+ if(!defined('ABSPATH')) exit;
6
+
7
+ class PA_Gomaps {
8
+
9
+ public $pa_maps_keys = [ 'premium-map-api', 'premium-map-disable-api' ];
10
+
11
+ private $pa_maps_default_settings;
12
+
13
+ private $pa_maps_settings;
14
+
15
+ private $pa_maps_get_settings;
16
+
17
+ public function __construct()
18
+ {
19
+ add_action( 'admin_menu', array ($this,'create_gomaps_menu' ), 100 );
20
+ add_action( 'wp_ajax_pa_maps_save_settings', array( $this, 'pa_save_maps_settings_with_ajax' ) );
21
+ }
22
+
23
+ public function create_gomaps_menu(){
24
+ add_submenu_page(
25
+ 'premium-addons',
26
+ '',
27
+ 'Google Maps API',
28
+ 'manage_options',
29
+ 'premium-addons-maps',
30
+ [$this, 'pa_maps_page']
31
+ );
32
+ }
33
+
34
+ public function pa_maps_page(){
35
+ $js_info = array(
36
+ 'ajaxurl' => admin_url( 'admin-ajax.php' )
37
+ );
38
+
39
+ wp_localize_script( 'premium-addons-admin-js', 'settings', $js_info );
40
+
41
+ $this->pa_maps_default_settings = array_fill_keys( $this->pa_maps_keys, true );
42
+
43
+ $this->pa_maps_get_settings = get_option( 'pa_maps_save_settings', $this->pa_maps_default_settings );
44
+
45
+ $pa_maps_new_settings = array_diff_key( $this->pa_maps_default_settings, $this->pa_maps_get_settings );
46
+
47
+ if( ! empty( $pa_maps_new_settings ) ) {
48
+ $pa_maps_updated_settings = array_merge( $this->pa_maps_get_settings, $pa_maps_new_settings );
49
+ update_option( 'pa_maps_save_settings', $pa_maps_updated_settings );
50
+ }
51
+ $this->pa_maps_get_settings = get_option( 'pa_maps_save_settings', $this->pa_maps_default_settings );
52
+
53
+
54
+ ?>
55
+ <div class="wrap">
56
+ <div class="response-wrap"></div>
57
+ <form action="" method="POST" id="pa-maps" name="pa-maps">
58
+ <div class="pa-header-wrapper">
59
+ <div class="pa-title-left">
60
+ <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
61
+ <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
62
+ </div>
63
+ <?php if( ! Helper_Functions::is_show_logo()) : ?>
64
+ <div class="pa-title-right">
65
+ <img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
66
+ </div>
67
+ <?php endif; ?>
68
+ </div>
69
+ <div class="pa-settings-tabs">
70
+ <div id="pa-maps-api" class="pa-maps-tab">
71
+ <div class="pa-row">
72
+ <table class="pa-maps-table">
73
+ <tr>
74
+ <p class="pa-maps-api-notice">
75
+ <?php echo esc_html( Helper_Functions::get_prefix() ); ?> Maps Element requires Google API key to be entered below. If you don’t have one, Click <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank"> Here</a> to get your key.
76
+ </p>
77
+ </tr>
78
+ <tr>
79
+ <th>
80
+ <h4 class="pa-api-title"><label>Google Maps API Key:</label><input name="premium-map-api" id="premium-map-api" type="text" placeholder="API Key" value="<?php echo $this->pa_maps_get_settings['premium-map-api']; ?>"></h4>
81
+ </th>
82
+ </tr>
83
+ <tr>
84
+ <th>
85
+ <h4 class="pa-api-disable-title"><label><?php echo esc_html__('Enable Maps API JS File:','premium-addons-for-elementor'); ?></label><input name="premium-map-disable-api" id="premium-map-disable-api" type="checkbox" <?php checked(1, $this->pa_maps_get_settings['premium-map-disable-api'], true) ?>><span>This will Enable the API JS file if it's not included by another theme or plugin</span></h4>
86
+ </th>
87
+ </tr>
88
+ </table>
89
+ <input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
90
+ <?php if( ! Helper_Functions::is_show_rate()) : ?>
91
+ <div>
92
+ <p>Did you like Premium Addons for Elementor Plugin? Please <a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank">Click Here to Rate it ★★★★★</a></p>
93
+ </div>
94
+ <?php endif; ?>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </form>
99
+ </div>
100
+ <?php }
101
+
102
+ public function pa_save_maps_settings_with_ajax() {
103
+
104
+ if( isset( $_POST['fields'] ) ) {
105
+ parse_str( $_POST['fields'], $settings );
106
+ }else {
107
+ return;
108
+ }
109
+
110
+ $this->pa_maps_settings = array(
111
+ 'premium-map-api' => $settings['premium-map-api'],
112
+ 'premium-map-disable-api' => intval( $settings['premium-map-disable-api'] ? 1 : 0),
113
+ );
114
+
115
+ update_option( 'pa_maps_save_settings', $this->pa_maps_settings );
116
+
117
+ return true;
118
+ die();
119
+ }
120
+ }
admin/settings/gopro.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace PremiumAddons;
3
+
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ class Pro_Settings {
7
+
8
+ public function create_pro_menus(){
9
+
10
+ add_submenu_page(
11
+ 'premium-addons',
12
+ '',
13
+ '<span class="dashicons dashicons-star-filled" style="font-size: 17px"></span> ' . __( 'Get PRO Widgets & Addons', 'premium-addons-for-elementor' ),
14
+ 'manage_options',
15
+ 'premium-addons-pro',
16
+ [ $this, 'handle_custom_redirects' ]
17
+ );
18
+
19
+ }
20
+
21
+
22
+ public function handle_custom_redirects() {
23
+
24
+ $active_theme = $this->get_installed_theme();
25
+
26
+ if ( empty( $_GET['page'] ) ) {
27
+ return;
28
+ }
29
+
30
+ if ( 'premium-addons-pro' === $_GET['page'] ) {
31
+
32
+ $url = sprintf('https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $active_theme );
33
+
34
+ wp_redirect( $url );
35
+
36
+ die();
37
+ }
38
+ }
39
+
40
+
41
+ public function change_admin_menu_name(){
42
+ global $submenu;
43
+ if(isset($submenu['premium-addons'])){
44
+ $submenu['premium-addons'][0][0] = __( 'Widgets Settings', 'premium-addons-for-elementor' );
45
+ }
46
+ }
47
+
48
+ public function on_admin_init() {
49
+
50
+ $this->handle_custom_redirects();
51
+
52
+ }
53
+
54
+ public function get_installed_theme() {
55
+
56
+ $theme = wp_get_theme();
57
+
58
+ if( $theme->parent() ) {
59
+ $theme_name = $theme->parent()->get('Name');
60
+ } else {
61
+ $theme_name = $theme->get('Name');
62
+ }
63
+
64
+ $theme_name = sanitize_key( $theme_name );
65
+
66
+ return $theme_name;
67
+
68
+ }
69
+
70
+ public function __construct() {
71
+
72
+ add_action( 'admin_init', [ $this, 'on_admin_init' ] );
73
+
74
+ add_action( 'admin_menu', array ($this,'create_pro_menus' ), 100 );
75
+
76
+ add_action( 'admin_menu', array ($this, 'change_admin_menu_name'), 100);
77
+
78
+ }
79
+ }
admin/settings/sys-info.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PremiumAddons;
4
+
5
+ if(!defined('ABSPATH')) exit;
6
+
7
+ class PA_System_Info {
8
+ public function __construct()
9
+ {
10
+ add_action( 'admin_menu', array ($this,'create_sys_info_menu' ), 100 );
11
+ }
12
+
13
+ public function create_sys_info_menu(){
14
+ add_submenu_page(
15
+ 'premium-addons',
16
+ '',
17
+ esc_html__('System Info','prmeium-addons-for-elemtnor'),
18
+ 'manage_options',
19
+ 'premium-addons-sys',
20
+ [$this, 'pa_sys_info_page']
21
+ );
22
+ }
23
+
24
+ public function pa_sys_info_page(){
25
+ ?>
26
+ <div class="wrap">
27
+ <div class="response-wrap"></div>
28
+ <div class="pa-header-wrapper">
29
+ <div class="pa-title-left">
30
+ <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
31
+ <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
32
+ </div>
33
+ <?php if( ! Helper_Functions::is_show_logo()) : ?>
34
+ <div class="pa-title-right">
35
+ <img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
36
+ </div>
37
+ <?php endif; ?>
38
+ </div>
39
+ <div class="pa-settings-tabs pa-sys-info-tab">
40
+ <div id="pa-system" class="pa-settings-tab">
41
+ <div class="pa-row">
42
+ <h3 class="pa-sys-info-title"><?php echo esc_html__('System setup information useful for debugging purposes.','premium-addons-for-elementor');?></h3>
43
+ <div class="pa-system-info-container">
44
+ <?php
45
+ echo nl2br(pa_get_sysinfo());
46
+ ?>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <?php if( ! Helper_Functions::is_show_rate()) : ?>
51
+ <div>
52
+ <p>Did you like Premium Addons for Elementor Plugin? Please <a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank">Click Here to Rate it ★★★★★</a></p>
53
+ </div>
54
+ <?php endif; ?>
55
+ </div>
56
+ </div>
57
+ <?php }
58
+ }
59
+
admin/settings/version-control.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PremiumAddons;
4
+
5
+ if(!defined('ABSPATH')) exit;
6
+
7
+ class PA_Version_Control {
8
+
9
+ public $pa_beta_keys = [ 'is-beta-tester' ];
10
+
11
+ private $pa_beta_default_settings;
12
+
13
+ private $pa_beta_settings;
14
+
15
+ private $pa_beta_get_settings;
16
+
17
+ public function __construct()
18
+ {
19
+ add_action( 'admin_menu', array ($this,'create_version_control_menu' ), 100 );
20
+ add_action( 'wp_ajax_pa_beta_save_settings', array( $this, 'pa_beta_save_settings_with_ajax' ) );
21
+ }
22
+
23
+
24
+ public function create_version_control_menu(){
25
+ if ( ! Helper_Functions::is_show_version_control()){
26
+ add_submenu_page(
27
+ 'premium-addons',
28
+ '',
29
+ esc_html__('Version Control','prmeium-addons-for-elemtnor'),
30
+ 'manage_options',
31
+ 'premium-addons-version',
32
+ [$this, 'pa_version_page']
33
+ );
34
+ }
35
+ }
36
+
37
+ public function pa_version_page(){
38
+ $js_info = array(
39
+ 'ajaxurl' => admin_url( 'admin-ajax.php' )
40
+ );
41
+
42
+ wp_localize_script( 'premium-addons-admin-js', 'settings', $js_info );
43
+
44
+ $this->pa_beta_default_settings = array_fill_keys( $this->pa_beta_keys, true );
45
+
46
+ $this->pa_beta_get_settings = get_option( 'pa_beta_save_settings', $this->pa_beta_default_settings );
47
+ $pa_beta_new_settings = array_diff_key( $this->pa_beta_default_settings, $this->pa_beta_get_settings );
48
+ if( ! empty( $pa_beta_new_settings ) ) {
49
+ $pa_beta_updated_settings = array_merge( $this->pa_beta_get_settings, $pa_beta_new_settings );
50
+ update_option( 'pa_beta_save_settings', $pa_beta_updated_settings );
51
+ }
52
+ $this->pa_beta_get_settings = get_option( 'pa_beta_save_settings', $this->pa_beta_default_settings );
53
+
54
+ ?>
55
+
56
+ <div class="wrap">
57
+ <div class="response-wrap"></div>
58
+ <form action="" method="POST" id="pa-beta-form" name="pa-beta-form">
59
+ <div class="pa-header-wrapper">
60
+ <div class="pa-title-left">
61
+ <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
62
+ <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
63
+ </div>
64
+ <?php if( ! Helper_Functions::is_show_logo()) : ?>
65
+ <div class="pa-title-right">
66
+ <img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
67
+ </div>
68
+ <?php endif; ?>
69
+ </div>
70
+ <div class="pa-settings-tabs">
71
+ <div id="pa-maintenance" class="pa-settings-tab">
72
+ <div class="pa-row">
73
+ <table class="pa-beta-table">
74
+ <tr>
75
+ <th>
76
+ <h4 class="pa-roll-back">Rollback to Previous Version</h4>
77
+ <span class="pa-roll-back-span"><?php echo sprintf('Experiencing an issue with Premium Addons for Elementor version %s? Rollback to a previous version before the issue appeared.',PREMIUM_ADDONS_VERSION); ?></span>
78
+ </th>
79
+ </tr>
80
+ <tr class="pa-roll-row">
81
+ <th>Rollback Version</th>
82
+ <td>
83
+ <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.4.1</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
84
+ <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <th>
89
+ <h4 class="pa-beta-test">Become a Beta Tester</h4>
90
+ <span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span>
91
+ </th>
92
+ </tr>
93
+ <tr class="pa-beta-row">
94
+ <th><?php echo esc_html__('Beta Tester','premium-addons-for-elementor');?></th>
95
+ <td>
96
+ <div><input name="is-beta-tester" id="is-beta-tester" type="checkbox" <?php checked(1, $this->pa_beta_get_settings['is-beta-tester'], true) ?>><span><?php echo esc_html__('Check this box to get updates for beta versions','premium-addons-for-elementor'); ?></span></div>
97
+ <p class="pa-beta-desc"><span>Please Note: We do not recommend updating to a beta version on production sites.</span></p>
98
+ </td>
99
+ </tr>
100
+ </table>
101
+ <input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </form>
106
+ </div>
107
+
108
+ <?php }
109
+ public function pa_beta_save_settings_with_ajax() {
110
+
111
+ if( isset( $_POST['fields'] ) ) {
112
+ parse_str( $_POST['fields'], $settings );
113
+ }else {
114
+ return;
115
+ }
116
+
117
+ $this->pa_beta_settings = array(
118
+ 'is-beta-tester' => intval( $settings['is-beta-tester'] ? 1 : 0 ),
119
+ );
120
+
121
+ update_option( 'pa_beta_save_settings', $this->pa_beta_settings );
122
+
123
+ return true;
124
+ die();
125
+ }
126
+ }
assets/css/premium-addons.css CHANGED
@@ -842,9 +842,9 @@ ul.slick-dots li {
842
  border: 1px solid;
843
  border-radius: 50%;
844
  top: 3px;
845
- right: 4px;
846
- bottom: 6.8px;
847
- left: 4.5px;
848
  -webkit-animation-duration: 1s;
849
  animation-duration: 1s;
850
  animation-iteration-count: infinite;
@@ -1481,9 +1481,6 @@ button.premium-modal-box-modal-close {
1481
  .premium-blog-thumbnail-container {
1482
  overflow: hidden;
1483
  }
1484
- .premium-blog-content-wrapper .premium-blog-inner-container {
1485
- display: flex;
1486
- }
1487
  .premium-blog-post-link {
1488
  position: absolute;
1489
  top: 0;
@@ -1536,12 +1533,10 @@ button.premium-modal-box-modal-close {
1536
  transform: scale(1.3) rotate(5deg);
1537
  }
1538
  .premium-blog-thumb-effect-wrapper:hover .premium-blog-gray-effect img {
1539
- -webkit-filter: grayscale(100%);
1540
  filter: grayscale(100%);
1541
  }
1542
  .premium-blog-thumb-effect-wrapper:hover .premium-blog-blur-effect img {
1543
- -webkit-filter: blur(3px);
1544
- filter: blur(3px);
1545
  }
1546
  .premium-blog-thumb-effect-wrapper:hover .premium-blog-sepia-effect img {
1547
  -webkit-filter: sepia(0%);
@@ -1746,6 +1741,9 @@ button.premium-modal-box-modal-close {
1746
  .premium-blog-clear-fix {
1747
  clear: both;
1748
  }
 
 
 
1749
  /*Post Format Container*/
1750
  .premium-blog-format-container {
1751
  display: flex;
@@ -1816,8 +1814,8 @@ button.premium-modal-box-modal-close {
1816
  }
1817
  .premium-blog-entry-title a,
1818
  .premium-blog-meta-data a,
1819
- .premium-blog-post-tags a,
1820
- .premium-blog-post-content .premium-blog-excerpt-link {
1821
  -webkit-transition: color 0.3s ease-in-out;
1822
  -moz-transition: color 0.3s ease-in-out;
1823
  -ms-transition: color 0.3s ease-in-out;
@@ -1878,7 +1876,7 @@ button.premium-modal-box-modal-close {
1878
  .premium-blog-wrap.col-4 .premium-blog-entry-title a{
1879
  font-size: 20px;
1880
  }
1881
- @media (max-width: 768px) {
1882
  .premium-blog-content-wrapper {
1883
  top: 0;
1884
  margin: 0;
@@ -2065,10 +2063,13 @@ button.premium-modal-box-modal-close {
2065
  transform: translate(0,0);
2066
  }
2067
  @media (max-width: 500px) {
2068
- .premium-dual-header-container .premium-dual-header-first-header,
2069
- .premium-dual-header-container .premium-dual-header-second-header {
2070
- display: block;
2071
- word-wrap: break-word;
 
 
 
2072
  }
2073
  }
2074
  .premium-dual-header-first-container {
@@ -3117,4 +3118,4 @@ button.premium-modal-box-modal-close {
3117
  }
3118
  .premium-gallery-container .pa-gallery-item {
3119
  padding: 10px;
3120
- }
842
  border: 1px solid;
843
  border-radius: 50%;
844
  top: 3px;
845
+ right: 4px;
846
+ bottom: 6.8px;
847
+ left: 4.5px;
848
  -webkit-animation-duration: 1s;
849
  animation-duration: 1s;
850
  animation-iteration-count: infinite;
1481
  .premium-blog-thumbnail-container {
1482
  overflow: hidden;
1483
  }
 
 
 
1484
  .premium-blog-post-link {
1485
  position: absolute;
1486
  top: 0;
1533
  transform: scale(1.3) rotate(5deg);
1534
  }
1535
  .premium-blog-thumb-effect-wrapper:hover .premium-blog-gray-effect img {
 
1536
  filter: grayscale(100%);
1537
  }
1538
  .premium-blog-thumb-effect-wrapper:hover .premium-blog-blur-effect img {
1539
+ filter: blur(3px);
 
1540
  }
1541
  .premium-blog-thumb-effect-wrapper:hover .premium-blog-sepia-effect img {
1542
  -webkit-filter: sepia(0%);
1741
  .premium-blog-clear-fix {
1742
  clear: both;
1743
  }
1744
+ .premium-blog-content-wrapper .premium-blog-inner-container {
1745
+ display: flex;
1746
+ }
1747
  /*Post Format Container*/
1748
  .premium-blog-format-container {
1749
  display: flex;
1814
  }
1815
  .premium-blog-entry-title a,
1816
  .premium-blog-meta-data a,
1817
+ .premium-blog-post-tags a,
1818
+ .premium-blog-post-content .premium-blog-excerpt-link{
1819
  -webkit-transition: color 0.3s ease-in-out;
1820
  -moz-transition: color 0.3s ease-in-out;
1821
  -ms-transition: color 0.3s ease-in-out;
1876
  .premium-blog-wrap.col-4 .premium-blog-entry-title a{
1877
  font-size: 20px;
1878
  }
1879
+ @media ( max-width: 768px ) {
1880
  .premium-blog-content-wrapper {
1881
  top: 0;
1882
  margin: 0;
2063
  transform: translate(0,0);
2064
  }
2065
  @media (max-width: 500px) {
2066
+ .premium-dual-header-container {
2067
+ display: -ms-flexbox;
2068
+ display: -webkit-flex;
2069
+ display: -moz-flex;
2070
+ display: -ms-flex;
2071
+ display: flex;
2072
+ align-items: center;
2073
  }
2074
  }
2075
  .premium-dual-header-first-container {
3118
  }
3119
  .premium-gallery-container .pa-gallery-item {
3120
  padding: 10px;
3121
+ }
assets/js/lib/mixitup.min.js DELETED
@@ -1,18 +0,0 @@
1
- /**!
2
- * MixItUp v3.3.0
3
- * A high-performance, dependency-free library for animated filtering, sorting and more
4
- * Build 0be05511-2264-4384-8e31-c75554304cd0
5
- *
6
- * @copyright Copyright 2014-2018 KunkaLabs Limited.
7
- * @author KunkaLabs Limited.
8
- * @link https://www.kunkalabs.com/mixitup/
9
- *
10
- * @license Commercial use requires a commercial license.
11
- * https://www.kunkalabs.com/mixitup/licenses/
12
- *
13
- * Non-commercial use permitted under same terms as CC BY-NC 3.0 license.
14
- * http://creativecommons.org/licenses/by-nc/3.0/
15
- */
16
- !function(t){"use strict";var e=null,n=null;!function(){var e=["webkit","moz","o","ms"],n=t.document.createElement("div"),a=-1;for(a=0;a<e.length&&!t.requestAnimationFrame;a++)t.requestAnimationFrame=t[e[a]+"RequestAnimationFrame"];"undefined"==typeof n.nextElementSibling&&Object.defineProperty(t.Element.prototype,"nextElementSibling",{get:function(){for(var t=this.nextSibling;t;){if(1===t.nodeType)return t;t=t.nextSibling}return null}}),function(t){t.matches=t.matches||t.machesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector||function(t){return Array.prototype.indexOf.call(this.parentElement.querySelectorAll(t),this)>-1}}(t.Element.prototype),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!1,n=[],a=-1;return e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=n.length,function(i){var o=[],r="",s=-1;if("object"!=typeof i&&("function"!=typeof i||null===i))throw new TypeError("Object.keys called on non-object");for(r in i)t.call(i,r)&&o.push(r);if(e)for(s=0;s<a;s++)t.call(i,n[s])&&o.push(n[s]);return o}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),"function"!=typeof Object.create&&(Object.create=function(t){var e=function(){};return function(n,a){if(n!==Object(n)&&null!==n)throw TypeError("Argument must be an object, or null");e.prototype=n||{};var i=new e;return e.prototype=null,a!==t&&Object.defineProperties(i,a),null===n&&(i.__proto__=null),i}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e,n,a,i;if(null===this)throw new TypeError;if(a=Object(this),i=a.length>>>0,0===i)return-1;if(e=0,arguments.length>1&&(e=Number(arguments[1]),e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e)))),e>=i)return-1;for(n=e>=0?e:Math.max(i-Math.abs(e),0);n<i;n++)if(n in a&&a[n]===t)return n;return-1}),Function.prototype.bind||(Function.prototype.bind=function(t){var e,n,a,i;if("function"!=typeof this)throw new TypeError;return e=Array.prototype.slice.call(arguments,1),n=this,a=function(){},i=function(){return n.apply(this instanceof a?this:t,e.concat(Array.prototype.slice.call(arguments)))},this.prototype&&(a.prototype=this.prototype),i.prototype=new a,i}),t.Element.prototype.dispatchEvent||(t.Element.prototype.dispatchEvent=function(t){try{return this.fireEvent("on"+t.type,t)}catch(e){}})}(),e=function(a,i,o){var r=null,s=!1,l=null,c=null,u=null,f=null,h=[],d="",m=[],g=-1;if(u=o||t.document,(s=arguments[3])&&(s="boolean"==typeof s),"string"==typeof a)m=u.querySelectorAll(a);else if(a&&"object"==typeof a&&n.isElement(a,u))m=[a];else{if(!a||"object"!=typeof a||!a.length)throw new Error(e.messages.errorFactoryInvalidContainer());m=a}if(m.length<1)throw new Error(e.messages.errorFactoryContainerNotFound());for(g=0;(r=m[g])&&(!(g>0)||s);g++)r.id?d=r.id:(d="MixItUp"+n.randomHex(),r.id=d),e.instances[d]instanceof e.Mixer?(l=e.instances[d],(!i||i&&i.debug&&i.debug.showWarnings!==!1)&&console.warn(e.messages.warningFactoryPreexistingInstance())):(l=new e.Mixer,l.attach(r,u,d,i),e.instances[d]=l),c=new e.Facade(l),i&&i.debug&&i.debug.enable?h.push(l):h.push(c);return f=s?new e.Collection(h):h[0]},e.use=function(t){e.Base.prototype.callActions.call(e,"beforeUse",arguments),"function"==typeof t&&"mixitup-extension"===t.TYPE?"undefined"==typeof e.extensions[t.NAME]&&(t(e),e.extensions[t.NAME]=t):t.fn&&t.fn.jquery&&(e.libraries.$=t),e.Base.prototype.callActions.call(e,"afterUse",arguments)},e.instances={},e.extensions={},e.libraries={},n={hasClass:function(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},addClass:function(t,e){this.hasClass(t,e)||(t.className+=t.className?" "+e:e)},removeClass:function(t,e){if(this.hasClass(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}},extend:function(t,e,n,a){var i=[],o="",r=-1;n=n||!1,a=a||!1;try{if(Array.isArray(e))for(r=0;r<e.length;r++)i.push(r);else e&&(i=Object.keys(e));for(r=0;r<i.length;r++)o=i[r],!n||"object"!=typeof e[o]||this.isElement(e[o])?t[o]=e[o]:Array.isArray(e[o])?(t[o]||(t[o]=[]),this.extend(t[o],e[o],n,a)):(t[o]||(t[o]={}),this.extend(t[o],e[o],n,a))}catch(s){if(!a)throw s;this.handleExtendError(s,t)}return t},handleExtendError:function(t,n){var a=/property "?(\w*)"?[,:] object/i,i=null,o="",r="",s="",l="",c="",u=-1,f=-1;if(t instanceof TypeError&&(i=a.exec(t.message))){o=i[1];for(c in n){for(f=0;f<o.length&&o.charAt(f)===c.charAt(f);)f++;f>u&&(u=f,l=c)}throw u>1&&(s=e.messages.errorConfigInvalidPropertySuggestion({probableMatch:l})),r=e.messages.errorConfigInvalidProperty({erroneous:o,suggestion:s}),new TypeError(r)}throw t},template:function(t){for(var e=/\${([\w]*)}/g,n={},a=null;a=e.exec(t);)n[a[1]]=new RegExp("\\${"+a[1]+"}","g");return function(e){var a="",i=t;e=e||{};for(a in n)i=i.replace(n[a],"undefined"!=typeof e[a]?e[a]:"");return i}},on:function(e,n,a,i){e&&(e.addEventListener?e.addEventListener(n,a,i):e.attachEvent&&(e["e"+n+a]=a,e[n+a]=function(){e["e"+n+a](t.event)},e.attachEvent("on"+n,e[n+a])))},off:function(t,e,n){t&&(t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+n]),t[e+n]=null))},getCustomEvent:function(e,n,a){var i=null;return a=a||t.document,"function"==typeof t.CustomEvent?i=new t.CustomEvent(e,{detail:n,bubbles:!0,cancelable:!0}):"function"==typeof a.createEvent?(i=a.createEvent("CustomEvent"),i.initCustomEvent(e,!0,!0,n)):(i=a.createEventObject(),i.type=e,i.returnValue=!1,i.cancelBubble=!1,i.detail=n),i},getOriginalEvent:function(t){return t.touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t},index:function(t,e){for(var n=0;null!==(t=t.previousElementSibling);)e&&!t.matches(e)||++n;return n},camelCase:function(t){return t.toLowerCase().replace(/([_-][a-z])/g,function(t){return t.toUpperCase().replace(/[_-]/,"")})},pascalCase:function(t){return(t=this.camelCase(t)).charAt(0).toUpperCase()+t.slice(1)},dashCase:function(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()},isElement:function(e,n){return n=n||t.document,!!(t.HTMLElement&&e instanceof t.HTMLElement)||(!!(n.defaultView&&n.defaultView.HTMLElement&&e instanceof n.defaultView.HTMLElement)||null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)},createElement:function(e,n){var a=null,i=null;for(n=n||t.document,a=n.createDocumentFragment(),i=n.createElement("div"),i.innerHTML=e.trim();i.firstChild;)a.appendChild(i.firstChild);return a},removeWhitespace:function(t){for(var e;t&&"#text"===t.nodeName;)e=t,t=t.previousSibling,e.parentElement&&e.parentElement.removeChild(e)},isEqualArray:function(t,e){var n=t.length;if(n!==e.length)return!1;for(;n--;)if(t[n]!==e[n])return!1;return!0},deepEquals:function(t,e){var n;if("object"==typeof t&&t&&"object"==typeof e&&e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(!e.hasOwnProperty(n)||!this.deepEquals(t[n],e[n]))return!1}else if(t!==e)return!1;return!0},arrayShuffle:function(t){for(var e=t.slice(),n=e.length,a=n,i=-1,o=[];a--;)i=~~(Math.random()*n),o=e[a],e[a]=e[i],e[i]=o;return e},arrayFromList:function(t){var e,n;try{return Array.prototype.slice.call(t)}catch(a){for(e=[],n=0;n<t.length;n++)e.push(t[n]);return e}},debounce:function(t,e,n){var a;return function(){var i=this,o=arguments,r=n&&!a,s=null;s=function(){a=null,n||t.apply(i,o)},clearTimeout(a),a=setTimeout(s,e),r&&t.apply(i,o)}},position:function(t){for(var e=0,n=0,a=t;t;)e-=t.scrollLeft,n-=t.scrollTop,t===a&&(e+=t.offsetLeft,n+=t.offsetTop,a=t.offsetParent),t=t.parentElement;return{x:e,y:n}},getHypotenuse:function(t,e){var n=t.x-e.x,a=t.y-e.y;return n=n<0?n*-1:n,a=a<0?a*-1:a,Math.sqrt(Math.pow(n,2)+Math.pow(a,2))},getIntersectionRatio:function(t,e){var n=t.width*t.height,a=-1,i=-1,o=-1,r=-1;return a=Math.max(0,Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left)),i=Math.max(0,Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top)),o=i*a,r=o/n},closestParent:function(e,n,a,i){var o=e.parentNode;if(i=i||t.document,a&&e.matches(n))return e;for(;o&&o!=i.body;){if(o.matches&&o.matches(n))return o;if(!o.parentNode)return null;o=o.parentNode}return null},children:function(e,n,a){var i=[],o="";return a=a||t.doc,e&&(e.id||(o="Temp"+this.randomHexKey(),e.id=o),i=a.querySelectorAll("#"+e.id+" > "+n),o&&e.removeAttribute("id")),i},clean:function(t){var e=[],n=-1;for(n=0;n<t.length;n++)""!==t[n]&&e.push(t[n]);return e},defer:function(n){var a=null,i=null,o=null;return i=new this.Deferred,e.features.has.promises?i.promise=new Promise(function(t,e){i.resolve=t,i.reject=e}):(o=t.jQuery||n.$)&&"function"==typeof o.Deferred?(a=o.Deferred(),i.promise=a.promise(),i.resolve=a.resolve,i.reject=a.reject):t.console&&console.warn(e.messages.warningNoPromiseImplementation()),i},all:function(n,a){var i=null;return e.features.has.promises?Promise.all(n):(i=t.jQuery||a.$)&&"function"==typeof i.when?i.when.apply(i,n).done(function(){return arguments}):(t.console&&console.warn(e.messages.warningNoPromiseImplementation()),[])},getPrefix:function(t,e,a){var i=-1,o="";if(n.dashCase(e)in t.style)return"";for(i=0;o=a[i];i++)if(o+e in t.style)return o.toLowerCase();return"unsupported"},randomHex:function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()},getDocumentState:function(e){return e="object"==typeof e.body?e:t.document,{scrollTop:t.pageYOffset,scrollLeft:t.pageXOffset,docHeight:e.documentElement.scrollHeight,docWidth:e.documentElement.scrollWidth,viewportHeight:e.documentElement.clientHeight,viewportWidth:e.documentElement.clientWidth}},bind:function(t,e){return function(){return e.apply(t,arguments)}},isVisible:function(e){var n=null;return!!e.offsetParent||(n=t.getComputedStyle(e),"fixed"===n.position&&"hidden"!==n.visibility&&"0"!==n.opacity)},seal:function(t){"function"==typeof Object.seal&&Object.seal(t)},freeze:function(t){"function"==typeof Object.freeze&&Object.freeze(t)},compareVersions:function(t,e){var n=t.split("."),a=e.split("."),i=-1,o=-1,r=-1;for(r=0;r<n.length;r++){if(i=parseInt(n[r].replace(/[^\d.]/g,"")),o=parseInt(a[r].replace(/[^\d.]/g,"")||0),o<i)return!1;if(o>i)return!0}return!0},Deferred:function(){this.promise=null,this.resolve=null,this.reject=null,this.id=n.randomHex()},isEmptyObject:function(t){var e="";if("function"==typeof Object.keys)return 0===Object.keys(t).length;for(e in t)if(t.hasOwnProperty(e))return!1;return!0},getClassname:function(t,e,n){var a="";return a+=t.block,a.length&&(a+=t.delineatorElement),a+=t["element"+this.pascalCase(e)],n?(a.length&&(a+=t.delineatorModifier),a+=n):a},getProperty:function(t,e){var n=e.split("."),a=null,i="",o=0;if(!e)return t;for(a=function(t){return t?t[i]:null};o<n.length;)i=n[o],t=a(t),o++;return"undefined"!=typeof t?t:null}},e.h=n,e.Base=function(){},e.Base.prototype={constructor:e.Base,callActions:function(t,e){var a=this,i=a.constructor.actions[t],o="";if(i&&!n.isEmptyObject(i))for(o in i)i[o].apply(a,e)},callFilters:function(t,e,a){var i=this,o=i.constructor.filters[t],r=e,s="";if(!o||n.isEmptyObject(o))return r;a=a||[];for(s in o)a=n.arrayFromList(a),a.unshift(r),r=o[s].apply(i,a);return r}},e.BaseStatic=function(){this.actions={},this.filters={},this.extend=function(t){n.extend(this.prototype,t)},this.registerAction=function(t,e,n){(this.actions[t]=this.actions[t]||{})[e]=n},this.registerFilter=function(t,e,n){(this.filters[t]=this.filters[t]||{})[e]=n}},e.Features=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.boxSizingPrefix="",this.transformPrefix="",this.transitionPrefix="",this.boxSizingPrefix="",this.transformProp="",this.transformRule="",this.transitionProp="",this.perspectiveProp="",this.perspectiveOriginProp="",this.has=new e.Has,this.canary=null,this.BOX_SIZING_PROP="boxSizing",this.TRANSITION_PROP="transition",this.TRANSFORM_PROP="transform",this.PERSPECTIVE_PROP="perspective",this.PERSPECTIVE_ORIGIN_PROP="perspectiveOrigin",this.VENDORS=["Webkit","moz","O","ms"],this.TWEENABLE=["opacity","width","height","marginRight","marginBottom","x","y","scale","translateX","translateY","translateZ","rotateX","rotateY","rotateZ"],this.callActions("afterConstruct")},e.BaseStatic.call(e.Features),e.Features.prototype=Object.create(e.Base.prototype),n.extend(e.Features.prototype,{constructor:e.Features,init:function(){var t=this;t.callActions("beforeInit",arguments),t.canary=document.createElement("div"),t.setPrefixes(),t.runTests(),t.callActions("beforeInit",arguments)},runTests:function(){var e=this;e.callActions("beforeRunTests",arguments),e.has.promises="function"==typeof t.Promise,e.has.transitions="unsupported"!==e.transitionPrefix,e.callActions("afterRunTests",arguments),n.freeze(e.has)},setPrefixes:function(){var t=this;t.callActions("beforeSetPrefixes",arguments),t.transitionPrefix=n.getPrefix(t.canary,"Transition",t.VENDORS),t.transformPrefix=n.getPrefix(t.canary,"Transform",t.VENDORS),t.boxSizingPrefix=n.getPrefix(t.canary,"BoxSizing",t.VENDORS),t.boxSizingProp=t.boxSizingPrefix?t.boxSizingPrefix+n.pascalCase(t.BOX_SIZING_PROP):t.BOX_SIZING_PROP,t.transitionProp=t.transitionPrefix?t.transitionPrefix+n.pascalCase(t.TRANSITION_PROP):t.TRANSITION_PROP,t.transformProp=t.transformPrefix?t.transformPrefix+n.pascalCase(t.TRANSFORM_PROP):t.TRANSFORM_PROP,t.transformRule=t.transformPrefix?"-"+t.transformPrefix+"-"+t.TRANSFORM_PROP:t.TRANSFORM_PROP,t.perspectiveProp=t.transformPrefix?t.transformPrefix+n.pascalCase(t.PERSPECTIVE_PROP):t.PERSPECTIVE_PROP,t.perspectiveOriginProp=t.transformPrefix?t.transformPrefix+n.pascalCase(t.PERSPECTIVE_ORIGIN_PROP):t.PERSPECTIVE_ORIGIN_PROP,t.callActions("afterSetPrefixes",arguments)}}),e.Has=function(){this.transitions=!1,this.promises=!1,n.seal(this)},e.features=new e.Features,e.features.init(),e.ConfigAnimation=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!0,this.effects="fade scale",this.effectsIn="",this.effectsOut="",this.duration=600,this.easing="ease",this.applyPerspective=!0,this.perspectiveDistance="3000px",this.perspectiveOrigin="50% 50%",this.queue=!0,this.queueLimit=3,this.animateResizeContainer=!0,this.animateResizeTargets=!1,this.staggerSequence=null,this.reverseOut=!1,this.nudge=!0,this.clampHeight=!0,this.clampWidth=!0,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigAnimation),e.ConfigAnimation.prototype=Object.create(e.Base.prototype),e.ConfigAnimation.prototype.constructor=e.ConfigAnimation,e.ConfigBehavior=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.liveSort=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigBehavior),e.ConfigBehavior.prototype=Object.create(e.Base.prototype),e.ConfigBehavior.prototype.constructor=e.ConfigBehavior,e.ConfigCallbacks=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.onMixStart=null,this.onMixBusy=null,this.onMixEnd=null,this.onMixFail=null,this.onMixClick=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigCallbacks),e.ConfigCallbacks.prototype=Object.create(e.Base.prototype),e.ConfigCallbacks.prototype.constructor=e.ConfigCallbacks,e.ConfigControls=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!0,this.live=!1,this.scope="global",this.toggleLogic="or",this.toggleDefault="all",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigControls),e.ConfigControls.prototype=Object.create(e.Base.prototype),e.ConfigControls.prototype.constructor=e.ConfigControls,e.ConfigClassNames=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.block="mixitup",this.elementContainer="container",this.elementFilter="control",this.elementSort="control",this.elementMultimix="control",this.elementToggle="control",this.modifierActive="active",this.modifierDisabled="disabled",this.modifierFailed="failed",this.delineatorElement="-",this.delineatorModifier="-",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigClassNames),e.ConfigClassNames.prototype=Object.create(e.Base.prototype),e.ConfigClassNames.prototype.constructor=e.ConfigClassNames,e.ConfigData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.uidKey="",this.dirtyCheck=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigData),e.ConfigData.prototype=Object.create(e.Base.prototype),e.ConfigData.prototype.constructor=e.ConfigData,e.ConfigDebug=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!1,this.showWarnings=!0,this.fauxAsync=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigDebug),e.ConfigDebug.prototype=Object.create(e.Base.prototype),e.ConfigDebug.prototype.constructor=e.ConfigDebug,e.ConfigLayout=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.allowNestedTargets=!0,this.containerClassName="",this.siblingBefore=null,this.siblingAfter=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigLayout),e.ConfigLayout.prototype=Object.create(e.Base.prototype),e.ConfigLayout.prototype.constructor=e.ConfigLayout,e.ConfigLoad=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.filter="all",this.sort="default:asc",this.dataset=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigLoad),e.ConfigLoad.prototype=Object.create(e.Base.prototype),e.ConfigLoad.prototype.constructor=e.ConfigLoad,e.ConfigSelectors=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.target=".mix",this.control="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigSelectors),e.ConfigSelectors.prototype=Object.create(e.Base.prototype),e.ConfigSelectors.prototype.constructor=e.ConfigSelectors,e.ConfigRender=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.target=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigRender),e.ConfigRender.prototype=Object.create(e.Base.prototype),e.ConfigRender.prototype.constructor=e.ConfigRender,e.ConfigTemplates=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.ConfigTemplates),e.ConfigTemplates.prototype=Object.create(e.Base.prototype),e.ConfigTemplates.prototype.constructor=e.ConfigTemplates,e.Config=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.animation=new e.ConfigAnimation,this.behavior=new e.ConfigBehavior,this.callbacks=new e.ConfigCallbacks,this.controls=new e.ConfigControls,this.classNames=new e.ConfigClassNames,this.data=new e.ConfigData,this.debug=new e.ConfigDebug,this.layout=new e.ConfigLayout,this.load=new e.ConfigLoad,this.selectors=new e.ConfigSelectors,this.render=new e.ConfigRender,this.templates=new e.ConfigTemplates,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Config),e.Config.prototype=Object.create(e.Base.prototype),e.Config.prototype.constructor=e.Config,e.MixerDom=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.document=null,this.body=null,this.container=null,this.parent=null,this.targets=[],this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.MixerDom),e.MixerDom.prototype=Object.create(e.Base.prototype),e.MixerDom.prototype.constructor=e.MixerDom,e.UiClassNames=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.base="",this.active="",this.disabled="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.UiClassNames),e.UiClassNames.prototype=Object.create(e.Base.prototype),e.UiClassNames.prototype.constructor=e.UiClassNames,e.CommandDataset=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.dataset=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandDataset),e.CommandDataset.prototype=Object.create(e.Base.prototype),e.CommandDataset.prototype.constructor=e.CommandDataset,e.CommandMultimix=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.filter=null,this.sort=null,this.insert=null,this.remove=null,this.changeLayout=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandMultimix),e.CommandMultimix.prototype=Object.create(e.Base.prototype),e.CommandMultimix.prototype.constructor=e.CommandMultimix,e.CommandFilter=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.selector="",this.collection=null,this.action="show",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandFilter),e.CommandFilter.prototype=Object.create(e.Base.prototype),e.CommandFilter.prototype.constructor=e.CommandFilter,e.CommandSort=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.sortString="",this.attribute="",this.order="asc",this.collection=null,this.next=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandSort),e.CommandSort.prototype=Object.create(e.Base.prototype),e.CommandSort.prototype.constructor=e.CommandSort,e.CommandInsert=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.index=0,this.collection=[],this.position="before",this.sibling=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandInsert),e.CommandInsert.prototype=Object.create(e.Base.prototype),e.CommandInsert.prototype.constructor=e.CommandInsert,e.CommandRemove=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.targets=[],this.collection=[],this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandRemove),e.CommandRemove.prototype=Object.create(e.Base.prototype),e.CommandRemove.prototype.constructor=e.CommandRemove,e.CommandChangeLayout=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.containerClassName="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.CommandChangeLayout),e.CommandChangeLayout.prototype=Object.create(e.Base.prototype),e.CommandChangeLayout.prototype.constructor=e.CommandChangeLayout,e.ControlDefinition=function(t,a,i,o){e.Base.call(this),this.callActions("beforeConstruct"),this.type=t,this.selector=a,this.live=i||!1,this.parent=o||"",this.callActions("afterConstruct"),n.freeze(this),n.seal(this)},e.BaseStatic.call(e.ControlDefinition),e.ControlDefinition.prototype=Object.create(e.Base.prototype),e.ControlDefinition.prototype.constructor=e.ControlDefinition,e.controlDefinitions=[],e.controlDefinitions.push(new e.ControlDefinition("multimix","[data-filter][data-sort]")),e.controlDefinitions.push(new e.ControlDefinition("filter","[data-filter]")),e.controlDefinitions.push(new e.ControlDefinition("sort","[data-sort]")),e.controlDefinitions.push(new e.ControlDefinition("toggle","[data-toggle]")),e.Control=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.el=null,this.selector="",this.bound=[],this.pending=-1,this.type="",this.status="inactive",this.filter="",this.sort="",this.canDisable=!1,this.handler=null,this.classNames=new e.UiClassNames,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Control),e.Control.prototype=Object.create(e.Base.prototype),n.extend(e.Control.prototype,{constructor:e.Control,init:function(t,n,a){var i=this;if(this.callActions("beforeInit",arguments),i.el=t,i.type=n,i.selector=a,i.selector)i.status="live";else switch(i.canDisable="boolean"==typeof i.el.disable,i.type){case"filter":i.filter=i.el.getAttribute("data-filter");break;case"toggle":i.filter=i.el.getAttribute("data-toggle");break;case"sort":i.sort=i.el.getAttribute("data-sort");break;case"multimix":i.filter=i.el.getAttribute("data-filter"),i.sort=i.el.getAttribute("data-sort")}i.bindClick(),e.controls.push(i),this.callActions("afterInit",arguments)},isBound:function(t){var e=this,n=!1;return this.callActions("beforeIsBound",arguments),n=e.bound.indexOf(t)>-1,e.callFilters("afterIsBound",n,arguments)},addBinding:function(t){var e=this;this.callActions("beforeAddBinding",arguments),e.isBound()||e.bound.push(t),this.callActions("afterAddBinding",arguments)},removeBinding:function(t){var n=this,a=-1;this.callActions("beforeRemoveBinding",arguments),(a=n.bound.indexOf(t))>-1&&n.bound.splice(a,1),n.bound.length<1&&(n.unbindClick(),a=e.controls.indexOf(n),e.controls.splice(a,1),"active"===n.status&&n.renderStatus(n.el,"inactive")),this.callActions("afterRemoveBinding",arguments)},bindClick:function(){var t=this;this.callActions("beforeBindClick",arguments),t.handler=function(e){t.handleClick(e)},n.on(t.el,"click",t.handler),this.callActions("afterBindClick",arguments)},unbindClick:function(){var t=this;this.callActions("beforeUnbindClick",arguments),n.off(t.el,"click",t.handler),t.handler=null,this.callActions("afterUnbindClick",arguments)},handleClick:function(t){var a=this,i=null,o=null,r=!1,s=void 0,l={},c=null,u=[],f=-1;if(this.callActions("beforeHandleClick",arguments),this.pending=0,o=a.bound[0],i=a.selector?n.closestParent(t.target,o.config.selectors.control+a.selector,!0,o.dom.document):a.el,!i)return void a.callActions("afterHandleClick",arguments);switch(a.type){case"filter":l.filter=a.filter||i.getAttribute("data-filter");break;case"sort":l.sort=a.sort||i.getAttribute("data-sort");break;case"multimix":l.filter=a.filter||i.getAttribute("data-filter"),l.sort=a.sort||i.getAttribute("data-sort");break;case"toggle":l.filter=a.filter||i.getAttribute("data-toggle"),r="live"===a.status?n.hasClass(i,a.classNames.active):"active"===a.status}for(f=0;f<a.bound.length;f++)c=new e.CommandMultimix,n.extend(c,l),u.push(c);for(u=a.callFilters("commandsHandleClick",u,arguments),a.pending=a.bound.length,f=0;o=a.bound[f];f++)l=u[f],l&&(o.lastClicked||(o.lastClicked=i),e.events.fire("mixClick",o.dom.container,{state:o.state,instance:o,originalEvent:t,control:o.lastClicked},o.dom.document),"function"==typeof o.config.callbacks.onMixClick&&(s=o.config.callbacks.onMixClick.call(o.lastClicked,o.state,t,o),s===!1)||("toggle"===a.type?r?o.toggleOff(l.filter):o.toggleOn(l.filter):o.multimix(l)));this.callActions("afterHandleClick",arguments)},update:function(t,n){var a=this,i=new e.CommandMultimix;a.callActions("beforeUpdate",arguments),a.pending--,a.pending=Math.max(0,a.pending),a.pending>0||("live"===a.status?a.updateLive(t,n):(i.sort=a.sort,i.filter=a.filter,a.callFilters("actionsUpdate",i,arguments),a.parseStatusChange(a.el,t,i,n)),a.callActions("afterUpdate",arguments))},updateLive:function(t,n){var a=this,i=null,o=null,r=null,s=-1;if(a.callActions("beforeUpdateLive",arguments),a.el){for(i=a.el.querySelectorAll(a.selector),s=0;r=i[s];s++){switch(o=new e.CommandMultimix,a.type){case"filter":o.filter=r.getAttribute("data-filter");break;case"sort":o.sort=r.getAttribute("data-sort");break;case"multimix":o.filter=r.getAttribute("data-filter"),o.sort=r.getAttribute("data-sort");break;case"toggle":o.filter=r.getAttribute("data-toggle")}o=a.callFilters("actionsUpdateLive",o,arguments),a.parseStatusChange(r,t,o,n)}a.callActions("afterUpdateLive",arguments)}},parseStatusChange:function(t,e,n,a){var i=this,o="",r="",s=-1;switch(i.callActions("beforeParseStatusChange",arguments),i.type){case"filter":e.filter===n.filter?i.renderStatus(t,"active"):i.renderStatus(t,"inactive");break;case"multimix":e.sort===n.sort&&e.filter===n.filter?i.renderStatus(t,"active"):i.renderStatus(t,"inactive");break;case"sort":e.sort.match(/:asc/g)&&(o=e.sort.replace(/:asc/g,"")),e.sort===n.sort||o===n.sort?i.renderStatus(t,"active"):i.renderStatus(t,"inactive");break;case"toggle":for(a.length<1&&i.renderStatus(t,"inactive"),e.filter===n.filter&&i.renderStatus(t,"active"),s=0;s<a.length;s++){if(r=a[s],r===n.filter){i.renderStatus(t,"active");break}i.renderStatus(t,"inactive")}}i.callActions("afterParseStatusChange",arguments)},renderStatus:function(t,e){var a=this;switch(a.callActions("beforeRenderStatus",arguments),e){case"active":n.addClass(t,a.classNames.active),n.removeClass(t,a.classNames.disabled),a.canDisable&&(a.el.disabled=!1);break;case"inactive":n.removeClass(t,a.classNames.active),n.removeClass(t,a.classNames.disabled),a.canDisable&&(a.el.disabled=!1);break;case"disabled":a.canDisable&&(a.el.disabled=!0),n.addClass(t,a.classNames.disabled),n.removeClass(t,a.classNames.active)}"live"!==a.status&&(a.status=e),a.callActions("afterRenderStatus",arguments)}}),e.controls=[],e.StyleData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.x=0,this.y=0,this.top=0,this.right=0,this.bottom=0,this.left=0,this.width=0,this.height=0,this.marginRight=0,this.marginBottom=0,this.opacity=0,this.scale=new e.TransformData,this.translateX=new e.TransformData,this.translateY=new e.TransformData,this.translateZ=new e.TransformData,this.rotateX=new e.TransformData,this.rotateY=new e.TransformData,this.rotateZ=new e.TransformData,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.StyleData),e.StyleData.prototype=Object.create(e.Base.prototype),e.StyleData.prototype.constructor=e.StyleData,e.TransformData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.value=0,this.unit="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.TransformData),e.TransformData.prototype=Object.create(e.Base.prototype),e.TransformData.prototype.constructor=e.TransformData,e.TransformDefaults=function(){e.StyleData.apply(this),this.callActions("beforeConstruct"),this.scale.value=.01,this.scale.unit="",this.translateX.value=20,this.translateX.unit="px",this.translateY.value=20,this.translateY.unit="px",this.translateZ.value=20,this.translateZ.unit="px",this.rotateX.value=90,this.rotateX.unit="deg",this.rotateY.value=90,this.rotateY.unit="deg",this.rotateX.value=90,this.rotateX.unit="deg",this.rotateZ.value=180,this.rotateZ.unit="deg",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.TransformDefaults),e.TransformDefaults.prototype=Object.create(e.StyleData.prototype),e.TransformDefaults.prototype.constructor=e.TransformDefaults,e.transformDefaults=new e.TransformDefaults,e.EventDetail=function(){this.state=null,this.futureState=null,this.instance=null,this.originalEvent=null},e.Events=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.mixStart=null,this.mixBusy=null,this.mixEnd=null,this.mixFail=null,this.mixClick=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Events),e.Events.prototype=Object.create(e.Base.prototype),e.Events.prototype.constructor=e.Events,e.Events.prototype.fire=function(t,a,i,o){var r=this,s=null,l=new e.EventDetail;if(r.callActions("beforeFire",arguments),"undefined"==typeof r[t])throw new Error('Event type "'+t+'" not found.');l.state=new e.State,n.extend(l.state,i.state),i.futureState&&(l.futureState=new e.State,n.extend(l.futureState,i.futureState)),l.instance=i.instance,i.originalEvent&&(l.originalEvent=i.originalEvent),s=n.getCustomEvent(t,l,o),r.callFilters("eventFire",s,arguments),a.dispatchEvent(s)},e.events=new e.Events,e.QueueItem=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.args=[],this.instruction=null,this.triggerElement=null,this.deferred=null,this.isToggling=!1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.QueueItem),e.QueueItem.prototype=Object.create(e.Base.prototype),e.QueueItem.prototype.constructor=e.QueueItem,e.Mixer=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.config=new e.Config,this.id="",this.isBusy=!1,this.isToggling=!1,this.incPadding=!0,this.controls=[],this.targets=[],this.origOrder=[],this.cache={},this.toggleArray=[],this.targetsMoved=0,this.targetsImmovable=0,this.targetsBound=0,this.targetsDone=0,this.staggerDuration=0,this.effectsIn=null,this.effectsOut=null,this.transformIn=[],this.transformOut=[],this.queue=[],this.state=null,this.lastOperation=null,
17
- this.lastClicked=null,this.userCallback=null,this.userDeferred=null,this.dom=new e.MixerDom,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Mixer),e.Mixer.prototype=Object.create(e.Base.prototype),n.extend(e.Mixer.prototype,{constructor:e.Mixer,attach:function(a,i,o,r){var s=this,l=null,c=-1;for(s.callActions("beforeAttach",arguments),s.id=o,r&&n.extend(s.config,r,!0,!0),s.sanitizeConfig(),s.cacheDom(a,i),s.config.layout.containerClassName&&n.addClass(s.dom.container,s.config.layout.containerClassName),e.features.has.transitions||(s.config.animation.enable=!1),"undefined"==typeof t.console&&(s.config.debug.showWarnings=!1),s.config.data.uidKey&&(s.config.controls.enable=!1),s.indexTargets(),s.state=s.getInitialState(),c=0;l=s.lastOperation.toHide[c];c++)l.hide();s.config.controls.enable&&(s.initControls(),s.buildToggleArray(null,s.state),s.updateControls({filter:s.state.activeFilter,sort:s.state.activeSort})),s.parseEffects(),s.callActions("afterAttach",arguments)},sanitizeConfig:function(){var t=this;t.callActions("beforeSanitizeConfig",arguments),t.config.controls.scope=t.config.controls.scope.toLowerCase().trim(),t.config.controls.toggleLogic=t.config.controls.toggleLogic.toLowerCase().trim(),t.config.controls.toggleDefault=t.config.controls.toggleDefault.toLowerCase().trim(),t.config.animation.effects=t.config.animation.effects.trim(),t.callActions("afterSanitizeConfig",arguments)},getInitialState:function(){var t=this,n=new e.State,a=new e.Operation;if(t.callActions("beforeGetInitialState",arguments),n.activeContainerClassName=t.config.layout.containerClassName,t.config.load.dataset){if(!t.config.data.uidKey||"string"!=typeof t.config.data.uidKey)throw new TypeError(e.messages.errorConfigDataUidKeyNotSet());a.startDataset=a.newDataset=n.activeDataset=t.config.load.dataset.slice(),a.startContainerClassName=a.newContainerClassName=n.activeContainerClassName,a.show=t.targets.slice(),n=t.callFilters("stateGetInitialState",n,arguments)}else n.activeFilter=t.parseFilterArgs([t.config.load.filter]).command,n.activeSort=t.parseSortArgs([t.config.load.sort]).command,n.totalTargets=t.targets.length,n=t.callFilters("stateGetInitialState",n,arguments),n.activeSort.collection||n.activeSort.attribute||"random"===n.activeSort.order||"desc"===n.activeSort.order?(a.newSort=n.activeSort,t.sortOperation(a),t.printSort(!1,a),t.targets=a.newOrder):a.startOrder=a.newOrder=t.targets,a.startFilter=a.newFilter=n.activeFilter,a.startSort=a.newSort=n.activeSort,a.startContainerClassName=a.newContainerClassName=n.activeContainerClassName,"all"===a.newFilter.selector?a.newFilter.selector=t.config.selectors.target:"none"===a.newFilter.selector&&(a.newFilter.selector="");return a=t.callFilters("operationGetInitialState",a,[n]),t.lastOperation=a,a.newFilter&&t.filterOperation(a),n=t.buildState(a)},cacheDom:function(t,e){var n=this;n.callActions("beforeCacheDom",arguments),n.dom.document=e,n.dom.body=n.dom.document.querySelector("body"),n.dom.container=t,n.dom.parent=t,n.callActions("afterCacheDom",arguments)},indexTargets:function(){var t=this,a=null,i=null,o=null,r=-1;if(t.callActions("beforeIndexTargets",arguments),t.dom.targets=t.config.layout.allowNestedTargets?t.dom.container.querySelectorAll(t.config.selectors.target):n.children(t.dom.container,t.config.selectors.target,t.dom.document),t.dom.targets=n.arrayFromList(t.dom.targets),t.targets=[],(o=t.config.load.dataset)&&o.length!==t.dom.targets.length)throw new Error(e.messages.errorDatasetPrerenderedMismatch());if(t.dom.targets.length){for(r=0;i=t.dom.targets[r];r++)a=new e.Target,a.init(i,t,o?o[r]:void 0),a.isInDom=!0,t.targets.push(a);t.dom.parent=t.dom.targets[0].parentElement===t.dom.container?t.dom.container:t.dom.targets[0].parentElement}t.origOrder=t.targets,t.callActions("afterIndexTargets",arguments)},initControls:function(){var t=this,n="",a=null,i=null,o=null,r=null,s=null,l=-1,c=-1;switch(t.callActions("beforeInitControls",arguments),t.config.controls.scope){case"local":o=t.dom.container;break;case"global":o=t.dom.document;break;default:throw new Error(e.messages.errorConfigInvalidControlsScope())}for(l=0;n=e.controlDefinitions[l];l++)if(t.config.controls.live||n.live){if(n.parent){if(r=t.dom[n.parent],!r||r.length<0)continue;"number"!=typeof r.length&&(r=[r])}else r=[o];for(c=0;i=r[c];c++)s=t.getControl(i,n.type,n.selector),t.controls.push(s)}else for(a=o.querySelectorAll(t.config.selectors.control+n.selector),c=0;i=a[c];c++)s=t.getControl(i,n.type,""),s&&t.controls.push(s);t.callActions("afterInitControls",arguments)},getControl:function(t,a,i){var o=this,r=null,s=-1;if(o.callActions("beforeGetControl",arguments),!i)for(s=0;r=e.controls[s];s++){if(r.el===t&&r.isBound(o))return o.callFilters("controlGetControl",null,arguments);if(r.el===t&&r.type===a&&r.selector===i)return r.addBinding(o),o.callFilters("controlGetControl",r,arguments)}return r=new e.Control,r.init(t,a,i),r.classNames.base=n.getClassname(o.config.classNames,a),r.classNames.active=n.getClassname(o.config.classNames,a,o.config.classNames.modifierActive),r.classNames.disabled=n.getClassname(o.config.classNames,a,o.config.classNames.modifierDisabled),r.addBinding(o),o.callFilters("controlGetControl",r,arguments)},getToggleSelector:function(){var t=this,e="or"===t.config.controls.toggleLogic?", ":"",a="";return t.callActions("beforeGetToggleSelector",arguments),t.toggleArray=n.clean(t.toggleArray),a=t.toggleArray.join(e),""===a&&(a=t.config.controls.toggleDefault),t.callFilters("selectorGetToggleSelector",a,arguments)},buildToggleArray:function(t,e){var a=this,i="";if(a.callActions("beforeBuildToggleArray",arguments),t&&t.filter)i=t.filter.selector.replace(/\s/g,"");else{if(!e)return;i=e.activeFilter.selector.replace(/\s/g,"")}i!==a.config.selectors.target&&"all"!==i||(i=""),"or"===a.config.controls.toggleLogic?a.toggleArray=i.split(","):a.toggleArray=a.splitCompoundSelector(i),a.toggleArray=n.clean(a.toggleArray),a.callActions("afterBuildToggleArray",arguments)},splitCompoundSelector:function(t){var e=t.split(/([\.\[])/g),n=[],a="",i=-1;for(""===e[0]&&e.shift(),i=0;i<e.length;i++)i%2===0&&(a=""),a+=e[i],i%2!==0&&n.push(a);return n},updateControls:function(t){var a=this,i=null,o=new e.CommandMultimix,r=-1;for(a.callActions("beforeUpdateControls",arguments),t.filter?o.filter=t.filter.selector:o.filter=a.state.activeFilter.selector,t.sort?o.sort=a.buildSortString(t.sort):o.sort=a.buildSortString(a.state.activeSort),o.filter===a.config.selectors.target&&(o.filter="all"),""===o.filter&&(o.filter="none"),n.freeze(o),r=0;i=a.controls[r];r++)i.update(o,a.toggleArray);a.callActions("afterUpdateControls",arguments)},buildSortString:function(t){var e=this,n="";return n+=t.sortString,t.next&&(n+=" "+e.buildSortString(t.next)),n},insertTargets:function(t,a){var i=this,o=null,r=-1,s=null,l=null,c=null,u=-1;if(i.callActions("beforeInsertTargets",arguments),"undefined"==typeof t.index&&(t.index=0),o=i.getNextSibling(t.index,t.sibling,t.position),s=i.dom.document.createDocumentFragment(),r=o?n.index(o,i.config.selectors.target):i.targets.length,t.collection){for(u=0;c=t.collection[u];u++){if(i.dom.targets.indexOf(c)>-1)throw new Error(e.messages.errorInsertPreexistingElement());c.style.display="none",s.appendChild(c),s.appendChild(i.dom.document.createTextNode(" ")),n.isElement(c,i.dom.document)&&c.matches(i.config.selectors.target)&&(l=new e.Target,l.init(c,i),l.isInDom=!0,i.targets.splice(r,0,l),r++)}i.dom.parent.insertBefore(s,o)}a.startOrder=i.origOrder=i.targets,i.callActions("afterInsertTargets",arguments)},getNextSibling:function(t,e,n){var a=this,i=null;return t=Math.max(t,0),e&&"before"===n?i=e:e&&"after"===n?i=e.nextElementSibling||null:a.targets.length>0&&"undefined"!=typeof t?i=t<a.targets.length||!a.targets.length?a.targets[t].dom.el:a.targets[a.targets.length-1].dom.el.nextElementSibling:0===a.targets.length&&a.dom.parent.children.length>0&&(a.config.layout.siblingAfter?i=a.config.layout.siblingAfter:a.config.layout.siblingBefore?i=a.config.layout.siblingBefore.nextElementSibling:a.dom.parent.children[0]),a.callFilters("elementGetNextSibling",i,arguments)},filterOperation:function(t){var e=this,n=!1,a=-1,i="",o=null,r=-1;for(e.callActions("beforeFilterOperation",arguments),i=t.newFilter.action,r=0;o=t.newOrder[r];r++)n=t.newFilter.collection?t.newFilter.collection.indexOf(o.dom.el)>-1:""!==t.newFilter.selector&&o.dom.el.matches(t.newFilter.selector),e.evaluateHideShow(n,o,i,t);if(t.toRemove.length)for(r=0;o=t.show[r];r++)t.toRemove.indexOf(o)>-1&&(t.show.splice(r,1),(a=t.toShow.indexOf(o))>-1&&t.toShow.splice(a,1),t.toHide.push(o),t.hide.push(o),r--);t.matching=t.show.slice(),0===t.show.length&&""!==t.newFilter.selector&&0!==e.targets.length&&(t.hasFailed=!0),e.callActions("afterFilterOperation",arguments)},evaluateHideShow:function(t,e,n,a){var i=this,o=!1,r=Array.prototype.slice.call(arguments,1);o=i.callFilters("testResultEvaluateHideShow",t,r),i.callActions("beforeEvaluateHideShow",arguments),o===!0&&"show"===n||o===!1&&"hide"===n?(a.show.push(e),!e.isShown&&a.toShow.push(e)):(a.hide.push(e),e.isShown&&a.toHide.push(e)),i.callActions("afterEvaluateHideShow",arguments)},sortOperation:function(t){var e=this;e.callActions("beforeSortOperation",arguments),t.startOrder=e.targets,t.newSort.collection?t.newOrder=t.newSort.collection:"random"===t.newSort.order?t.newOrder=n.arrayShuffle(t.startOrder):""===t.newSort.attribute?(t.newOrder=e.origOrder.slice(),"desc"===t.newSort.order&&t.newOrder.reverse()):(t.newOrder=t.startOrder.slice(),t.newOrder.sort(function(n,a){return e.compare(n,a,t.newSort)})),n.isEqualArray(t.newOrder,t.startOrder)&&(t.willSort=!1),e.callActions("afterSortOperation",arguments)},compare:function(t,e,n){var a=this,i=n.order,o=a.getAttributeValue(t,n.attribute),r=a.getAttributeValue(e,n.attribute);return isNaN(1*o)||isNaN(1*r)?(o=o.toLowerCase(),r=r.toLowerCase()):(o=1*o,r=1*r),o<r?"asc"===i?-1:1:o>r?"asc"===i?1:-1:o===r&&n.next?a.compare(t,e,n.next):0},getAttributeValue:function(t,n){var a=this,i="";return i=t.dom.el.getAttribute("data-"+n),null===i&&a.config.debug.showWarnings&&console.warn(e.messages.warningInconsistentSortingAttributes({attribute:"data-"+n})),a.callFilters("valueGetAttributeValue",i||0,arguments)},printSort:function(e,a){var i=this,o=e?a.newOrder:a.startOrder,r=e?a.startOrder:a.newOrder,s=o.length?o[o.length-1].dom.el.nextElementSibling:null,l=t.document.createDocumentFragment(),c=null,u=null,f=null,h=-1;for(i.callActions("beforePrintSort",arguments),h=0;u=o[h];h++)f=u.dom.el,"absolute"!==f.style.position&&(n.removeWhitespace(f.previousSibling),f.parentElement.removeChild(f));for(c=s?s.previousSibling:i.dom.parent.lastChild,c&&"#text"===c.nodeName&&n.removeWhitespace(c),h=0;u=r[h];h++)f=u.dom.el,n.isElement(l.lastChild)&&l.appendChild(t.document.createTextNode(" ")),l.appendChild(f);i.dom.parent.firstChild&&i.dom.parent.firstChild!==s&&l.insertBefore(t.document.createTextNode(" "),l.childNodes[0]),s?(l.appendChild(t.document.createTextNode(" ")),i.dom.parent.insertBefore(l,s)):i.dom.parent.appendChild(l),i.callActions("afterPrintSort",arguments)},parseSortString:function(t,a){var i=this,o=t.split(" "),r=a,s=[],l=-1;for(l=0;l<o.length;l++){switch(s=o[l].split(":"),r.sortString=o[l],r.attribute=n.dashCase(s[0]),r.order=s[1]||"asc",r.attribute){case"default":r.attribute="";break;case"random":r.attribute="",r.order="random"}if(!r.attribute||"random"===r.order)break;l<o.length-1&&(r.next=new e.CommandSort,n.freeze(r),r=r.next)}return i.callFilters("commandsParseSort",a,arguments)},parseEffects:function(){var t=this,n="",a=t.config.animation.effectsIn||t.config.animation.effects,i=t.config.animation.effectsOut||t.config.animation.effects;t.callActions("beforeParseEffects",arguments),t.effectsIn=new e.StyleData,t.effectsOut=new e.StyleData,t.transformIn=[],t.transformOut=[],t.effectsIn.opacity=t.effectsOut.opacity=1,t.parseEffect("fade",a,t.effectsIn,t.transformIn),t.parseEffect("fade",i,t.effectsOut,t.transformOut,!0);for(n in e.transformDefaults)e.transformDefaults[n]instanceof e.TransformData&&(t.parseEffect(n,a,t.effectsIn,t.transformIn),t.parseEffect(n,i,t.effectsOut,t.transformOut,!0));t.parseEffect("stagger",a,t.effectsIn,t.transformIn),t.parseEffect("stagger",i,t.effectsOut,t.transformOut,!0),t.callActions("afterParseEffects",arguments)},parseEffect:function(t,n,a,i,o){var r=this,s=/\(([^)]+)\)/,l=-1,c="",u=[],f="",h=["%","px","em","rem","vh","vw","deg"],d="",m=-1;if(r.callActions("beforeParseEffect",arguments),"string"!=typeof n)throw new TypeError(e.messages.errorConfigInvalidAnimationEffects());if(n.indexOf(t)<0)return void("stagger"===t&&(r.staggerDuration=0));switch(l=n.indexOf(t+"("),l>-1&&(c=n.substring(l),u=s.exec(c),f=u[1]),t){case"fade":a.opacity=f?parseFloat(f):0;break;case"stagger":r.staggerDuration=f?parseFloat(f):100;break;default:if(o&&r.config.animation.reverseOut&&"scale"!==t?a[t].value=(f?parseFloat(f):e.transformDefaults[t].value)*-1:a[t].value=f?parseFloat(f):e.transformDefaults[t].value,f){for(m=0;d=h[m];m++)if(f.indexOf(d)>-1){a[t].unit=d;break}}else a[t].unit=e.transformDefaults[t].unit;i.push(t+"("+a[t].value+a[t].unit+")")}r.callActions("afterParseEffect",arguments)},buildState:function(t){var n=this,a=new e.State,i=null,o=-1;for(n.callActions("beforeBuildState",arguments),o=0;i=n.targets[o];o++)(!t.toRemove.length||t.toRemove.indexOf(i)<0)&&a.targets.push(i.dom.el);for(o=0;i=t.matching[o];o++)a.matching.push(i.dom.el);for(o=0;i=t.show[o];o++)a.show.push(i.dom.el);for(o=0;i=t.hide[o];o++)(!t.toRemove.length||t.toRemove.indexOf(i)<0)&&a.hide.push(i.dom.el);return a.id=n.id,a.container=n.dom.container,a.activeFilter=t.newFilter,a.activeSort=t.newSort,a.activeDataset=t.newDataset,a.activeContainerClassName=t.newContainerClassName,a.hasFailed=t.hasFailed,a.totalTargets=n.targets.length,a.totalShow=t.show.length,a.totalHide=t.hide.length,a.totalMatching=t.matching.length,a.triggerElement=t.triggerElement,n.callFilters("stateBuildState",a,arguments)},goMix:function(a,i){var o=this,r=null;return o.callActions("beforeGoMix",arguments),o.config.animation.duration&&o.config.animation.effects&&n.isVisible(o.dom.container)||(a=!1),i.toShow.length||i.toHide.length||i.willSort||i.willChangeLayout||(a=!1),i.startState.show.length||i.show.length||(a=!1),e.events.fire("mixStart",o.dom.container,{state:i.startState,futureState:i.newState,instance:o},o.dom.document),"function"==typeof o.config.callbacks.onMixStart&&o.config.callbacks.onMixStart.call(o.dom.container,i.startState,i.newState,o),n.removeClass(o.dom.container,n.getClassname(o.config.classNames,"container",o.config.classNames.modifierFailed)),r=o.userDeferred?o.userDeferred:o.userDeferred=n.defer(e.libraries),o.isBusy=!0,a&&e.features.has.transitions?(t.pageYOffset!==i.docState.scrollTop&&t.scrollTo(i.docState.scrollLeft,i.docState.scrollTop),o.config.animation.applyPerspective&&(o.dom.parent.style[e.features.perspectiveProp]=o.config.animation.perspectiveDistance,o.dom.parent.style[e.features.perspectiveOriginProp]=o.config.animation.perspectiveOrigin),o.config.animation.animateResizeContainer&&i.startHeight!==i.newHeight&&i.viewportDeltaY!==i.startHeight-i.newHeight&&(o.dom.parent.style.height=i.startHeight+"px"),o.config.animation.animateResizeContainer&&i.startWidth!==i.newWidth&&i.viewportDeltaX!==i.startWidth-i.newWidth&&(o.dom.parent.style.width=i.startWidth+"px"),i.startHeight===i.newHeight&&(o.dom.parent.style.height=i.startHeight+"px"),i.startWidth===i.newWidth&&(o.dom.parent.style.width=i.startWidth+"px"),i.startHeight===i.newHeight&&i.startWidth===i.newWidth&&(o.dom.parent.style.overflow="hidden"),requestAnimationFrame(function(){o.moveTargets(i)}),o.callFilters("promiseGoMix",r.promise,arguments)):(o.config.debug.fauxAsync?setTimeout(function(){o.cleanUp(i)},o.config.animation.duration):o.cleanUp(i),o.callFilters("promiseGoMix",r.promise,arguments))},getStartMixData:function(n){var a=this,i=t.getComputedStyle(a.dom.parent),o=a.dom.parent.getBoundingClientRect(),r=null,s={},l=-1,c=i[e.features.boxSizingProp];for(a.incPadding="border-box"===c,a.callActions("beforeGetStartMixData",arguments),l=0;r=n.show[l];l++)s=r.getPosData(),n.showPosData[l]={startPosData:s};for(l=0;r=n.toHide[l];l++)s=r.getPosData(),n.toHidePosData[l]={startPosData:s};n.startX=o.left,n.startY=o.top,n.startHeight=a.incPadding?o.height:o.height-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderTop)-parseFloat(i.borderBottom),n.startWidth=a.incPadding?o.width:o.width-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderLeft)-parseFloat(i.borderRight),a.callActions("afterGetStartMixData",arguments)},setInter:function(t){var e=this,a=null,i=-1;for(e.callActions("beforeSetInter",arguments),e.config.animation.clampHeight&&(e.dom.parent.style.height=t.startHeight+"px",e.dom.parent.style.overflow="hidden"),e.config.animation.clampWidth&&(e.dom.parent.style.width=t.startWidth+"px",e.dom.parent.style.overflow="hidden"),i=0;a=t.toShow[i];i++)a.show();t.willChangeLayout&&(n.removeClass(e.dom.container,t.startContainerClassName),n.addClass(e.dom.container,t.newContainerClassName)),e.callActions("afterSetInter",arguments)},getInterMixData:function(t){var e=this,n=null,a=-1;for(e.callActions("beforeGetInterMixData",arguments),a=0;n=t.show[a];a++)t.showPosData[a].interPosData=n.getPosData();for(a=0;n=t.toHide[a];a++)t.toHidePosData[a].interPosData=n.getPosData();e.callActions("afterGetInterMixData",arguments)},setFinal:function(t){var e=this,n=null,a=-1;for(e.callActions("beforeSetFinal",arguments),t.willSort&&e.printSort(!1,t),a=0;n=t.toHide[a];a++)n.hide();e.callActions("afterSetFinal",arguments)},getFinalMixData:function(e){var a=this,i=null,o=null,r=null,s=-1;for(a.callActions("beforeGetFinalMixData",arguments),s=0;r=e.show[s];s++)e.showPosData[s].finalPosData=r.getPosData();for(s=0;r=e.toHide[s];s++)e.toHidePosData[s].finalPosData=r.getPosData();for((a.config.animation.clampHeight||a.config.animation.clampWidth)&&(a.dom.parent.style.height=a.dom.parent.style.width=a.dom.parent.style.overflow=""),a.incPadding||(i=t.getComputedStyle(a.dom.parent)),o=a.dom.parent.getBoundingClientRect(),e.newX=o.left,e.newY=o.top,e.newHeight=a.incPadding?o.height:o.height-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderTop)-parseFloat(i.borderBottom),e.newWidth=a.incPadding?o.width:o.width-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderLeft)-parseFloat(i.borderRight),e.viewportDeltaX=e.docState.viewportWidth-this.dom.document.documentElement.clientWidth,e.viewportDeltaY=e.docState.viewportHeight-this.dom.document.documentElement.clientHeight,e.willSort&&a.printSort(!0,e),s=0;r=e.toShow[s];s++)r.hide();for(s=0;r=e.toHide[s];s++)r.show();e.willChangeLayout&&(n.removeClass(a.dom.container,e.newContainerClassName),n.addClass(a.dom.container,a.config.layout.containerClassName)),a.callActions("afterGetFinalMixData",arguments)},getTweenData:function(t){var n=this,a=null,i=null,o=Object.getOwnPropertyNames(n.effectsIn),r="",s=null,l=-1,c=-1,u=-1,f=-1;for(n.callActions("beforeGetTweenData",arguments),u=0;a=t.show[u];u++)for(i=t.showPosData[u],i.posIn=new e.StyleData,i.posOut=new e.StyleData,i.tweenData=new e.StyleData,a.isShown?(i.posIn.x=i.startPosData.x-i.interPosData.x,i.posIn.y=i.startPosData.y-i.interPosData.y):i.posIn.x=i.posIn.y=0,i.posOut.x=i.finalPosData.x-i.interPosData.x,i.posOut.y=i.finalPosData.y-i.interPosData.y,i.posIn.opacity=a.isShown?1:n.effectsIn.opacity,i.posOut.opacity=1,i.tweenData.opacity=i.posOut.opacity-i.posIn.opacity,a.isShown||n.config.animation.nudge||(i.posIn.x=i.posOut.x,i.posIn.y=i.posOut.y),i.tweenData.x=i.posOut.x-i.posIn.x,i.tweenData.y=i.posOut.y-i.posIn.y,n.config.animation.animateResizeTargets&&(i.posIn.width=i.startPosData.width,i.posIn.height=i.startPosData.height,l=(i.startPosData.width||i.finalPosData.width)-i.interPosData.width,i.posIn.marginRight=i.startPosData.marginRight-l,c=(i.startPosData.height||i.finalPosData.height)-i.interPosData.height,i.posIn.marginBottom=i.startPosData.marginBottom-c,i.posOut.width=i.finalPosData.width,i.posOut.height=i.finalPosData.height,l=(i.finalPosData.width||i.startPosData.width)-i.interPosData.width,i.posOut.marginRight=i.finalPosData.marginRight-l,c=(i.finalPosData.height||i.startPosData.height)-i.interPosData.height,i.posOut.marginBottom=i.finalPosData.marginBottom-c,i.tweenData.width=i.posOut.width-i.posIn.width,i.tweenData.height=i.posOut.height-i.posIn.height,i.tweenData.marginRight=i.posOut.marginRight-i.posIn.marginRight,i.tweenData.marginBottom=i.posOut.marginBottom-i.posIn.marginBottom),f=0;r=o[f];f++)s=n.effectsIn[r],s instanceof e.TransformData&&s.value&&(i.posIn[r].value=s.value,i.posOut[r].value=0,i.tweenData[r].value=i.posOut[r].value-i.posIn[r].value,i.posIn[r].unit=i.posOut[r].unit=i.tweenData[r].unit=s.unit);for(u=0;a=t.toHide[u];u++)for(i=t.toHidePosData[u],i.posIn=new e.StyleData,i.posOut=new e.StyleData,i.tweenData=new e.StyleData,i.posIn.x=a.isShown?i.startPosData.x-i.interPosData.x:0,i.posIn.y=a.isShown?i.startPosData.y-i.interPosData.y:0,i.posOut.x=n.config.animation.nudge?0:i.posIn.x,i.posOut.y=n.config.animation.nudge?0:i.posIn.y,i.tweenData.x=i.posOut.x-i.posIn.x,i.tweenData.y=i.posOut.y-i.posIn.y,n.config.animation.animateResizeTargets&&(i.posIn.width=i.startPosData.width,i.posIn.height=i.startPosData.height,l=i.startPosData.width-i.interPosData.width,i.posIn.marginRight=i.startPosData.marginRight-l,c=i.startPosData.height-i.interPosData.height,i.posIn.marginBottom=i.startPosData.marginBottom-c),i.posIn.opacity=1,i.posOut.opacity=n.effectsOut.opacity,i.tweenData.opacity=i.posOut.opacity-i.posIn.opacity,f=0;r=o[f];f++)s=n.effectsOut[r],s instanceof e.TransformData&&s.value&&(i.posIn[r].value=0,i.posOut[r].value=s.value,i.tweenData[r].value=i.posOut[r].value-i.posIn[r].value,i.posIn[r].unit=i.posOut[r].unit=i.tweenData[r].unit=s.unit);n.callActions("afterGetTweenData",arguments)},moveTargets:function(t){var a=this,i=null,o=null,r=null,s="",l=!1,c=-1,u=-1,f=a.checkProgress.bind(a);for(a.callActions("beforeMoveTargets",arguments),u=0;i=t.show[u];u++)o=new e.IMoveData,r=t.showPosData[u],s=i.isShown?"none":"show",l=a.willTransition(s,t.hasEffect,r.posIn,r.posOut),l&&c++,i.show(),o.posIn=r.posIn,o.posOut=r.posOut,o.statusChange=s,o.staggerIndex=c,o.operation=t,o.callback=l?f:null,i.move(o);for(u=0;i=t.toHide[u];u++)r=t.toHidePosData[u],o=new e.IMoveData,s="hide",l=a.willTransition(s,r.posIn,r.posOut),o.posIn=r.posIn,o.posOut=r.posOut,o.statusChange=s,o.staggerIndex=u,o.operation=t,o.callback=l?f:null,i.move(o);a.config.animation.animateResizeContainer&&(a.dom.parent.style[e.features.transitionProp]="height "+a.config.animation.duration+"ms ease, width "+a.config.animation.duration+"ms ease ",requestAnimationFrame(function(){t.startHeight!==t.newHeight&&t.viewportDeltaY!==t.startHeight-t.newHeight&&(a.dom.parent.style.height=t.newHeight+"px"),t.startWidth!==t.newWidth&&t.viewportDeltaX!==t.startWidth-t.newWidth&&(a.dom.parent.style.width=t.newWidth+"px")})),t.willChangeLayout&&(n.removeClass(a.dom.container,a.config.layout.ContainerClassName),n.addClass(a.dom.container,t.newContainerClassName)),a.callActions("afterMoveTargets",arguments)},hasEffect:function(){var t=this,e=["scale","translateX","translateY","translateZ","rotateX","rotateY","rotateZ"],n="",a=null,i=!1,o=-1,r=-1;if(1!==t.effectsIn.opacity)return t.callFilters("resultHasEffect",!0,arguments);for(r=0;n=e[r];r++)if(a=t.effectsIn[n],o="undefined"!==a.value?a.value:a,0!==o){i=!0;break}return t.callFilters("resultHasEffect",i,arguments)},willTransition:function(t,e,a,i){var o=this,r=!1;return r=!!n.isVisible(o.dom.container)&&(!!("none"!==t&&e||a.x!==i.x||a.y!==i.y)||!!o.config.animation.animateResizeTargets&&(a.width!==i.width||a.height!==i.height||a.marginRight!==i.marginRight||a.marginTop!==i.marginTop)),o.callFilters("resultWillTransition",r,arguments)},checkProgress:function(t){var e=this;e.targetsDone++,e.targetsBound===e.targetsDone&&e.cleanUp(t)},cleanUp:function(t){var a=this,i=null,o=null,r=null,s=null,l=-1;for(a.callActions("beforeCleanUp",arguments),a.targetsMoved=a.targetsImmovable=a.targetsBound=a.targetsDone=0,l=0;i=t.show[l];l++)i.cleanUp(),i.show();for(l=0;i=t.toHide[l];l++)i.cleanUp(),i.hide();if(t.willSort&&a.printSort(!1,t),a.dom.parent.style[e.features.transitionProp]=a.dom.parent.style.height=a.dom.parent.style.width=a.dom.parent.style.overflow=a.dom.parent.style[e.features.perspectiveProp]=a.dom.parent.style[e.features.perspectiveOriginProp]="",t.willChangeLayout&&(n.removeClass(a.dom.container,t.startContainerClassName),n.addClass(a.dom.container,t.newContainerClassName)),t.toRemove.length){for(l=0;i=a.targets[l];l++)t.toRemove.indexOf(i)>-1&&((o=i.dom.el.previousSibling)&&"#text"===o.nodeName&&(r=i.dom.el.nextSibling)&&"#text"===r.nodeName&&n.removeWhitespace(o),t.willSort||a.dom.parent.removeChild(i.dom.el),a.targets.splice(l,1),i.isInDom=!1,l--);a.origOrder=a.targets}t.willSort&&(a.targets=t.newOrder),a.state=t.newState,a.lastOperation=t,a.dom.targets=a.state.targets,e.events.fire("mixEnd",a.dom.container,{state:a.state,instance:a},a.dom.document),"function"==typeof a.config.callbacks.onMixEnd&&a.config.callbacks.onMixEnd.call(a.dom.container,a.state,a),t.hasFailed&&(e.events.fire("mixFail",a.dom.container,{state:a.state,instance:a},a.dom.document),"function"==typeof a.config.callbacks.onMixFail&&a.config.callbacks.onMixFail.call(a.dom.container,a.state,a),n.addClass(a.dom.container,n.getClassname(a.config.classNames,"container",a.config.classNames.modifierFailed))),"function"==typeof a.userCallback&&a.userCallback.call(a.dom.container,a.state,a),"function"==typeof a.userDeferred.resolve&&a.userDeferred.resolve(a.state),a.userCallback=null,a.userDeferred=null,a.lastClicked=null,a.isToggling=!1,a.isBusy=!1,a.queue.length&&(a.callActions("beforeReadQueueCleanUp",arguments),s=a.queue.shift(),a.userDeferred=s.deferred,a.isToggling=s.isToggling,a.lastClicked=s.triggerElement,s.instruction.command instanceof e.CommandMultimix?a.multimix.apply(a,s.args):a.dataset.apply(a,s.args)),a.callActions("afterCleanUp",arguments)},parseMultimixArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandMultimix,r=0;r<t.length;r++)o=t[r],null!==o&&("object"==typeof o?n.extend(i.command,o):"boolean"==typeof o?i.animate=o:"function"==typeof o&&(i.callback=o));return!i.command.insert||i.command.insert instanceof e.CommandInsert||(i.command.insert=a.parseInsertArgs([i.command.insert]).command),!i.command.remove||i.command.remove instanceof e.CommandRemove||(i.command.remove=a.parseRemoveArgs([i.command.remove]).command),!i.command.filter||i.command.filter instanceof e.CommandFilter||(i.command.filter=a.parseFilterArgs([i.command.filter]).command),!i.command.sort||i.command.sort instanceof e.CommandSort||(i.command.sort=a.parseSortArgs([i.command.sort]).command),!i.command.changeLayout||i.command.changeLayout instanceof e.CommandChangeLayout||(i.command.changeLayout=a.parseChangeLayoutArgs([i.command.changeLayout]).command),i=a.callFilters("instructionParseMultimixArgs",i,arguments),n.freeze(i),i},parseFilterArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandFilter,r=0;r<t.length;r++)o=t[r],"string"==typeof o?i.command.selector=o:null===o?i.command.collection=[]:"object"==typeof o&&n.isElement(o,a.dom.document)?i.command.collection=[o]:"object"==typeof o&&"undefined"!=typeof o.length?i.command.collection=n.arrayFromList(o):"object"==typeof o?n.extend(i.command,o):"boolean"==typeof o?i.animate=o:"function"==typeof o&&(i.callback=o);if(i.command.selector&&i.command.collection)throw new Error(e.messages.errorFilterInvalidArguments());return i=a.callFilters("instructionParseFilterArgs",i,arguments),n.freeze(i),i},parseSortArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r="",s=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandSort,s=0;s<t.length;s++)if(o=t[s],null!==o)switch(typeof o){case"string":r=o;break;case"object":o.length&&(i.command.collection=n.arrayFromList(o));break;case"boolean":i.animate=o;break;case"function":i.callback=o}return r&&(i.command=a.parseSortString(r,i.command)),i=a.callFilters("instructionParseSortArgs",i,arguments),n.freeze(i),i},parseInsertArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandInsert,r=0;r<t.length;r++)o=t[r],null!==o&&("number"==typeof o?i.command.index=o:"string"==typeof o&&["before","after"].indexOf(o)>-1?i.command.position=o:"string"==typeof o?i.command.collection=n.arrayFromList(n.createElement(o).childNodes):"object"==typeof o&&n.isElement(o,a.dom.document)?i.command.collection.length?i.command.sibling=o:i.command.collection=[o]:"object"==typeof o&&o.length?i.command.collection.length?i.command.sibling=o[0]:i.command.collection=o:"object"==typeof o&&o.childNodes&&o.childNodes.length?i.command.collection.length?i.command.sibling=o.childNodes[0]:i.command.collection=n.arrayFromList(o.childNodes):"object"==typeof o?n.extend(i.command,o):"boolean"==typeof o?i.animate=o:"function"==typeof o&&(i.callback=o));if(i.command.index&&i.command.sibling)throw new Error(e.messages.errorInsertInvalidArguments());return!i.command.collection.length&&a.config.debug.showWarnings&&console.warn(e.messages.warningInsertNoElements()),i=a.callFilters("instructionParseInsertArgs",i,arguments),n.freeze(i),i},parseRemoveArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=null,s=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandRemove,s=0;s<t.length;s++)if(r=t[s],null!==r)switch(typeof r){case"number":a.targets[r]&&(i.command.targets[0]=a.targets[r]);break;case"string":i.command.collection=n.arrayFromList(a.dom.parent.querySelectorAll(r));break;case"object":r&&r.length?i.command.collection=r:n.isElement(r,a.dom.document)?i.command.collection=[r]:n.extend(i.command,r);break;case"boolean":i.animate=r;break;case"function":i.callback=r}if(i.command.collection.length)for(s=0;o=a.targets[s];s++)i.command.collection.indexOf(o.dom.el)>-1&&i.command.targets.push(o);return!i.command.targets.length&&a.config.debug.showWarnings&&console.warn(e.messages.warningRemoveNoElements()),n.freeze(i),i},parseDatasetArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandDataset,r=0;r<t.length;r++)if(o=t[r],null!==o)switch(typeof o){case"object":Array.isArray(o)||"number"==typeof o.length?i.command.dataset=o:n.extend(i.command,o);break;case"boolean":i.animate=o;break;case"function":i.callback=o}return n.freeze(i),i},parseChangeLayoutArgs:function(t){var a=this,i=new e.UserInstruction,o=null,r=-1;for(i.animate=a.config.animation.enable,i.command=new e.CommandChangeLayout,r=0;r<t.length;r++)if(o=t[r],null!==o)switch(typeof o){case"string":i.command.containerClassName=o;break;case"object":n.extend(i.command,o);break;case"boolean":i.animate=o;break;case"function":i.callback=o}return n.freeze(i),i},queueMix:function(t){var a=this,i=null,o="";return a.callActions("beforeQueueMix",arguments),i=n.defer(e.libraries),a.config.animation.queue&&a.queue.length<a.config.animation.queueLimit?(t.deferred=i,a.queue.push(t),a.config.controls.enable&&(a.isToggling?(a.buildToggleArray(t.instruction.command),o=a.getToggleSelector(),a.updateControls({filter:{selector:o}})):a.updateControls(t.instruction.command))):(a.config.debug.showWarnings&&console.warn(e.messages.warningMultimixInstanceQueueFull()),i.resolve(a.state),e.events.fire("mixBusy",a.dom.container,{state:a.state,instance:a},a.dom.document),"function"==typeof a.config.callbacks.onMixBusy&&a.config.callbacks.onMixBusy.call(a.dom.container,a.state,a)),a.callFilters("promiseQueueMix",i.promise,arguments)},getDataOperation:function(t){var a=this,i=new e.Operation,o=[];if(i=a.callFilters("operationUnmappedGetDataOperation",i,arguments),
18
- a.dom.targets.length&&!(o=a.state.activeDataset||[]).length)throw new Error(e.messages.errorDatasetNotSet());return i.id=n.randomHex(),i.startState=a.state,i.startDataset=o,i.newDataset=t.slice(),a.diffDatasets(i),i.startOrder=a.targets,i.newOrder=i.show,a.config.animation.enable&&(a.getStartMixData(i),a.setInter(i),i.docState=n.getDocumentState(a.dom.document),a.getInterMixData(i),a.setFinal(i),a.getFinalMixData(i),a.parseEffects(),i.hasEffect=a.hasEffect(),a.getTweenData(i)),a.targets=i.show.slice(),i.newState=a.buildState(i),Array.prototype.push.apply(a.targets,i.toRemove),i=a.callFilters("operationMappedGetDataOperation",i,arguments)},diffDatasets:function(t){var a=this,i=[],o=[],r=[],s=null,l=null,c=null,u=null,f=null,h={},d="",m=-1;for(a.callActions("beforeDiffDatasets",arguments),m=0;s=t.newDataset[m];m++){if("undefined"==typeof(d=s[a.config.data.uidKey])||d.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:a.config.data.uidKey}));if(h[d])throw new Error(e.messages.errorDatasetDuplicateUid({uid:d}));h[d]=!0,(l=a.cache[d])instanceof e.Target?(a.config.data.dirtyCheck&&!n.deepEquals(s,l.data)&&(c=l.render(s),l.data=s,c!==l.dom.el&&(l.isInDom&&(l.unbindEvents(),a.dom.parent.replaceChild(c,l.dom.el)),l.isShown||(c.style.display="none"),l.dom.el=c,l.isInDom&&l.bindEvents())),c=l.dom.el):(l=new e.Target,l.init(null,a,s),l.hide()),l.isInDom?(f=l.dom.el.nextElementSibling,o.push(d),u&&(u.lastElementChild&&u.appendChild(a.dom.document.createTextNode(" ")),a.insertDatasetFrag(u,l.dom.el,r),u=null)):(u||(u=a.dom.document.createDocumentFragment()),u.lastElementChild&&u.appendChild(a.dom.document.createTextNode(" ")),u.appendChild(l.dom.el),l.isInDom=!0,l.unbindEvents(),l.bindEvents(),l.hide(),t.toShow.push(l),r.push(l)),t.show.push(l)}for(u&&(f=f||a.config.layout.siblingAfter,f&&u.appendChild(a.dom.document.createTextNode(" ")),a.insertDatasetFrag(u,f,r)),m=0;s=t.startDataset[m];m++)d=s[a.config.data.uidKey],l=a.cache[d],t.show.indexOf(l)<0?(t.hide.push(l),t.toHide.push(l),t.toRemove.push(l)):i.push(d);n.isEqualArray(i,o)||(t.willSort=!0),a.callActions("afterDiffDatasets",arguments)},insertDatasetFrag:function(t,e,n){var a=this,i=e?Array.from(a.dom.parent.children).indexOf(e):a.targets.length;for(a.dom.parent.insertBefore(t,e);n.length;)a.targets.splice(i,0,n.shift()),i++},willSort:function(t,e){var n=this,a=!1;return a=!!(n.config.behavior.liveSort||"random"===t.order||t.attribute!==e.attribute||t.order!==e.order||t.collection!==e.collection||null===t.next&&e.next||t.next&&null===e.next)||!(!t.next||!e.next)&&n.willSort(t.next,e.next),n.callFilters("resultWillSort",a,arguments)},show:function(){var t=this;return t.filter("all")},hide:function(){var t=this;return t.filter("none")},isMixing:function(){var t=this;return t.isBusy},filter:function(){var t=this,e=t.parseFilterArgs(arguments);return t.multimix({filter:e.command},e.animate,e.callback)},toggleOn:function(){var t=this,e=t.parseFilterArgs(arguments),n=e.command.selector,a="";return t.isToggling=!0,t.toggleArray.indexOf(n)<0&&t.toggleArray.push(n),a=t.getToggleSelector(),t.multimix({filter:a},e.animate,e.callback)},toggleOff:function(){var t=this,e=t.parseFilterArgs(arguments),n=e.command.selector,a=t.toggleArray.indexOf(n),i="";return t.isToggling=!0,a>-1&&t.toggleArray.splice(a,1),i=t.getToggleSelector(),t.multimix({filter:i},e.animate,e.callback)},sort:function(){var t=this,e=t.parseSortArgs(arguments);return t.multimix({sort:e.command},e.animate,e.callback)},changeLayout:function(){var t=this,e=t.parseChangeLayoutArgs(arguments);return t.multimix({changeLayout:e.command},e.animate,e.callback)},dataset:function(){var t=this,n=t.parseDatasetArgs(arguments),a=null,i=null,o=!1;return t.callActions("beforeDataset",arguments),t.isBusy?(i=new e.QueueItem,i.args=arguments,i.instruction=n,t.queueMix(i)):(n.callback&&(t.userCallback=n.callback),o=n.animate^t.config.animation.enable?n.animate:t.config.animation.enable,a=t.getDataOperation(n.command.dataset),t.goMix(o,a))},multimix:function(){var t=this,n=null,a=!1,i=null,o=t.parseMultimixArgs(arguments);return t.callActions("beforeMultimix",arguments),t.isBusy?(i=new e.QueueItem,i.args=arguments,i.instruction=o,i.triggerElement=t.lastClicked,i.isToggling=t.isToggling,t.queueMix(i)):(n=t.getOperation(o.command),t.config.controls.enable&&(o.command.filter&&!t.isToggling&&(t.toggleArray.length=0,t.buildToggleArray(n.command)),t.queue.length<1&&t.updateControls(n.command)),o.callback&&(t.userCallback=o.callback),a=o.animate^t.config.animation.enable?o.animate:t.config.animation.enable,t.callFilters("operationMultimix",n,arguments),t.goMix(a,n))},getOperation:function(t){var a=this,i=t.sort,o=t.filter,r=t.changeLayout,s=t.remove,l=t.insert,c=new e.Operation;return c=a.callFilters("operationUnmappedGetOperation",c,arguments),c.id=n.randomHex(),c.command=t,c.startState=a.state,c.triggerElement=a.lastClicked,a.isBusy?(a.config.debug.showWarnings&&console.warn(e.messages.warningGetOperationInstanceBusy()),null):(l&&a.insertTargets(l,c),s&&(c.toRemove=s.targets),c.startSort=c.newSort=c.startState.activeSort,c.startOrder=c.newOrder=a.targets,i&&(c.startSort=c.startState.activeSort,c.newSort=i,c.willSort=a.willSort(i,c.startState.activeSort),c.willSort&&a.sortOperation(c)),c.startFilter=c.startState.activeFilter,o?c.newFilter=o:c.newFilter=n.extend(new e.CommandFilter,c.startFilter),"all"===c.newFilter.selector?c.newFilter.selector=a.config.selectors.target:"none"===c.newFilter.selector&&(c.newFilter.selector=""),a.filterOperation(c),c.startContainerClassName=c.startState.activeContainerClassName,r?(c.newContainerClassName=r.containerClassName,c.newContainerClassName!==c.startContainerClassName&&(c.willChangeLayout=!0)):c.newContainerClassName=c.startContainerClassName,a.config.animation.enable&&(a.getStartMixData(c),a.setInter(c),c.docState=n.getDocumentState(a.dom.document),a.getInterMixData(c),a.setFinal(c),a.getFinalMixData(c),a.parseEffects(),c.hasEffect=a.hasEffect(),a.getTweenData(c)),c.willSort&&(a.targets=c.newOrder),c.newState=a.buildState(c),a.callFilters("operationMappedGetOperation",c,arguments))},tween:function(t,e){var n=null,a=null,i=-1,o=-1;for(e=Math.min(e,1),e=Math.max(e,0),o=0;n=t.show[o];o++)a=t.showPosData[o],n.applyTween(a,e);for(o=0;n=t.hide[o];o++)n.isShown&&n.hide(),(i=t.toHide.indexOf(n))>-1&&(a=t.toHidePosData[i],n.isShown||n.show(),n.applyTween(a,e))},insert:function(){var t=this,e=t.parseInsertArgs(arguments);return t.multimix({insert:e.command},e.animate,e.callback)},insertBefore:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(e.command.collection,"before",e.command.sibling,e.animate,e.callback)},insertAfter:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(e.command.collection,"after",e.command.sibling,e.animate,e.callback)},prepend:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(0,e.command.collection,e.animate,e.callback)},append:function(){var t=this,e=t.parseInsertArgs(arguments);return t.insert(t.state.totalTargets,e.command.collection,e.animate,e.callback)},remove:function(){var t=this,e=t.parseRemoveArgs(arguments);return t.multimix({remove:e.command},e.animate,e.callback)},getConfig:function(t){var e=this,a=null;return a=t?n.getProperty(e.config,t):e.config,e.callFilters("valueGetConfig",a,arguments)},configure:function(t){var e=this;e.callActions("beforeConfigure",arguments),n.extend(e.config,t,!0,!0),e.callActions("afterConfigure",arguments)},getState:function(){var t=this,a=null;return a=new e.State,n.extend(a,t.state),n.freeze(a),t.callFilters("stateGetState",a,arguments)},forceRefresh:function(){var t=this;t.indexTargets()},forceRender:function(){var t=this,e=null,n=null,a="";for(a in t.cache)e=t.cache[a],n=e.render(e.data),n!==e.dom.el&&(e.isInDom&&(e.unbindEvents(),t.dom.parent.replaceChild(n,e.dom.el)),e.isShown||(n.style.display="none"),e.dom.el=n,e.isInDom&&e.bindEvents());t.state=t.buildState(t.lastOperation)},destroy:function(t){var n=this,a=null,i=null,o=0;for(n.callActions("beforeDestroy",arguments),o=0;a=n.controls[o];o++)a.removeBinding(n);for(o=0;i=n.targets[o];o++)t&&i.show(),i.unbindEvents();n.dom.container.id.match(/^MixItUp/)&&n.dom.container.removeAttribute("id"),delete e.instances[n.id],n.callActions("afterDestroy",arguments)}}),e.IMoveData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.posIn=null,this.posOut=null,this.operation=null,this.callback=null,this.statusChange="",this.duration=-1,this.staggerIndex=-1,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.IMoveData),e.IMoveData.prototype=Object.create(e.Base.prototype),e.IMoveData.prototype.constructor=e.IMoveData,e.TargetDom=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.el=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.TargetDom),e.TargetDom.prototype=Object.create(e.Base.prototype),e.TargetDom.prototype.constructor=e.TargetDom,e.Target=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.sortString="",this.mixer=null,this.callback=null,this.isShown=!1,this.isBound=!1,this.isExcluded=!1,this.isInDom=!1,this.handler=null,this.operation=null,this.data=null,this.dom=new e.TargetDom,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Target),e.Target.prototype=Object.create(e.Base.prototype),n.extend(e.Target.prototype,{constructor:e.Target,init:function(t,n,a){var i=this,o="";if(i.callActions("beforeInit",arguments),i.mixer=n,t||(t=i.render(a)),i.cacheDom(t),i.bindEvents(),"none"!==i.dom.el.style.display&&(i.isShown=!0),a&&n.config.data.uidKey){if("undefined"==typeof(o=a[n.config.data.uidKey])||o.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:n.config.data.uidKey}));i.id=o,i.data=a,n.cache[o]=i}i.callActions("afterInit",arguments)},render:function(t){var a=this,i=null,o=null,r=null,s="";if(a.callActions("beforeRender",arguments),i=a.callFilters("renderRender",a.mixer.config.render.target,arguments),"function"!=typeof i)throw new TypeError(e.messages.errorDatasetRendererNotSet());return s=i(t),s&&"object"==typeof s&&n.isElement(s)?o=s:"string"==typeof s&&(r=document.createElement("div"),r.innerHTML=s,o=r.firstElementChild),a.callFilters("elRender",o,arguments)},cacheDom:function(t){var e=this;e.callActions("beforeCacheDom",arguments),e.dom.el=t,e.callActions("afterCacheDom",arguments)},getSortString:function(t){var e=this,n=e.dom.el.getAttribute("data-"+t)||"";e.callActions("beforeGetSortString",arguments),n=isNaN(1*n)?n.toLowerCase():1*n,e.sortString=n,e.callActions("afterGetSortString",arguments)},show:function(){var t=this;t.callActions("beforeShow",arguments),t.isShown||(t.dom.el.style.display="",t.isShown=!0),t.callActions("afterShow",arguments)},hide:function(){var t=this;t.callActions("beforeHide",arguments),t.isShown&&(t.dom.el.style.display="none",t.isShown=!1),t.callActions("afterHide",arguments)},move:function(t){var e=this;e.callActions("beforeMove",arguments),e.isExcluded||e.mixer.targetsMoved++,e.applyStylesIn(t),requestAnimationFrame(function(){e.applyStylesOut(t)}),e.callActions("afterMove",arguments)},applyTween:function(t,n){var a=this,i="",o=null,r=t.posIn,s=[],l=new e.StyleData,c=-1;for(a.callActions("beforeApplyTween",arguments),l.x=r.x,l.y=r.y,0===n?a.hide():a.isShown||a.show(),c=0;i=e.features.TWEENABLE[c];c++)if(o=t.tweenData[i],"x"===i){if(!o)continue;l.x=r.x+o*n}else if("y"===i){if(!o)continue;l.y=r.y+o*n}else if(o instanceof e.TransformData){if(!o.value)continue;l[i].value=r[i].value+o.value*n,l[i].unit=o.unit,s.push(i+"("+l[i].value+o.unit+")")}else{if(!o)continue;l[i]=r[i]+o*n,a.dom.el.style[i]=l[i]}(l.x||l.y)&&s.unshift("translate("+l.x+"px, "+l.y+"px)"),s.length&&(a.dom.el.style[e.features.transformProp]=s.join(" ")),a.callActions("afterApplyTween",arguments)},applyStylesIn:function(t){var n=this,a=t.posIn,i=1!==n.mixer.effectsIn.opacity,o=[];n.callActions("beforeApplyStylesIn",arguments),o.push("translate("+a.x+"px, "+a.y+"px)"),n.mixer.config.animation.animateResizeTargets&&("show"!==t.statusChange&&(n.dom.el.style.width=a.width+"px",n.dom.el.style.height=a.height+"px"),n.dom.el.style.marginRight=a.marginRight+"px",n.dom.el.style.marginBottom=a.marginBottom+"px"),i&&(n.dom.el.style.opacity=a.opacity),"show"===t.statusChange&&(o=o.concat(n.mixer.transformIn)),n.dom.el.style[e.features.transformProp]=o.join(" "),n.callActions("afterApplyStylesIn",arguments)},applyStylesOut:function(t){var n=this,a=[],i=[],o=n.mixer.config.animation.animateResizeTargets,r="undefined"!=typeof n.mixer.effectsIn.opacity;if(n.callActions("beforeApplyStylesOut",arguments),a.push(n.writeTransitionRule(e.features.transformRule,t.staggerIndex)),"none"!==t.statusChange&&a.push(n.writeTransitionRule("opacity",t.staggerIndex,t.duration)),o&&(a.push(n.writeTransitionRule("width",t.staggerIndex,t.duration)),a.push(n.writeTransitionRule("height",t.staggerIndex,t.duration)),a.push(n.writeTransitionRule("margin",t.staggerIndex,t.duration))),!t.callback)return n.mixer.targetsImmovable++,void(n.mixer.targetsMoved===n.mixer.targetsImmovable&&n.mixer.cleanUp(t.operation));switch(n.operation=t.operation,n.callback=t.callback,!n.isExcluded&&n.mixer.targetsBound++,n.isBound=!0,n.applyTransition(a),o&&t.posOut.width>0&&t.posOut.height>0&&(n.dom.el.style.width=t.posOut.width+"px",n.dom.el.style.height=t.posOut.height+"px",n.dom.el.style.marginRight=t.posOut.marginRight+"px",n.dom.el.style.marginBottom=t.posOut.marginBottom+"px"),n.mixer.config.animation.nudge||"hide"!==t.statusChange||i.push("translate("+t.posOut.x+"px, "+t.posOut.y+"px)"),t.statusChange){case"hide":r&&(n.dom.el.style.opacity=n.mixer.effectsOut.opacity),i=i.concat(n.mixer.transformOut);break;case"show":r&&(n.dom.el.style.opacity=1)}(n.mixer.config.animation.nudge||!n.mixer.config.animation.nudge&&"hide"!==t.statusChange)&&i.push("translate("+t.posOut.x+"px, "+t.posOut.y+"px)"),n.dom.el.style[e.features.transformProp]=i.join(" "),n.callActions("afterApplyStylesOut",arguments)},writeTransitionRule:function(t,e,n){var a=this,i=a.getDelay(e),o="";return o=t+" "+(n>0?n:a.mixer.config.animation.duration)+"ms "+i+"ms "+("opacity"===t?"linear":a.mixer.config.animation.easing),a.callFilters("ruleWriteTransitionRule",o,arguments)},getDelay:function(t){var e=this,n=-1;return"function"==typeof e.mixer.config.animation.staggerSequence&&(t=e.mixer.config.animation.staggerSequence.call(e,t,e.state)),n=e.mixer.staggerDuration?t*e.mixer.staggerDuration:0,e.callFilters("delayGetDelay",n,arguments)},applyTransition:function(t){var n=this,a=t.join(", ");n.callActions("beforeApplyTransition",arguments),n.dom.el.style[e.features.transitionProp]=a,n.callActions("afterApplyTransition",arguments)},handleTransitionEnd:function(t){var e=this,n=t.propertyName,a=e.mixer.config.animation.animateResizeTargets;e.callActions("beforeHandleTransitionEnd",arguments),e.isBound&&t.target.matches(e.mixer.config.selectors.target)&&(n.indexOf("transform")>-1||n.indexOf("opacity")>-1||a&&n.indexOf("height")>-1||a&&n.indexOf("width")>-1||a&&n.indexOf("margin")>-1)&&(e.callback.call(e,e.operation),e.isBound=!1,e.callback=null,e.operation=null),e.callActions("afterHandleTransitionEnd",arguments)},eventBus:function(t){var e=this;switch(e.callActions("beforeEventBus",arguments),t.type){case"webkitTransitionEnd":case"transitionend":e.handleTransitionEnd(t)}e.callActions("afterEventBus",arguments)},unbindEvents:function(){var t=this;t.callActions("beforeUnbindEvents",arguments),n.off(t.dom.el,"webkitTransitionEnd",t.handler),n.off(t.dom.el,"transitionend",t.handler),t.callActions("afterUnbindEvents",arguments)},bindEvents:function(){var t=this,a="";t.callActions("beforeBindEvents",arguments),a="webkit"===e.features.transitionPrefix?"webkitTransitionEnd":"transitionend",t.handler=function(e){return t.eventBus(e)},n.on(t.dom.el,a,t.handler),t.callActions("afterBindEvents",arguments)},getPosData:function(n){var a=this,i={},o=null,r=new e.StyleData;return a.callActions("beforeGetPosData",arguments),r.x=a.dom.el.offsetLeft,r.y=a.dom.el.offsetTop,(a.mixer.config.animation.animateResizeTargets||n)&&(o=a.dom.el.getBoundingClientRect(),r.top=o.top,r.right=o.right,r.bottom=o.bottom,r.left=o.left,r.width=o.width,r.height=o.height),a.mixer.config.animation.animateResizeTargets&&(i=t.getComputedStyle(a.dom.el),r.marginBottom=parseFloat(i.marginBottom),r.marginRight=parseFloat(i.marginRight)),a.callFilters("posDataGetPosData",r,arguments)},cleanUp:function(){var t=this;t.callActions("beforeCleanUp",arguments),t.dom.el.style[e.features.transformProp]="",t.dom.el.style[e.features.transitionProp]="",t.dom.el.style.opacity="",t.mixer.config.animation.animateResizeTargets&&(t.dom.el.style.width="",t.dom.el.style.height="",t.dom.el.style.marginRight="",t.dom.el.style.marginBottom=""),t.callActions("afterCleanUp",arguments)}}),e.Collection=function(t){var e=null,a=-1;for(this.callActions("beforeConstruct"),a=0;e=t[a];a++)this[a]=e;this.length=t.length,this.callActions("afterConstruct"),n.freeze(this)},e.BaseStatic.call(e.Collection),e.Collection.prototype=Object.create(e.Base.prototype),n.extend(e.Collection.prototype,{constructor:e.Collection,mixitup:function(t){var a=this,i=null,o=Array.prototype.slice.call(arguments),r=[],s=-1;for(this.callActions("beforeMixitup"),o.shift(),s=0;i=a[s];s++)r.push(i[t].apply(i,o));return a.callFilters("promiseMixitup",n.all(r,e.libraries),arguments)}}),e.Operation=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.args=[],this.command=null,this.showPosData=[],this.toHidePosData=[],this.startState=null,this.newState=null,this.docState=null,this.willSort=!1,this.willChangeLayout=!1,this.hasEffect=!1,this.hasFailed=!1,this.triggerElement=null,this.show=[],this.hide=[],this.matching=[],this.toShow=[],this.toHide=[],this.toMove=[],this.toRemove=[],this.startOrder=[],this.newOrder=[],this.startSort=null,this.newSort=null,this.startFilter=null,this.newFilter=null,this.startDataset=null,this.newDataset=null,this.viewportDeltaX=0,this.viewportDeltaY=0,this.startX=0,this.startY=0,this.startHeight=0,this.startWidth=0,this.newX=0,this.newY=0,this.newHeight=0,this.newWidth=0,this.startContainerClassName="",this.startDisplay="",this.newContainerClassName="",this.newDisplay="",this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Operation),e.Operation.prototype=Object.create(e.Base.prototype),e.Operation.prototype.constructor=e.Operation,e.State=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.activeFilter=null,this.activeSort=null,this.activeContainerClassName="",this.container=null,this.targets=[],this.hide=[],this.show=[],this.matching=[],this.totalTargets=-1,this.totalShow=-1,this.totalHide=-1,this.totalMatching=-1,this.hasFailed=!1,this.triggerElement=null,this.activeDataset=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.State),e.State.prototype=Object.create(e.Base.prototype),e.State.prototype.constructor=e.State,e.UserInstruction=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.command={},this.animate=!1,this.callback=null,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.UserInstruction),e.UserInstruction.prototype=Object.create(e.Base.prototype),e.UserInstruction.prototype.constructor=e.UserInstruction,e.Messages=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.ERROR_FACTORY_INVALID_CONTAINER="[MixItUp] An invalid selector or element reference was passed to the mixitup factory function",this.ERROR_FACTORY_CONTAINER_NOT_FOUND="[MixItUp] The provided selector yielded no container element",this.ERROR_CONFIG_INVALID_ANIMATION_EFFECTS="[MixItUp] Invalid value for `animation.effects`",this.ERROR_CONFIG_INVALID_CONTROLS_SCOPE="[MixItUp] Invalid value for `controls.scope`",this.ERROR_CONFIG_INVALID_PROPERTY='[MixitUp] Invalid configuration object property "${erroneous}"${suggestion}',this.ERROR_CONFIG_INVALID_PROPERTY_SUGGESTION='. Did you mean "${probableMatch}"?',this.ERROR_CONFIG_DATA_UID_KEY_NOT_SET="[MixItUp] To use the dataset API, a UID key must be specified using `data.uidKey`",this.ERROR_DATASET_INVALID_UID_KEY='[MixItUp] The specified UID key "${uidKey}" is not present on one or more dataset items',this.ERROR_DATASET_DUPLICATE_UID='[MixItUp] The UID "${uid}" was found on two or more dataset items. UIDs must be unique.',this.ERROR_INSERT_INVALID_ARGUMENTS="[MixItUp] Please provider either an index or a sibling and position to insert, not both",this.ERROR_INSERT_PREEXISTING_ELEMENT="[MixItUp] An element to be inserted already exists in the container",this.ERROR_FILTER_INVALID_ARGUMENTS="[MixItUp] Please provide either a selector or collection `.filter()`, not both",this.ERROR_DATASET_NOT_SET="[MixItUp] To use the dataset API with pre-rendered targets, a starting dataset must be set using `load.dataset`",this.ERROR_DATASET_PRERENDERED_MISMATCH="[MixItUp] `load.dataset` does not match pre-rendered targets",this.ERROR_DATASET_RENDERER_NOT_SET="[MixItUp] To insert an element via the dataset API, a target renderer function must be provided to `render.target`",this.WARNING_FACTORY_PREEXISTING_INSTANCE="[MixItUp] WARNING: This element already has an active MixItUp instance. The provided configuration object will be ignored. If you wish to perform additional methods on this instance, please create a reference.",this.WARNING_INSERT_NO_ELEMENTS="[MixItUp] WARNING: No valid elements were passed to `.insert()`",this.WARNING_REMOVE_NO_ELEMENTS="[MixItUp] WARNING: No valid elements were passed to `.remove()`",this.WARNING_MULTIMIX_INSTANCE_QUEUE_FULL="[MixItUp] WARNING: An operation was requested but the MixItUp instance was busy. The operation was rejected because the queue is full or queuing is disabled.",this.WARNING_GET_OPERATION_INSTANCE_BUSY="[MixItUp] WARNING: Operations can be be created while the MixItUp instance is busy.",this.WARNING_NO_PROMISE_IMPLEMENTATION="[MixItUp] WARNING: No Promise implementations could be found. If you wish to use promises with MixItUp please install an ES6 Promise polyfill.",this.WARNING_INCONSISTENT_SORTING_ATTRIBUTES='[MixItUp] WARNING: The requested sorting data attribute "${attribute}" was not present on one or more target elements which may product unexpected sort output',this.callActions("afterConstruct"),this.compileTemplates(),n.seal(this)},e.BaseStatic.call(e.Messages),e.Messages.prototype=Object.create(e.Base.prototype),e.Messages.prototype.constructor=e.Messages,e.Messages.prototype.compileTemplates=function(){var t="",e="";for(t in this)"string"==typeof(e=this[t])&&(this[n.camelCase(t)]=n.template(e))},e.messages=new e.Messages,e.Facade=function(t){e.Base.call(this),this.callActions("beforeConstruct",arguments),this.configure=t.configure.bind(t),this.show=t.show.bind(t),this.hide=t.hide.bind(t),this.filter=t.filter.bind(t),this.toggleOn=t.toggleOn.bind(t),this.toggleOff=t.toggleOff.bind(t),this.sort=t.sort.bind(t),this.changeLayout=t.changeLayout.bind(t),this.multimix=t.multimix.bind(t),this.dataset=t.dataset.bind(t),this.tween=t.tween.bind(t),this.insert=t.insert.bind(t),this.insertBefore=t.insertBefore.bind(t),this.insertAfter=t.insertAfter.bind(t),this.prepend=t.prepend.bind(t),this.append=t.append.bind(t),this.remove=t.remove.bind(t),this.destroy=t.destroy.bind(t),this.forceRefresh=t.forceRefresh.bind(t),this.forceRender=t.forceRender.bind(t),this.isMixing=t.isMixing.bind(t),this.getOperation=t.getOperation.bind(t),this.getConfig=t.getConfig.bind(t),this.getState=t.getState.bind(t),this.callActions("afterConstruct",arguments),n.freeze(this),n.seal(this)},e.BaseStatic.call(e.Facade),e.Facade.prototype=Object.create(e.Base.prototype),e.Facade.prototype.constructor=e.Facade,"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):"undefined"!=typeof t.mixitup&&"function"==typeof t.mixitup||(t.mixitup=e),e.BaseStatic.call(e.constructor),e.NAME="mixitup",e.CORE_VERSION="3.3.0"}(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/lib/modal.js CHANGED
@@ -357,4 +357,4 @@ if (typeof jQuery === 'undefined') {
357
  Plugin.call($target, option, this)
358
  })
359
 
360
- }(jQuery);
357
  Plugin.call($target, option, this)
358
  })
359
 
360
+ }(jQuery);
assets/js/premium-addons.js CHANGED
@@ -1,5 +1,4 @@
1
  (function($){
2
-
3
  //Premium Progress Bar Handler
4
  var PremiumProgressBarWidgetHandler = function ($scope,$){
5
  var progressbarElement = $scope.find('.premium-progressbar-progress-bar').each(function(){
@@ -11,7 +10,6 @@
11
  $(this).animate({width: length + '%'} , length * 25);
12
  });
13
  };
14
-
15
  //Premium Progress Bar on Scroll Handler
16
  var PremiumProgressBarScrollWidgetHandler = function ($scope,$){
17
  $scope.waypoint(function (direction) {
@@ -21,7 +19,6 @@
21
  triggerOnce: true
22
  });
23
  };
24
-
25
  //Premium Video Box Handler
26
  var PremiumVideoBoxWidgetHandler = function($scope,$){
27
  var videoBoxElement = $scope.find('.premium-video-box-container');
@@ -36,7 +33,6 @@
36
  },600);
37
  });
38
  };
39
-
40
  //Premium Grid Handler
41
  var PremiumGridWidgetHandler = function($scope,$){
42
  if ($().isotope === undefined) {
@@ -99,7 +95,6 @@
99
  social_tools: ''
100
  });
101
  };
102
-
103
  //Premium Counter Handler
104
  var PremiumCounterHandler = function($scope,$){
105
  var counterElement = $scope.find('.premium-counter').each(function(){
@@ -157,8 +152,7 @@
157
  });
158
  });
159
  };
160
-
161
- //Premium Fancy Text Handler
162
  var PremiumFancyTextHandler = function($scope,$){
163
  var fancyTextElement = $scope.find('.premium-fancy-text-wrapper');
164
  var fancyTextSettings = fancyTextElement.data('settings');
@@ -195,7 +189,7 @@
195
  });
196
  }
197
  };
198
- //Premium Countdown Handler
199
  var PremiumCountDownHandler = function ($scope,$){
200
  var countDownElement = $scope.find('.premium-countdown').each(function(){
201
  var countDownSettings = $(this).data('settings');
@@ -205,11 +199,11 @@
205
  newLabe2 = label2.split(',');
206
  if(countDownSettings['event'] === 'onExpiry'){
207
  $(this).find('.premium-countdown-init').pre_countdown({
208
- labels : newLabe2,
209
- labels1 : newLabe1,
210
- until : new Date( countDownSettings['until'] ),
211
- format : countDownSettings['format'],
212
- padZeroes : true,
213
  onExpiry : function() {
214
  $(this).html(countDownSettings['text']);
215
  },
@@ -217,11 +211,11 @@
217
  });
218
  } else if(countDownSettings['event'] === 'expiryUrl') {
219
  $(this).find('.premium-countdown-init').pre_countdown({
220
- labels : newLabe2,
221
- labels1 : newLabe1,
222
- until : new Date( countDownSettings['until'] ),
223
- format : countDownSettings['format'],
224
- padZeroes : true,
225
  expiryUrl : countDownSettings['text'],
226
  serverSync : function() { return new Date(countDownSettings['serverSync']); }
227
  });
@@ -241,17 +235,18 @@
241
  } else {
242
  window.location.href = countDownSettings['text'];
243
  }
244
- }
245
  }
246
  });
247
  };
248
-
249
  //Premium Carousel Handler
250
  var PremiumCarouselHandler = function ($scope,$){
251
  var carouselElement = $scope.find('.premium-carousel-wrapper').each(function(){
252
  var carouselSettings = $(this).data('settings');
 
253
  function slideToShow( slick ) {
254
  slidesToShow = slick.options.slidesToShow;
 
255
  windowWidth = jQuery( window ).width();
256
  if ( windowWidth < 1025 ) {
257
  slidesToShow = carouselSettings['slidesDesk'];
@@ -324,12 +319,12 @@
324
  var maxHeight = -1;
325
  $('.slick-slide').each(function() {
326
  if ($(this).height() > maxHeight) {
327
- maxHeight = $(this).height();
328
  }
329
  });
330
  $('.slick-slide').each(function() {
331
  if ($(this).height() < maxHeight) {
332
- $(this).css('margin', Math.ceil((maxHeight-$(this).height())/2) + 'px 0');
333
  }
334
  });
335
  }
@@ -352,7 +347,6 @@
352
  marginFix.setWidth('horizontal');
353
  });
354
  };
355
-
356
  //Premium Banner Handler
357
  var PremiumBannerHandler = function ($scope,$){
358
  var bannerElement = $scope.find('.premium_banner');
@@ -364,7 +358,6 @@
364
  $(this).find('.premium_addons-banner-ib-img').removeClass('active');
365
  });
366
  };
367
-
368
  //Premium Modal Box Handler
369
  var PremiumModalBoxHandler = function ($scope,$){
370
  var modalBoxElement = $scope.find('.premium-modal-box-container');
@@ -377,10 +370,10 @@
377
  });
378
  }
379
  };
380
- //Premium Blog Handler
381
  var PremiumBlogHandler = function ($scope,$){
382
  var blogElement = $scope.find('.premium-blog-wrap'),
383
- masonryBlog = blogElement.data('masonry');
384
  if ( masonryBlog ) {
385
  blogElement.imagesLoaded(function(){
386
  blogElement.isotope({
@@ -395,8 +388,6 @@
395
  });
396
  }
397
  };
398
-
399
-
400
 
401
  //Elementor JS Hooks
402
  $(window).on('elementor/frontend/init', function () {
@@ -408,11 +399,11 @@
408
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-carousel-widget.default',PremiumCarouselHandler);
409
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-banner.default',PremiumBannerHandler);
410
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-modal-box.default',PremiumModalBoxHandler);
411
- elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-blog.default',PremiumBlogHandler);
412
  if(elementorFrontend.isEditMode()){
413
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarWidgetHandler);
414
  } else {
415
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarScrollWidgetHandler);
416
  }
417
  });
418
- })(jQuery);
1
  (function($){
 
2
  //Premium Progress Bar Handler
3
  var PremiumProgressBarWidgetHandler = function ($scope,$){
4
  var progressbarElement = $scope.find('.premium-progressbar-progress-bar').each(function(){
10
  $(this).animate({width: length + '%'} , length * 25);
11
  });
12
  };
 
13
  //Premium Progress Bar on Scroll Handler
14
  var PremiumProgressBarScrollWidgetHandler = function ($scope,$){
15
  $scope.waypoint(function (direction) {
19
  triggerOnce: true
20
  });
21
  };
 
22
  //Premium Video Box Handler
23
  var PremiumVideoBoxWidgetHandler = function($scope,$){
24
  var videoBoxElement = $scope.find('.premium-video-box-container');
33
  },600);
34
  });
35
  };
 
36
  //Premium Grid Handler
37
  var PremiumGridWidgetHandler = function($scope,$){
38
  if ($().isotope === undefined) {
95
  social_tools: ''
96
  });
97
  };
 
98
  //Premium Counter Handler
99
  var PremiumCounterHandler = function($scope,$){
100
  var counterElement = $scope.find('.premium-counter').each(function(){
152
  });
153
  });
154
  };
155
+ //Premium Fancy Text Handler
 
156
  var PremiumFancyTextHandler = function($scope,$){
157
  var fancyTextElement = $scope.find('.premium-fancy-text-wrapper');
158
  var fancyTextSettings = fancyTextElement.data('settings');
189
  });
190
  }
191
  };
192
+ //Premium Countdown Handler
193
  var PremiumCountDownHandler = function ($scope,$){
194
  var countDownElement = $scope.find('.premium-countdown').each(function(){
195
  var countDownSettings = $(this).data('settings');
199
  newLabe2 = label2.split(',');
200
  if(countDownSettings['event'] === 'onExpiry'){
201
  $(this).find('.premium-countdown-init').pre_countdown({
202
+ labels : newLabe2,
203
+ labels1 : newLabe1,
204
+ until : new Date( countDownSettings['until'] ),
205
+ format : countDownSettings['format'],
206
+ padZeroes : true,
207
  onExpiry : function() {
208
  $(this).html(countDownSettings['text']);
209
  },
211
  });
212
  } else if(countDownSettings['event'] === 'expiryUrl') {
213
  $(this).find('.premium-countdown-init').pre_countdown({
214
+ labels : newLabe2,
215
+ labels1 : newLabe1,
216
+ until : new Date( countDownSettings['until'] ),
217
+ format : countDownSettings['format'],
218
+ padZeroes : true,
219
  expiryUrl : countDownSettings['text'],
220
  serverSync : function() { return new Date(countDownSettings['serverSync']); }
221
  });
235
  } else {
236
  window.location.href = countDownSettings['text'];
237
  }
238
+ }
239
  }
240
  });
241
  };
 
242
  //Premium Carousel Handler
243
  var PremiumCarouselHandler = function ($scope,$){
244
  var carouselElement = $scope.find('.premium-carousel-wrapper').each(function(){
245
  var carouselSettings = $(this).data('settings');
246
+ console.log(carouselSettings['responsive']);
247
  function slideToShow( slick ) {
248
  slidesToShow = slick.options.slidesToShow;
249
+
250
  windowWidth = jQuery( window ).width();
251
  if ( windowWidth < 1025 ) {
252
  slidesToShow = carouselSettings['slidesDesk'];
319
  var maxHeight = -1;
320
  $('.slick-slide').each(function() {
321
  if ($(this).height() > maxHeight) {
322
+ maxHeight = $(this).height();
323
  }
324
  });
325
  $('.slick-slide').each(function() {
326
  if ($(this).height() < maxHeight) {
327
+ $(this).css('margin', Math.ceil((maxHeight-$(this).height())/2) + 'px 0');
328
  }
329
  });
330
  }
347
  marginFix.setWidth('horizontal');
348
  });
349
  };
 
350
  //Premium Banner Handler
351
  var PremiumBannerHandler = function ($scope,$){
352
  var bannerElement = $scope.find('.premium_banner');
358
  $(this).find('.premium_addons-banner-ib-img').removeClass('active');
359
  });
360
  };
 
361
  //Premium Modal Box Handler
362
  var PremiumModalBoxHandler = function ($scope,$){
363
  var modalBoxElement = $scope.find('.premium-modal-box-container');
370
  });
371
  }
372
  };
373
+ //Premium Blog Handler
374
  var PremiumBlogHandler = function ($scope,$){
375
  var blogElement = $scope.find('.premium-blog-wrap'),
376
+ masonryBlog = blogElement.data('pa-masonry');
377
  if ( masonryBlog ) {
378
  blogElement.imagesLoaded(function(){
379
  blogElement.isotope({
388
  });
389
  }
390
  };
 
 
391
 
392
  //Elementor JS Hooks
393
  $(window).on('elementor/frontend/init', function () {
399
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-carousel-widget.default',PremiumCarouselHandler);
400
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-banner.default',PremiumBannerHandler);
401
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-modal-box.default',PremiumModalBoxHandler);
402
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-blog.default',PremiumBlogHandler);
403
  if(elementorFrontend.isEditMode()){
404
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarWidgetHandler);
405
  } else {
406
  elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarScrollWidgetHandler);
407
  }
408
  });
409
+ })(jQuery);
elementor-helper.php CHANGED
@@ -53,13 +53,13 @@ class premium_Template_Tags {
53
  unset( $post_types[$post_type_not] );
54
  }
55
  $post_type = array_values( $post_types );
 
56
 
57
  $all_posts = get_posts( array(
58
- 'posts_per_page' => -1,
59
- 'post_type' => $post_type
60
  )
61
  );
62
-
63
  if( !empty( $all_posts ) && !is_wp_error( $all_posts ) ) {
64
  foreach ( $all_posts as $post ) {
65
  $this->options[ $post->ID ] = strlen( $post->post_title ) > 20 ? substr( $post->post_title, 0, 20 ).'...' : $post->post_title;
@@ -73,13 +73,13 @@ class premium_Template_Tags {
73
  'post_type' => 'elementor_library',
74
  'showposts' => 999,
75
  ));
76
-
77
  if ( ! empty( $pagelist ) && ! is_wp_error( $pagelist ) ){
78
  foreach ( $pagelist as $post ) {
79
  $options[ $post->ID ] = __( $post->post_title, 'premium-addons-for-elementor' );
80
  }
81
- update_option( 'temp_count', $options );
82
- return $options;
83
  }
84
  }
85
  }
53
  unset( $post_types[$post_type_not] );
54
  }
55
  $post_type = array_values( $post_types );
56
+
57
 
58
  $all_posts = get_posts( array(
59
+ 'posts_per_page' => -1,
60
+ 'post_type' => $post_type,
61
  )
62
  );
 
63
  if( !empty( $all_posts ) && !is_wp_error( $all_posts ) ) {
64
  foreach ( $all_posts as $post ) {
65
  $this->options[ $post->ID ] = strlen( $post->post_title ) > 20 ? substr( $post->post_title, 0, 20 ).'...' : $post->post_title;
73
  'post_type' => 'elementor_library',
74
  'showposts' => 999,
75
  ));
76
+
77
  if ( ! empty( $pagelist ) && ! is_wp_error( $pagelist ) ){
78
  foreach ( $pagelist as $post ) {
79
  $options[ $post->ID ] = __( $post->post_title, 'premium-addons-for-elementor' );
80
  }
81
+ update_option( 'temp_count', $options );
82
+ return $options;
83
  }
84
  }
85
  }
includes/beta-testers.php CHANGED
@@ -48,7 +48,7 @@ class PA_Beta_Testers {
48
  return $transient;
49
  }
50
  public function __construct() {
51
- $check_component_active = isset(get_option( 'pa_save_settings' )['is-beta-tester']) ? get_option( 'pa_save_settings' )['is-beta-tester'] : 1;
52
  if ( 0 !== $check_component_active ) {
53
  return;
54
  }
48
  return $transient;
49
  }
50
  public function __construct() {
51
+ $check_component_active = isset(get_option( 'pa_beta_save_settings' )['is-beta-tester']) ? get_option( 'pa_beta_save_settings' )['is-beta-tester'] : 1;
52
  if ( 0 !== $check_component_active ) {
53
  return;
54
  }
includes/helper-functions.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PremiumAddons;
4
+
5
+ if(!defined('ABSPATH')) exit;
6
+
7
+ class Helper_Functions {
8
+
9
+ public static function is_show_rate(){
10
+
11
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
12
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-rate'])){
13
+ $show_rate = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-rate'];
14
+ }
15
+ }
16
+
17
+ return isset( $show_rate ) ? $show_rate : false;
18
+ }
19
+
20
+ public static function is_show_about(){
21
+
22
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
23
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-about'])){
24
+ $show_about = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-about'];
25
+ }
26
+ }
27
+
28
+ return isset( $show_about ) ? $show_about : false;
29
+ }
30
+
31
+ public static function is_show_version_control(){
32
+
33
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
34
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-version'])){
35
+ $show_version_tab = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-version'];
36
+ }
37
+ }
38
+
39
+ return isset( $show_version_tab ) ? $show_version_tab : false;
40
+ }
41
+
42
+ public static function author(){
43
+
44
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
45
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-name'])){
46
+ $author_free = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-name'];
47
+ }
48
+ }
49
+
50
+ return ( isset($author_free) && '' != $author_free ) ? $author_free : 'Leap13';
51
+ }
52
+
53
+ public static function name(){
54
+
55
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
56
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-plugin-name'])){
57
+ $name_free = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-plugin-name'];
58
+ }
59
+ }
60
+
61
+ return ( isset($name_free) && '' != $name_free ) ? $name_free : 'Premium Addons for Elementor';
62
+ }
63
+
64
+ public static function is_show_logo(){
65
+
66
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
67
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-logo'])){
68
+ $show_logo = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-logo'];
69
+ }
70
+ }
71
+
72
+ return isset( $show_logo ) ? $show_logo : false;
73
+ }
74
+
75
+ public static function get_category(){
76
+
77
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
78
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-short-name'])){
79
+ $category = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-short-name'];
80
+ }
81
+ }
82
+
83
+ return ( isset($category) && '' != $category ) ? $category : 'Premium Addons';
84
+
85
+ }
86
+
87
+ public static function get_prefix(){
88
+
89
+ if( defined('PREMIUM_PRO_ADDONS_VERSION') ) {
90
+ if(isset(get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-prefix'])){
91
+ $prefix = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-prefix'];
92
+ }
93
+ }
94
+
95
+ return ( isset($prefix) && '' != $prefix ) ? $prefix : 'Premium';
96
+ }
97
+ }
includes/rollback.php CHANGED
@@ -78,4 +78,3 @@ class PA_Rollback {
78
  $this->upgrade();
79
  }
80
  }
81
-
78
  $this->upgrade();
79
  }
80
  }
 
plugin.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace PremiumAddons;
3
+
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ class Plugin {
7
+
8
+ public static $instance = null;
9
+
10
+
11
+ public static function instance() {
12
+ if ( is_null( self::$instance ) ) {
13
+ self::$instance = new self();
14
+ }
15
+
16
+ return self::$instance;
17
+ }
18
+
19
+ public function init() {
20
+ $this->init_components();
21
+ }
22
+
23
+ private function init_components() {
24
+ new PA_About();
25
+ new PA_Gomaps();
26
+ new PA_Version_Control();
27
+ new PA_System_Info();
28
+ $this->admin_settings = new PA_admin_settings();
29
+ $this->settings = new Pro_Settings();
30
+ }
31
+
32
+ private function __construct() {
33
+ add_action( 'init', array($this, 'init' ), 0 );
34
+ }
35
+ }
36
+
37
+ if ( ! defined( 'ELEMENTOR_TESTS' ) ) {
38
+ Plugin::instance();
39
+ }
premium-addons-for-elementor.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
  /*
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 2.4.1
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -13,221 +13,416 @@ License: GNU General Public License v3.0
13
 
14
 
15
  /**
16
- * Checking the set ups and the environment
17
  */
 
 
 
 
 
 
18
 
19
- if( !function_exists('add_action') ) {
20
- die('WordPress not Installed'); // if WordPress not installed kill the page.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
22
 
23
- if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
 
 
 
 
 
 
24
 
25
- define( 'PREMIUM_ADDONS_VERSION', '2.4.1' );
26
- define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
27
- define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
28
- define( 'PREMIUM_ADDONS_FILE', __FILE__ );
29
- define( 'PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
- define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.4.0');
31
 
 
32
 
33
- /**
34
- * Translating the plugin and load some
35
- * assets
36
- */
37
- add_action( 'plugins_loaded', 'premium_addons_elementor_setup');
38
- function premium_addons_elementor_setup() {
39
- // Loading .mo and.po file from the lang folder
40
- load_plugin_textdomain( 'premium-addons-for-elementor', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
41
-
42
- // Requires System Info When on Dashboard
43
- if(is_admin()){
44
- require_once( PREMIUM_ADDONS_PATH . 'includes/system-info.php' );
45
- require_once( PREMIUM_ADDONS_PATH . 'includes/maintenance.php' );
46
- require_once( PREMIUM_ADDONS_PATH . 'includes/rollback.php' );
47
- require_once( PREMIUM_ADDONS_PATH . 'includes/beta-testers.php' );
48
- $beta_testers = new PA_Beta_Testers();
49
- }
50
 
51
- // load the template tags
52
- if( file_exists( PREMIUM_ADDONS_PATH.'elementor-helper.php' ) ) {
53
- require_once( PREMIUM_ADDONS_PATH.'elementor-helper.php' );
54
- }
55
-
56
- if( file_exists( PREMIUM_ADDONS_PATH.'admin/settings-page.php' ) ) {
57
- require_once( PREMIUM_ADDONS_PATH.'admin/settings-page.php' );
58
- }
59
-
60
- /*
61
- * Instantiate the premium Addons for the elementor page builder
62
- * Included 1. 'premium_addons_widget_register()' for the main method for initaite addons
63
- * 2. 'premium_addons_widgets_area()' creating the widgets
64
- * 3. 'initiate_elementor_addons()' creating the category of the widgets
65
- */
66
-
67
- new premium_Addon_Elementor();
68
- }
69
-
70
- // CSS THAT DISPLAYS ON EDITOR PANEL
71
- add_action( 'elementor/editor/before_enqueue_scripts', function() {
72
- wp_register_style( 'premium-elements-progression-admin-styles', PREMIUM_ADDONS_URL . 'admin/assets/pa-elements-font/css/pa-elements.css' );
73
- wp_enqueue_style( 'premium-elements-progression-admin-styles' );
74
- } );
75
-
76
- /*Automatic Redirection Upon Activation*/
77
- register_activation_hook(__FILE__, 'pa_activation');
78
- add_action('admin_init', 'pa_redirection');
79
- function pa_activation() {
80
- add_option('pa_activation_redirect', true);
81
- }
82
- function pa_redirection() {
83
- if (get_option('pa_activation_redirect', false)) {
84
- delete_option('pa_activation_redirect');
85
- if (!is_network_admin()) {
86
- wp_redirect("admin.php?page=pa-settings-page");
87
- }
88
  }
89
- };
 
 
 
90
 
91
- class premium_Addon_Elementor {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
- protected $pa_elements_keys = ['premium-banner', 'premium-blog','premium-carousel', 'premium-countdown','premium-counter','premium-dual-header','premium-fancytext','premium-image-separator','premium-maps','premium-modalbox','premium-person','premium-progressbar','premium-testimonials','premium-title','premium-videobox', 'premium-pricing-table', 'premium-contactform', 'premium-button', 'premium-image-button','premium-grid'];
 
 
 
94
 
95
- /**
96
- * Load all the hooks here
97
- * @since 1.0
98
- */
99
- public function __construct() {
100
- add_action('elementor/init', array( $this, 'initiate_elementor_addons' ) );
101
- add_action('elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
102
- add_action('wp_enqueue_scripts', array( $this, 'premium_maps_required_script') );
103
- add_action('elementor/frontend/after_register_scripts', array($this, 'premium_addons_register_scripts'));
104
- add_action('elementor/frontend/after_register_styles', array($this, 'premium_addons_register_styles'));
105
- add_action('elementor/frontend/after_enqueue_styles', array($this, 'premium_addons_enqueue_styles'));
106
- add_action('admin_post_premium_addons_rollback', 'post_premium_addons_rollback');
107
- }
108
 
109
- /**
110
- * Register all frontend stylesheets
111
- */
112
- public function premium_addons_register_styles(){
113
- wp_register_style('premium-addons', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), PREMIUM_ADDONS_VERSION, 'all');
114
- $check_grid_active = isset(get_option('pa_save_settings')['premium-grid']) ? get_option('pa_save_settings')['premium-grid']: true;
115
- if($check_grid_active){
116
- wp_register_style('pa-prettyphoto', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), PREMIUM_ADDONS_VERSION, 'all');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
  }
 
119
 
120
- /*
121
- * Enqueue all frontend stylesheets
122
- */
123
- public function premium_addons_enqueue_styles(){
124
- wp_enqueue_style('premium-addons');
125
- $check_grid_active = isset(get_option('pa_save_settings')['premium-grid']) ? get_option('pa_save_settings')['premium-grid']: true;
126
- if($check_grid_active){
127
- wp_enqueue_style('pa-prettyphoto');
128
- }
129
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
- /*
132
- * Enqueue Premium Maps API script
133
- */
134
- public function premium_maps_required_script() {
135
- $premium_maps_api = get_option( 'pa_save_settings' )['premium-map-api'];
136
- $premium_maps_disable_api = get_option( 'pa_save_settings' )['premium-map-disable-api'];
137
- $premium_maps_enabled = get_option( 'pa_save_settings' )['premium-maps'];
138
- if ( $premium_maps_enabled == 1 && $premium_maps_disable_api == 1 ) {
139
- wp_enqueue_script('google-maps-script','https://maps.googleapis.com/maps/api/js?key='.$premium_maps_api , array(), PREMIUM_ADDONS_VERSION, false);
140
  }
141
- }
142
 
143
- public function premium_addons_register_scripts(){
144
- $pa_default_settings = array_fill_keys($this->pa_elements_keys, true);
 
 
 
 
 
 
 
 
 
 
145
 
146
- $check_component_active = get_option('pa_save_settings', $pa_default_settings);
 
147
 
148
- if( $check_component_active['premium-progressbar'] ) {
149
- wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
150
- wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true);
151
- }
152
 
153
- if( $check_component_active['premium-videobox'] ) {
154
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
155
- }
156
 
157
- if( $check_component_active['premium-grid'] ) {
158
- wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
159
- wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
160
- wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
161
- }
162
 
163
- if( $check_component_active['premium-counter'] ) {
164
- wp_register_script( 'counter-up-js', PREMIUM_ADDONS_URL .'assets/js/lib/countUpmin.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
165
- wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true);
166
- }
167
 
168
- if( $check_component_active['premium-fancytext'] ) {
169
- wp_register_script('vticker-js', PREMIUM_ADDONS_URL . 'assets/js/lib/Vticker.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
170
- wp_register_script('typed-js', PREMIUM_ADDONS_URL . 'assets/js/lib/typedmin.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
171
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
172
- }
173
 
174
- if( $check_component_active['premium-countdown'] ) {
175
- wp_register_script( 'count-down-timer-js', PREMIUM_ADDONS_URL .'assets/js/lib/jquerycountdown.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION,
176
- true );
177
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
178
- }
179
 
180
- if( $check_component_active['premium-carousel'] ) {
181
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
182
- wp_register_script( 'slick-carousel-js', PREMIUM_ADDONS_URL . 'assets/js/lib/slickmin.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
183
- }
184
 
185
- if( $check_component_active['premium-banner'] ) {
186
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
187
- }
188
 
189
- if( $check_component_active['premium-modalbox'] ) {
190
- wp_register_script( 'modal-js', PREMIUM_ADDONS_URL .'assets/js/lib/modal.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
191
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
192
- }
193
 
194
- if ($check_component_active['premium-maps']) {
195
- wp_register_script('premium-maps-js', PREMIUM_ADDONS_URL . 'assets/js/premium-maps.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  }
197
- if ($check_component_active['premium-blog']) {
198
- wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
199
- wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
200
- }
201
  }
202
 
203
- public function premium_addons_widget_register() {
204
- $this->initiate_elementor_addons();
205
- $this->premium_addons_widgets_area();
206
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
- private function premium_addons_widgets_area() {
209
- $pa_default_settings = array_fill_keys( $this->pa_elements_keys, true );
210
- $check_component_active = get_option( 'pa_save_settings', $pa_default_settings );
211
-
212
- foreach($check_component_active as $element_name => $element_active){
213
- if($element_active && $element_name != 'premium-contactform' && $element_name != 'premium-map-api' && $element_name != 'premium-map-disable-api' && $element_name != 'is-beta-tester' ){
214
- if($element_name == 'premium-blog'){
215
- require_once (PREMIUM_ADDONS_PATH . 'queries.php');
216
- }
217
- require_once (PREMIUM_ADDONS_PATH . 'widgets/' . $element_name . '.php');
218
- } elseif ($element_active && $element_name == 'premium-contactform' && function_exists('wpcf7')){
219
- require_once (PREMIUM_ADDONS_PATH . 'widgets/' . $element_name . '.php');
220
- }
221
- }
222
- }
223
 
224
- public function initiate_elementor_addons() {
225
- Elementor\Plugin::instance()->elements_manager->add_category(
226
- 'premium-elements',
227
- array(
228
- 'title' => __( 'Premium Addons', 'premium-addons-for-elementor' )
229
- ),
230
- 1
231
- );
232
- }
233
- }
1
+ <?php
2
  /*
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 2.5.0
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
13
 
14
 
15
  /**
16
+ * Checking if WordPress is installed
17
  */
18
+ if (!function_exists('add_action')) {
19
+ die('WordPress not Installed'); // if WordPress not installed kill the page.
20
+ }
21
+
22
+ if (!defined('ABSPATH')) exit; // No access of directly access
23
+
24
 
25
+ define('PREMIUM_ADDONS_VERSION', '2.5.0');
26
+ define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
27
+ define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
28
+ define('PREMIUM_ADDONS_FILE', __FILE__);
29
+ define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
+ define('PREMIUM_ADDONS_STABLE_VERSION', '2.4.1');
31
+
32
+ /**
33
+ * Loading text domain, Including required files
34
+ */
35
+ add_action('plugins_loaded', 'premium_addons_elementor_setup');
36
+ function premium_addons_elementor_setup() {
37
+
38
+ load_plugin_textdomain('premium-addons-for-elementor', false, dirname(plugin_basename(__FILE__)) . '/languages/');
39
+
40
+ // Requires System Info When on Dashboard
41
+ if (is_admin()) {
42
+ require_once (PREMIUM_ADDONS_PATH . 'includes/system-info.php');
43
+ require_once (PREMIUM_ADDONS_PATH . 'includes/maintenance.php');
44
+ require_once (PREMIUM_ADDONS_PATH . 'includes/rollback.php');
45
+ require_once (PREMIUM_ADDONS_PATH . 'includes/beta-testers.php');
46
+ require_once (PREMIUM_ADDONS_PATH . 'plugin.php');
47
+ require_once (PREMIUM_ADDONS_PATH . 'admin/settings/about.php');
48
+ require_once (PREMIUM_ADDONS_PATH . 'admin/settings/version-control.php');
49
+ require_once (PREMIUM_ADDONS_PATH . 'admin/settings/sys-info.php');
50
+ require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gopro.php');
51
+ $beta_testers = new PA_Beta_Testers();
52
+ }
53
+
54
+ require_once (PREMIUM_ADDONS_PATH . 'includes/helper-functions.php');
55
+ require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gomaps.php');
56
+ require_once (PREMIUM_ADDONS_PATH . 'admin/settings/elements.php');
57
+
58
+ // load the template tags
59
+ if (file_exists(PREMIUM_ADDONS_PATH . 'elementor-helper.php')) {
60
+ require_once (PREMIUM_ADDONS_PATH . 'elementor-helper.php');
61
+ }
62
+
63
+ /*
64
+ * Instantiate the premium Addons for the elementor page builder
65
+ * Included 1. 'premium_addons_widget_register()' for the main method for initaite addons
66
+ * 2. 'premium_addons_widgets_area()' creating the widgets
67
+ * 3. 'initiate_elementor_addons()' creating the category of the widgets
68
+ */
69
+
70
+ new premium_Addon_Elementor();
71
  }
72
 
73
+ // CSS THAT DISPLAYS ON EDITOR PANEL
74
+ add_action('elementor/editor/before_enqueue_scripts', function () {
75
+
76
+ wp_register_style('premium-elements-progression-admin-styles', PREMIUM_ADDONS_URL . 'admin/assets/pa-elements-font/css/pa-elements.css');
77
+ wp_enqueue_style('premium-elements-progression-admin-styles');
78
+
79
+ });
80
 
81
+ /*Automatic Redirection Upon Activation*/
82
+ register_activation_hook(__FILE__, 'pa_activation');
 
 
 
 
83
 
84
+ add_action('admin_init', 'pa_redirection');
85
 
86
+ function pa_activation() {
87
+ add_option('pa_activation_redirect', true);
88
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
+ function pa_redirection() {
91
+
92
+ if (get_option('pa_activation_redirect', false)) {
93
+ delete_option('pa_activation_redirect');
94
+ if (!is_network_admin()) {
95
+ wp_redirect("admin.php?page=premium-addons");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
+ }
98
+ }
99
+
100
+ class premium_Addon_Elementor {
101
 
102
+ protected $pa_elements_keys = ['premium-banner', 'premium-blog', 'premium-carousel', 'premium-countdown', 'premium-counter', 'premium-dual-header', 'premium-fancytext', 'premium-image-separator', 'premium-maps', 'premium-modalbox', 'premium-person', 'premium-progressbar', 'premium-testimonials', 'premium-title', 'premium-videobox', 'premium-pricing-table', 'premium-contactform', 'premium-button', 'premium-image-button', 'premium-grid'];
103
+
104
+ /**
105
+ * Load all the hooks here
106
+ * @since 1.0
107
+ */
108
+ public function __construct() {
109
+ add_action('admin_init', array( $this, 'handle_get_pro_notice'));
110
+ add_action('admin_notices', array( $this, 'required_plugins_check' ));
111
+ add_action('admin_notices', array( $this, 'get_premium_pro_notice')) ;
112
+ add_action('elementor/init', array($this, 'initiate_elementor_addons'));
113
+ add_action('elementor/widgets/widgets_registered', array($this, 'premium_addons_widget_register'));
114
+ add_action('elementor/frontend/after_register_scripts', array($this, 'premium_addons_register_scripts'));
115
+ add_action('elementor/frontend/after_register_styles', array($this, 'premium_addons_register_styles'));
116
+ add_action('elementor/frontend/after_enqueue_styles', array($this, 'premium_addons_enqueue_styles'));
117
+ add_action('wp_enqueue_scripts', array($this, 'premium_maps_required_script'));
118
+ add_action('admin_post_premium_addons_rollback', 'post_premium_addons_rollback');
119
+ }
120
 
121
+ /**
122
+ * Shows an admin notice when Elementor is missing
123
+ */
124
+ public function required_plugins_check() {
125
 
126
+ $elementor_path = 'elementor/elementor.php';
127
+
128
+ if( !defined('ELEMENTOR_VERSION') ) {
129
+
130
+ if ( ! is_plugin_installed( $elementor_path ) ) {
 
 
 
 
 
 
 
 
131
 
132
+ if( current_user_can( 'install_plugins' ) ) {
133
+
134
+ $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
135
+
136
+ $message = __( '<p>Premium Addons for Elementor is not working because you need to Install Elementor plugin.</p>', 'premium-addons-for-elementor' );
137
+
138
+ $message .= sprintf( '<p><a href="%s" class="button-primary">%s</a></p>', $install_url, __( 'Install Now', 'premium-addons-for-elementor' ) );
139
+
140
+ $this->render_admin_notices( $message );
141
+
142
+ }
143
+ } else {
144
+ if( current_user_can( 'activate_plugins' ) ) {
145
+
146
+ $plugin = 'elementor/elementor.php';
147
+
148
+ $activation_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
149
+
150
+ $message = '<p>' . __( 'Premium Addons for Elementor is not working because you need to activate Elementor plugin.', 'premium-addons-for-elementor' ) . '</p>';
151
+
152
+ $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'premium-addons-for-elementor' ) ) . '</p>';
153
+
154
+ $this->render_admin_notices( $message );
155
+ }
156
  }
157
  }
158
+ }
159
 
160
+ /*
161
+ * Checks if get pro version message is dismissed
162
+ */
163
+ public function handle_get_pro_notice() {
164
+
165
+ if ( ! isset( $_GET['get_pa_pro'] ) ) {
166
+ return;
167
+ }
168
+
169
+ if ( 'opt_out' === $_GET['get_pa_pro'] ) {
170
+ check_admin_referer( 'opt_out' );
171
+
172
+ update_option( 'get_pa_pro_notice', '1' );
173
+ }
174
+
175
+ wp_redirect( remove_query_arg( 'get_pa_pro' ) );
176
+ exit;
177
+
178
+ }
179
+
180
+ /**
181
+ * Shows a dismissible admin notice to get Premium PRO version
182
+ */
183
+ public function get_premium_pro_notice() {
184
+
185
+ $pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
186
+
187
+ if ( ! is_plugin_installed( $pro_path ) && current_user_can( 'install_plugins' ) ) {
188
 
189
+ if ( '1' === get_option( 'get_pa_pro_notice' ) ) {
190
+ return;
 
 
 
 
 
 
 
191
  }
 
192
 
193
+ $optout_url = wp_nonce_url( add_query_arg( 'get_pa_pro', 'opt_out' ), 'opt_out' );
194
+
195
+ $theme = $this->get_installed_theme();
196
+
197
+ $url = sprintf( 'https://premiumaddons.com/pro/?utm_source=notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
198
+
199
+ $message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;"><strong>Premium Addons PRO&nbsp</strong><span> is now available!&nbsp</span><a href="%s" target="_blank" style="flex-grow: 2;"> Check it out now.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png' ,$url );
200
+
201
+ $message .= sprintf(__('<a href="%s" style="text-decoration: none; margin-left: 1em; float:right; "><span class="dashicons dashicons-dismiss"></span></a></p>', 'premium-addons-for-elementor'), $optout_url );
202
+
203
+ $this->render_admin_notices( $message );
204
+
205
 
206
+ }
207
+ }
208
 
209
+ /**
210
+ * Returns the active theme slug
211
+ */
212
+ public function get_installed_theme() {
213
 
214
+ $theme = wp_get_theme();
 
 
215
 
216
+ if( $theme->parent() ) {
 
 
 
 
217
 
218
+ $theme_name = $theme->parent()->get('Name');
 
 
 
219
 
220
+ } else {
 
 
 
 
221
 
222
+ $theme_name = $theme->get('Name');
 
 
 
 
223
 
224
+ }
 
 
 
225
 
226
+ $theme_name = sanitize_key( $theme_name );
 
 
227
 
228
+ return $theme_name;
229
+ }
 
 
230
 
231
+ /**
232
+ * Renders an admin notice error message
233
+ */
234
+ public function render_admin_notices( $message ) {
235
+ ?>
236
+ <div class="error pa-notice-wrap">
237
+ <?php echo $message; ?>
238
+ </div>
239
+ <?php
240
+
241
+ }
242
+
243
+ /**
244
+ * Register all frontend stylesheets
245
+ */
246
+ public function premium_addons_register_styles(){
247
+ wp_register_style('premium-addons', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), PREMIUM_ADDONS_VERSION, 'all');
248
+ $check_grid_active = isset(get_option('pa_save_settings')['premium-grid']) ? get_option('pa_save_settings')['premium-grid']: true;
249
+ if($check_grid_active){
250
+ wp_register_style('pa-prettyphoto', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), PREMIUM_ADDONS_VERSION, 'all');
251
+ }
252
+ }
253
+
254
+ /*
255
+ * Enqueue all frontend stylesheets
256
+ */
257
+ public function premium_addons_enqueue_styles(){
258
+ wp_enqueue_style('premium-addons');
259
+ $check_grid_active = isset(get_option('pa_save_settings')['premium-grid']) ? get_option('pa_save_settings')['premium-grid']: true;
260
+ if($check_grid_active){
261
+ wp_enqueue_style('pa-prettyphoto');
262
  }
 
 
 
 
263
  }
264
 
265
+ /*
266
+ * Enqueue Premium Maps API script
267
+ */
268
+ public function premium_maps_required_script() {
269
+ $premium_maps_api = get_option('pa_maps_save_settings')['premium-map-api'];
270
+ $premium_maps_disable_api = get_option('pa_maps_save_settings')['premium-map-disable-api'];
271
+ $premium_maps_enabled = get_option('pa_save_settings')['premium-maps'];
272
+ if ($premium_maps_enabled == 1 && $premium_maps_disable_api == 1) {
273
+ wp_enqueue_script('google-maps-script', 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api, array(), PREMIUM_ADDONS_VERSION, false);
274
+ }
275
+ }
276
+
277
+ /**
278
+ * Load only the required javascript files
279
+ */
280
+ public function premium_addons_register_scripts() {
281
+ $pa_default_settings = array_fill_keys($this->pa_elements_keys, true);
282
+
283
+ $check_component_active = get_option('pa_save_settings', $pa_default_settings);
284
+
285
+ if ($check_component_active['premium-progressbar']) {
286
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
287
+ wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
288
+ }
289
+ if ($check_component_active['premium-videobox']) {
290
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
291
+ }
292
+ if ($check_component_active['premium-grid']) {
293
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
294
+ wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
295
+ wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
296
+ }
297
+ if ($check_component_active['premium-counter']) {
298
+ wp_register_script('counter-up-js', PREMIUM_ADDONS_URL . 'assets/js/lib/countUpmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
299
+ wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
300
+ }
301
+ if ($check_component_active['premium-fancytext']) {
302
+ wp_register_script('vticker-js', PREMIUM_ADDONS_URL . 'assets/js/lib/Vticker.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
303
+ wp_register_script('typed-js', PREMIUM_ADDONS_URL . 'assets/js/lib/typedmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
304
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
305
+ }
306
+ if ($check_component_active['premium-countdown']) {
307
+ wp_register_script('count-down-timer-js', PREMIUM_ADDONS_URL . 'assets/js/lib/jquerycountdown.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
308
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
309
+ }
310
+ if ($check_component_active['premium-carousel']) {
311
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
312
+ wp_register_script('slick-carousel-js', PREMIUM_ADDONS_URL . 'assets/js/lib/slickmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
313
+ }
314
+ if ($check_component_active['premium-banner']) {
315
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
316
+ }
317
+ if ($check_component_active['premium-modalbox']) {
318
+ wp_register_script('modal-js', PREMIUM_ADDONS_URL . 'assets/js/lib/modal.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
319
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
320
+ }
321
+ if ($check_component_active['premium-maps']) {
322
+ wp_register_script('premium-maps-js', PREMIUM_ADDONS_URL . 'assets/js/premium-maps.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
323
+ }
324
+ if ($check_component_active['premium-blog']) {
325
+ wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
326
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
327
+ }
328
+ }
329
+
330
+ /**
331
+ * Load only the enabled widgets
332
+ */
333
+ public function premium_addons_widget_register() {
334
+ $this->initiate_elementor_addons();
335
+ $this->premium_addons_widgets_area();
336
+ }
337
+
338
+ private function premium_addons_widgets_area() {
339
+
340
+ $pa_default_settings = array_fill_keys($this->pa_elements_keys, true);
341
+
342
+ $check_component_active = get_option('pa_save_settings', $pa_default_settings);
343
+
344
+ if ($check_component_active['premium-banner']) {
345
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-banner.php');
346
+ }
347
+ if ($check_component_active['premium-carousel']) {
348
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-carousel.php');
349
+ }
350
+ if ($check_component_active['premium-countdown']) {
351
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-countdown.php');
352
+ }
353
+ if ($check_component_active['premium-counter']) {
354
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-counter.php');
355
+ }
356
+ if ($check_component_active['premium-image-separator']) {
357
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-imageseparator.php');
358
+ }
359
+ if ($check_component_active['premium-modalbox']) {
360
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-modalbox.php');
361
+ }
362
+ if ($check_component_active['premium-progressbar']) {
363
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-progressbar.php');
364
+ }
365
+ if ($check_component_active['premium-testimonials']) {
366
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-testimonials.php');
367
+ }
368
+ if ($check_component_active['premium-title']) {
369
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-title.php');
370
+ }
371
+ if ($check_component_active['premium-fancytext']) {
372
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-fancytext.php');
373
+ }
374
+ if ($check_component_active['premium-videobox']) {
375
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-videobox.php');
376
+ }
377
+ if ($check_component_active['premium-pricing-table']) {
378
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-pricing-table.php');
379
+ }
380
+ if ($check_component_active['premium-blog']) {
381
+ require_once (PREMIUM_ADDONS_PATH . 'queries.php');
382
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-blog.php');
383
+ }
384
+ if ($check_component_active['premium-person']) {
385
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-person.php');
386
+ }
387
+ if ($check_component_active['premium-maps']) {
388
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-maps.php');
389
+ }
390
+ if ($check_component_active['premium-dual-header']) {
391
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-dual-header.php');
392
+ }
393
+ if ($check_component_active['premium-button']) {
394
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-button.php');
395
+ }
396
+ if (function_exists('wpcf7') && $check_component_active['premium-contactform']) {
397
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-contactform.php');
398
+ }
399
+ if ($check_component_active['premium-image-button']) {
400
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-image-button.php');
401
+ }
402
+ if ($check_component_active['premium-grid']) {
403
+ require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-grid.php');
404
+ }
405
+
406
+ }
407
+
408
+ public function initiate_elementor_addons() {
409
+ Elementor\Plugin::instance()->elements_manager->add_category(
410
+ 'premium-elements',
411
+ array(
412
+ 'title' => \PremiumAddons\Helper_Functions::get_category()
413
+ ),
414
+ 1);
415
+ }
416
+ }
417
 
418
+ if ( ! function_exists( 'is_plugin_installed' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
 
420
+ function is_plugin_installed($plugin_path){
421
+
422
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
423
+
424
+ $plugins = get_plugins();
425
+
426
+ return isset( $plugins[ $plugin_path ] );
427
+ }
428
+ }
 
queries.php CHANGED
@@ -28,7 +28,7 @@ function premium_addons_get_excerpt_by_id($post_id,$excerpt_length,$excerpt_type
28
  $the_post = get_post($post_id); //Gets post ID
29
 
30
  $the_excerpt = null;
31
- if ($the_post) //If
32
  {
33
  $the_excerpt = $the_post->post_excerpt ? $the_post->post_excerpt : $the_post->post_content;
34
  }
@@ -64,4 +64,4 @@ function premium_addons_post_type_categories(){
64
  }
65
 
66
  return $options;
67
- }
28
  $the_post = get_post($post_id); //Gets post ID
29
 
30
  $the_excerpt = null;
31
+ if ($the_post)
32
  {
33
  $the_excerpt = $the_post->post_excerpt ? $the_post->post_excerpt : $the_post->post_content;
34
  }
64
  }
65
 
66
  return $options;
67
+ }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 4.9.7
7
  Requires PHP: 5.4
8
- Stable tag: 2.4.1
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -26,7 +26,9 @@ Premium Addons for Elementor can be used only as a complement of Elementor page
26
  * 20+ Fully Customizable Elementor add-on widgets.
27
  * Options panel for enabling desired widgets only for faster performance.
28
  * Free Support through online forums and our Facebook group.
29
- * Fully Responsive and Cross Browser Compatible, Tested By [Browserstack](https://www.browserstack.com/)
 
 
30
 
31
 
32
  ### Available Elements
@@ -52,6 +54,34 @@ Premium Addons for Elementor can be used only as a complement of Elementor page
52
  19. [Contact Form 7 Elementor Widget](https://premiumaddons.com/contact-form-7-widget-for-elementor-page-builder/) Elementor contact form 7 add-on with 2 readymade styles.
53
  20. [Image Button Elementor Widget](https://premiumaddons.com/image-button-widget-for-elementor-page-builder/) A unique element that can be used for innovative call to action ideas.
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  == Installation ==
57
 
@@ -66,7 +96,7 @@ Premium Addons for Elementor can be used only as a complement of Elementor page
66
  - First make sure that Elementor Page Builder is installed, As this plugin works only with it.
67
  - Download the plugin then Upload it to the plugin folder: /wp-content/plugins/ or install it through the WordPress plugins screen directly.
68
  - Activate the plugin through the ‘Plugins’ screen in WordPress
69
- - You can find Premium Addons Elements under the category “Premium Addons for Elementor” on your Elementor element/widget list.
70
 
71
  == Frequently Asked Questions ==
72
  = Is this a standalone Plugin? =
@@ -75,7 +105,7 @@ No. You cannot use Premium Addons without Elementor as it\'s an addons plugin fo
75
 
76
  = Does it work with any WordPress theme? =
77
 
78
- Yes it will work with any WordPress theme as long as you are using Elementor as a page builder.
79
 
80
  = Will this plugin slow down my website speed? =
81
 
@@ -100,6 +130,10 @@ Premium Addons for Elementor is light weight and we also gave you the control to
100
 
101
  == Changelog ==
102
 
 
 
 
 
103
  = 2.4.1 =
104
 
105
  - Tweak: Added color, typography and background color for cursor text in Premium Fancy Text widget.
@@ -176,16 +210,17 @@ Premium Addons for Elementor is light weight and we also gave you the control to
176
  - Fix: Premium Person cropped image issue.
177
  - Fix: Premium Blog cropped image issue.
178
 
179
- = 2.2.5 =
180
 
 
 
181
  - Fix: Premium Carousel slides on Tabs/Mobiles options bug.
182
 
183
  = 2.2.4 =
184
-
185
  - Fix: Premium Google Maps bug.
186
-
187
  = 2.2.3 =
188
-
189
  - Fix: Warning class ‘premium_Addon_Elementor’ does not have a method ‘premium_addons_required_assets’.
190
 
191
  = 2.2.2 =
@@ -193,6 +228,11 @@ Premium Addons for Elementor is light weight and we also gave you the control to
193
  - Tweak: Enhanced backend CSS and Javascript loading to improve websites performance.
194
  - Tweak: New widgets icons.
195
 
 
 
 
 
 
196
  = 2.2.0 =
197
 
198
  - Tweak: Added image alt text option for images in Premium Grid widget.
@@ -398,4 +438,4 @@ Premium Addons for Elementor is light weight and we also gave you the control to
398
 
399
  = 1.0 =
400
 
401
- - Initial stable release
5
  Requires at least: 4.5
6
  Tested up to: 4.9.7
7
  Requires PHP: 5.4
8
+ Stable tag: 2.5.0
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
26
  * 20+ Fully Customizable Elementor add-on widgets.
27
  * Options panel for enabling desired widgets only for faster performance.
28
  * Free Support through online forums and our Facebook group.
29
+ * Fully Responsive and Cross Browser Compatible, Tested By [Browserstack](https://www.browserstack.com)
30
+
31
+ >Enable/disable specific elements and their related CSS and JS files to prevent overloading your site.
32
 
33
 
34
  ### Available Elements
54
  19. [Contact Form 7 Elementor Widget](https://premiumaddons.com/contact-form-7-widget-for-elementor-page-builder/) Elementor contact form 7 add-on with 2 readymade styles.
55
  20. [Image Button Elementor Widget](https://premiumaddons.com/image-button-widget-for-elementor-page-builder/) A unique element that can be used for innovative call to action ideas.
56
 
57
+ ### PRO addons & widgets [Check more](https://premiumaddons.com/pro/)
58
+
59
+ 1. [Premium Alert Box](https://premiumaddons.com/alert-box-widget-for-elementor-page-builder/)
60
+ 2. [Premium Animated Section Gradient](https://premiumaddons.com/animated-section-gradients-for-elementor-page-builder/)
61
+ 3. [Premium Behance Feed](https://premiumaddons.com/behance-feed-widget-for-elementor-page-builder/)
62
+ 4. [Premium Charts](https://premiumaddons.com/charts-widget-for-elementor-page-builder/)
63
+ 5. [Premium Content Switcher](https://premiumaddons.com/content-switcher-widget-for-elementor-page-builder/)
64
+ 6. [Premium Divider](https://premiumaddons.com/dual-header-widget-for-elementor-page-builder/)
65
+ 7. [Premium Facebook Messenger](https://premiumaddons.com/facebook-messenger-widget-for-elementor-page-builder/)
66
+ 8. [Premium Facebook Reviews](https://premiumaddons.com/facebook-reviews-widget-for-elementor-page-builder-2/)
67
+ 9. [Premium Flip Box](https://premiumaddons.com/flip-box-widget-for-elementor-page-builder/)
68
+ 10. [Premium Google Reviews](https://premiumaddons.com/google-reviews-for-elementor-page-builder/)
69
+ 11. [Premium Icon Box](https://premiumaddons.com/icon-box-widget-for-elementor-page-builder/)
70
+ 12. [Premium iHover](https://premiumaddons.com/ihover-widget-for-elementor-page-builder/)
71
+ 13. [Premium Image Comparison](https://premiumaddons.com/image-comparison-widget-for-elementor-page-builder/)
72
+ 14. [Premium Image Hotspots](https://premiumaddons.com/image-hotspots-widget-for-elementor-page-builder/)
73
+ 15. [Premium Image Layers](https://premiumaddons.com/image-layers-widget-for-elementor-page-builder/)
74
+ 16. [Premium Instagram Feed](https://premiumaddons.com/instagram-feed-widget-for-elementor-page-builder/)
75
+ 17. [Premium Ken Burns](https://premiumaddons.com/ken-burns-section-addon-for-elementor-page-builder/)
76
+ 18. [Premium Magic Section](https://premiumaddons.com/magic-section-widget-for-elementor-page-builder/)
77
+ 19. [Premium Parallax](https://premiumaddons.com/parallax-section-addon-for-elementor-page-builder/)
78
+ 20. [Premium Particles](https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/)
79
+ 21. [Premium Preview Window](https://premiumaddons.com/preview-window-widget-for-elementor-page-builder/)
80
+ 22. [Premium Tables](https://premiumaddons.com/table-widget-for-elementor-page-builder/)
81
+ 23. [Premium Twitter Feed](https://premiumaddons.com/twitter-feed-widget-for-elementor-page-builder/)
82
+ 24. [Premium Tabs](https://premiumaddons.com/tabs-widget-for-elementor-page-builder-2/)
83
+ 25. [Premium Unfold](https://premiumaddons.com/unfold-widget-for-elementor-page-builder/)
84
+
85
 
86
  == Installation ==
87
 
96
  - First make sure that Elementor Page Builder is installed, As this plugin works only with it.
97
  - Download the plugin then Upload it to the plugin folder: /wp-content/plugins/ or install it through the WordPress plugins screen directly.
98
  - Activate the plugin through the ‘Plugins’ screen in WordPress
99
+ - You can find Premium Addons Elements under the category “Premium Addons” on your Elementor element/widget list.
100
 
101
  == Frequently Asked Questions ==
102
  = Is this a standalone Plugin? =
105
 
106
  = Does it work with any WordPress theme? =
107
 
108
+ Yes, it will work with any WordPress theme as long as you are using Elementor as a page builder.
109
 
110
  = Will this plugin slow down my website speed? =
111
 
130
 
131
  == Changelog ==
132
 
133
+ = 2.5.0 =
134
+
135
+ - New: Added Premium Addons PRO Controls.
136
+
137
  = 2.4.1 =
138
 
139
  - Tweak: Added color, typography and background color for cursor text in Premium Fancy Text widget.
210
  - Fix: Premium Person cropped image issue.
211
  - Fix: Premium Blog cropped image issue.
212
 
 
213
 
214
+ = 2.2.5 =
215
+
216
  - Fix: Premium Carousel slides on Tabs/Mobiles options bug.
217
 
218
  = 2.2.4 =
219
+
220
  - Fix: Premium Google Maps bug.
221
+
222
  = 2.2.3 =
223
+
224
  - Fix: Warning class ‘premium_Addon_Elementor’ does not have a method ‘premium_addons_required_assets’.
225
 
226
  = 2.2.2 =
228
  - Tweak: Enhanced backend CSS and Javascript loading to improve websites performance.
229
  - Tweak: New widgets icons.
230
 
231
+ = 2.2.1 =
232
+
233
+ - Fix: Premium Fancy Text widget slide up effect bug.
234
+ - Fix: Premium Countdown widget expiration message special characters bug.
235
+
236
  = 2.2.0 =
237
 
238
  - Tweak: Added image alt text option for images in Premium Grid widget.
438
 
439
  = 1.0 =
440
 
441
+ - Initial stable release
widgets/premium-banner.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  namespace Elementor;
3
 
4
-
5
  if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
6
 
7
  class Premium_Banner_Widget extends Widget_Base {
@@ -15,9 +14,9 @@ class Premium_Banner_Widget extends Widget_Base {
15
  public function get_name() {
16
  return 'premium-addon-banner';
17
  }
18
-
19
- public function get_title(){
20
- return esc_html__('Premium Banner', 'premium-addons-for-elementor');
21
  }
22
 
23
  public function get_icon() {
@@ -149,8 +148,8 @@ class Premium_Banner_Widget extends Widget_Base {
149
  ]
150
  ]
151
  );
152
-
153
- $this->add_control(
154
  'premium_banner_hover_effect',
155
  [
156
  'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
@@ -162,7 +161,6 @@ $this->add_control(
162
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
163
  'grayscale' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
164
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
165
- 'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
166
  'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
167
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
168
  ],
@@ -225,7 +223,7 @@ $this->add_control(
225
  'placeholder' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
226
  'description' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
227
  'type' => Controls_Manager::TEXT,
228
- 'dynamic' => [ 'active' => true ],
229
  'default' => esc_html__( 'Premium Banner', 'premium-addons-for-elementor' ),
230
  'label_block' => false
231
  ]
@@ -265,7 +263,7 @@ $this->add_control(
265
  'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
266
  'description' => esc_html__( 'Give the description to this banner', 'premium-addons-for-elementor' ),
267
  'type' => Controls_Manager::WYSIWYG,
268
- 'dynamic' => [ 'active' => true ],
269
  'default' => esc_html__( 'Premium Banner gives you a wide range of styles and options that you will definitely fall in love with', 'premium-addons-for-elementor' ),
270
  'label_block' => true
271
  ]
@@ -444,15 +442,15 @@ $this->add_control(
444
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
445
  ]
446
  );
447
-
448
- $this->add_group_control(
449
- Group_Control_Text_Shadow::get_type(),
450
- [
451
- 'label' => esc_html__('Shadow','premium-addons-for-elementor'),
452
- 'name' => 'premium_banner_title_shadow',
453
- 'selector' => '{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title',
454
- ]
455
- );
456
 
457
  $this->end_controls_section();
458
 
@@ -487,15 +485,15 @@ $this->add_control(
487
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
488
  ]
489
  );
490
-
491
- $this->add_group_control(
492
- Group_Control_Text_Shadow::get_type(),
493
- [
494
- 'label' => esc_html__('Shadow','premium-addons-for-elementor'),
495
- 'name' => 'premium_banner_description_shadow',
496
- 'selector' => '{{WRAPPER}} .premium_banner .premium_banner_content',
497
- ]
498
- );
499
 
500
  $this->end_controls_section();
501
 
@@ -519,7 +517,7 @@ $this->add_control(
519
  $nofollow_link = $settings['premium_banner_image_link_add_nofollow'] == 'yes' ? ' rel="nofollow"' : '';
520
  $full_link = '<a class="premium_addons-banner-ib-link" href="'. $link .'" title="'. $link_title .'"'. $open_new_tab . $nofollow_link . '></a>';
521
  $animation_class = $settings['premium_banner_image_animation'];
522
- $hover_class = ' ' . $settings['premium_banner_hover_effect'];
523
  $extra_class = isset( $settings['premium_banner_extra_class'] ) && $settings['premium_banner_extra_class'] != '' ? ' '. $settings['premium_banner_extra_class'] : '';
524
  $min_height_class = $settings['premium_banner_height'] == 'custom' ? '' : '';
525
  $full_class = $animation_class.$hover_class.$extra_class.$min_height_class;
@@ -569,4 +567,4 @@ $this->add_control(
569
  }
570
  }
571
 
572
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_Banner_Widget() );
1
  <?php
2
  namespace Elementor;
3
 
 
4
  if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
5
 
6
  class Premium_Banner_Widget extends Widget_Base {
14
  public function get_name() {
15
  return 'premium-addon-banner';
16
  }
17
+
18
+ public function get_title() {
19
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Banner';
20
  }
21
 
22
  public function get_icon() {
148
  ]
149
  ]
150
  );
151
+
152
+ $this->add_control(
153
  'premium_banner_hover_effect',
154
  [
155
  'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
161
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
162
  'grayscale' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
163
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
 
164
  'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
165
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
166
  ],
223
  'placeholder' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
224
  'description' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
225
  'type' => Controls_Manager::TEXT,
226
+ 'dynamic' => [ 'active' => true ],
227
  'default' => esc_html__( 'Premium Banner', 'premium-addons-for-elementor' ),
228
  'label_block' => false
229
  ]
263
  'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
264
  'description' => esc_html__( 'Give the description to this banner', 'premium-addons-for-elementor' ),
265
  'type' => Controls_Manager::WYSIWYG,
266
+ 'dynamic' => [ 'active' => true ],
267
  'default' => esc_html__( 'Premium Banner gives you a wide range of styles and options that you will definitely fall in love with', 'premium-addons-for-elementor' ),
268
  'label_block' => true
269
  ]
442
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
443
  ]
444
  );
445
+
446
+ $this->add_group_control(
447
+ Group_Control_Text_Shadow::get_type(),
448
+ [
449
+ 'label' => esc_html__('Shadow','premium-addons-for-elementor'),
450
+ 'name' => 'premium_banner_title_shadow',
451
+ 'selector' => '{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title',
452
+ ]
453
+ );
454
 
455
  $this->end_controls_section();
456
 
485
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
486
  ]
487
  );
488
+
489
+ $this->add_group_control(
490
+ Group_Control_Text_Shadow::get_type(),
491
+ [
492
+ 'label' => esc_html__('Shadow','premium-addons-for-elementor'),
493
+ 'name' => 'premium_banner_description_shadow',
494
+ 'selector' => '{{WRAPPER}} .premium_banner .premium_banner_content',
495
+ ]
496
+ );
497
 
498
  $this->end_controls_section();
499
 
517
  $nofollow_link = $settings['premium_banner_image_link_add_nofollow'] == 'yes' ? ' rel="nofollow"' : '';
518
  $full_link = '<a class="premium_addons-banner-ib-link" href="'. $link .'" title="'. $link_title .'"'. $open_new_tab . $nofollow_link . '></a>';
519
  $animation_class = $settings['premium_banner_image_animation'];
520
+ $hover_class = ' ' . $settings['premium_banner_hover_effect'];
521
  $extra_class = isset( $settings['premium_banner_extra_class'] ) && $settings['premium_banner_extra_class'] != '' ? ' '. $settings['premium_banner_extra_class'] : '';
522
  $min_height_class = $settings['premium_banner_height'] == 'custom' ? '' : '';
523
  $full_class = $animation_class.$hover_class.$extra_class.$min_height_class;
567
  }
568
  }
569
 
570
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_Banner_Widget() );
widgets/premium-blog.php CHANGED
@@ -11,15 +11,15 @@ class Premium_Blog_Widget extends Widget_Base
11
  return 'premium-addon-blog';
12
  }
13
 
14
- public function get_title(){
15
- return esc_html__('Premium Blog', 'premium-addons-for-elementor');
16
  }
17
-
18
  public function is_reload_preview_required(){
19
  return true;
20
  }
21
-
22
- public function get_script_depends(){
23
  return [
24
  'isotope-js',
25
  'premium-addons-js'
@@ -52,13 +52,13 @@ class Premium_Blog_Widget extends Widget_Base
52
  'type' => Controls_Manager::SELECT,
53
  'description' => esc_html__('Choose a hover effect for the image','premium-addons-for-elementor'),
54
  'options' => [
55
- 'none' => esc_html__('None', 'premium-addons-for-elementor'),
56
  'zoomin' => esc_html__('Zoom In', 'premium-addons-for-elementor'),
57
  'zoomout'=> esc_html__('Zoom Out', 'premium-addons-for-elementor'),
58
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
59
  'gray' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
60
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
61
- 'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
62
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
63
  'trans' => esc_html__('Translate', 'premium-addons-for-elementor'),
64
  ],
@@ -106,24 +106,24 @@ class Premium_Blog_Widget extends Widget_Base
106
  'options' => premium_addons_post_type_categories(),
107
  ]
108
  );
109
-
110
- $this->add_control('premium_blog_title_tag',
111
- [
112
- 'label' => esc_html__( 'Title HTML Tag', 'premium-addons-for-elementor' ),
113
- 'description' => esc_html__( 'Select a heading tag for the post title.', 'premium-addons-for-elementor' ),
114
- 'type' => Controls_Manager::SELECT,
115
- 'default' => 'h2',
116
  'options' => [
117
- 'h1' => 'H1',
118
- 'h2' => 'H2',
119
- 'h3' => 'H3',
120
- 'h4' => 'H4',
121
- 'h5' => 'H5',
122
- 'h6' => 'H6',
123
- ],
124
- 'label_block' => true,
125
- ]
126
- );
127
 
128
  /*Grid*/
129
  $this->add_control('premium_blog_grid',
@@ -132,8 +132,8 @@ class Premium_Blog_Widget extends Widget_Base
132
  'type' => Controls_Manager::SWITCHER,
133
  ]
134
  );
135
-
136
- /*Masonry*/
137
  $this->add_control('premium_blog_masonry',
138
  [
139
  'label' => esc_html__('Masonry', 'premium-addons-for-elementor'),
@@ -145,7 +145,7 @@ class Premium_Blog_Widget extends Widget_Base
145
  ]
146
  );
147
 
148
- /*Masonry Number of Columns*/
149
  $this->add_control('premium_blog_columns_number',
150
  [
151
  'label' => esc_html__('Number of Columns', 'premium-addons-for-elementor'),
@@ -164,9 +164,9 @@ class Premium_Blog_Widget extends Widget_Base
164
  ]
165
  ]
166
  );
167
-
168
- /*Post Spacing*/
169
- $this->add_responsive_control('premium_blog_posts_spacing',
170
  [
171
  'label' => esc_html__('Spacing', 'premium-addons-for-elementor'),
172
  'type' => Controls_Manager::SLIDER,
@@ -185,7 +185,6 @@ class Premium_Blog_Widget extends Widget_Base
185
  ]
186
  ]
187
  );
188
-
189
 
190
  /*Excerpt*/
191
  $this->add_control('premium_blog_excerpt',
@@ -631,9 +630,9 @@ class Premium_Blog_Widget extends Widget_Base
631
  [
632
  'label' => esc_html__('Post Format Icon', 'premium-addons-for-elementor'),
633
  'tab' => Controls_Manager::TAB_STYLE,
634
- 'condition' => [
635
- 'premium_blog_post_format_icon' => 'yes'
636
- ]
637
  ]
638
  );
639
 
@@ -805,37 +804,37 @@ class Premium_Blog_Widget extends Widget_Base
805
  $this->end_controls_section();
806
 
807
  }
808
-
809
- protected function get_blog_responsive_style() {
810
-
811
- $breakpoints = Responsive::get_breakpoints();
812
-
813
- $style = '<style>';
814
- $style .= '@media ( max-width: ' . $breakpoints['lg'] . 'px ) {';
815
- $style .= '.premium-blog-entry-title {';
816
- $style .= 'line-height: 1;';
817
- $style .= '}';
818
- $style .= '.premium-blog-entry-title a {';
819
- $style .= 'font-size: 18px;';
820
- $style .= '}';
821
- $style .= '}';
822
- $style .= '@media ( max-width: ' . $breakpoints['md'] . 'px ) {';
823
- $style .= '.premium-blog-post-container {';
824
- $style .= 'width: 100% !important;';
825
- $style .= '}';
826
- $style .= '.premium-blog-content-wrapper {';
827
- $style .= 'padding: 15px;';
828
- $style .= '}';
829
- $style .= '.premium-blog-entry-title {';
830
- $style .= 'line-height: 1;';
831
- $style .= '}';
832
- $style .= '.premium-blog-entry-title a {';
833
- $style .= 'font-size: 16px;';
834
- $style .= '}';
835
- $style .= '}';
836
- $style .= '</style>';
837
-
838
- return $style;
839
 
840
  }
841
 
@@ -866,11 +865,11 @@ class Premium_Blog_Widget extends Widget_Base
866
  $post_args = premium_blog_get_post_settings($settings);
867
 
868
  $posts = premium_blog_get_post_data($post_args, $paged , $new_offset);
869
-
870
- $excerpt_type = $settings['premium_blog_excerpt_type'];
871
  $excerpt_text = $settings['premium_blog_excerpt_text'];
872
-
873
- switch($settings['premium_blog_columns_number']){
874
  case '50%' :
875
  $col_number = 'col-2';
876
  break;
@@ -881,8 +880,10 @@ class Premium_Blog_Widget extends Widget_Base
881
  $col_number = 'col-4';
882
  break;
883
  }
 
 
884
  ?>
885
- <div class="premium-blog-wrap <?php echo esc_attr($col_number); ?>" data-masonry="<?php echo esc_attr($settings['premium_blog_masonry']); ?>">
886
  <?php
887
  if(count($posts)){
888
  global $post;
@@ -921,7 +922,7 @@ if(count($posts)){
921
  </div>
922
  <?php endif; ?>
923
  <div class="premium-blog-entry-container">
924
- <<?php echo $settings['premium_blog_title_tag']; ?> class="premium-blog-entry-title"><a href="<?php the_permalink(); ?>" target="<?php echo esc_attr($target); ?>"><?php the_title(); ?></a></<?php echo $settings['premium_blog_title_tag']; ?>>
925
  <div class="premium-blog-entry-meta" style="<?php if( $settings['premium_blog_post_format_icon'] !== 'yes' ) : echo 'margin-left:0px'; endif; ?>">
926
  <?php if( $settings['premium_blog_author_meta'] === 'yes' ) : ?>
927
  <span class="premium-blog-post-author premium-blog-meta-data"><i class="fa fa-user fa-fw"></i><?php the_author_posts_link();?></span>
@@ -956,7 +957,7 @@ if(count($posts)){
956
  </div>
957
  </div>
958
  <?php }?>
959
- <div class="premium-blog-clear-fix"></div>
960
  </div>
961
  <?php if ( $settings['premium_blog_paging'] === 'yes' ) : ?>
962
  <div class="premium-blog-pagination-container">
@@ -984,8 +985,8 @@ if(count($posts)){
984
  </div>
985
  <?php endif; ?>
986
  <?php
987
- echo $this->get_blog_responsive_style();
988
- wp_reset_postdata();
989
 
990
  } ?>
991
 
@@ -994,4 +995,4 @@ if(count($posts)){
994
  <?php
995
  }
996
  }
997
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
11
  return 'premium-addon-blog';
12
  }
13
 
14
+ public function get_title() {
15
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Blog';
16
  }
17
+
18
  public function is_reload_preview_required(){
19
  return true;
20
  }
21
+
22
+ public function get_script_depends(){
23
  return [
24
  'isotope-js',
25
  'premium-addons-js'
52
  'type' => Controls_Manager::SELECT,
53
  'description' => esc_html__('Choose a hover effect for the image','premium-addons-for-elementor'),
54
  'options' => [
55
+ 'none' => esc_html__('None', 'premium-addons-for-elementor'),
56
  'zoomin' => esc_html__('Zoom In', 'premium-addons-for-elementor'),
57
  'zoomout'=> esc_html__('Zoom Out', 'premium-addons-for-elementor'),
58
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
59
  'gray' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
60
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
61
+ 'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
62
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
63
  'trans' => esc_html__('Translate', 'premium-addons-for-elementor'),
64
  ],
106
  'options' => premium_addons_post_type_categories(),
107
  ]
108
  );
109
+
110
+ $this->add_control('premium_blog_title_tag',
111
+ [
112
+ 'label' => esc_html__( 'Title HTML Tag', 'premium-addons-for-elementor' ),
113
+ 'description' => esc_html__( 'Select a heading tag for the post title.', 'premium-addons-for-elementor' ),
114
+ 'type' => Controls_Manager::SELECT,
115
+ 'default' => 'h2',
116
  'options' => [
117
+ 'h1' => 'H1',
118
+ 'h2' => 'H2',
119
+ 'h3' => 'H3',
120
+ 'h4' => 'H4',
121
+ 'h5' => 'H5',
122
+ 'h6' => 'H6',
123
+ ],
124
+ 'label_block' => true,
125
+ ]
126
+ );
127
 
128
  /*Grid*/
129
  $this->add_control('premium_blog_grid',
132
  'type' => Controls_Manager::SWITCHER,
133
  ]
134
  );
135
+
136
+ /*Masonry*/
137
  $this->add_control('premium_blog_masonry',
138
  [
139
  'label' => esc_html__('Masonry', 'premium-addons-for-elementor'),
145
  ]
146
  );
147
 
148
+ /*Grid Number of Columns*/
149
  $this->add_control('premium_blog_columns_number',
150
  [
151
  'label' => esc_html__('Number of Columns', 'premium-addons-for-elementor'),
164
  ]
165
  ]
166
  );
167
+
168
+ /*Grid Spacing*/
169
+ $this->add_responsive_control('premium_blog_posts_spacing',
170
  [
171
  'label' => esc_html__('Spacing', 'premium-addons-for-elementor'),
172
  'type' => Controls_Manager::SLIDER,
185
  ]
186
  ]
187
  );
 
188
 
189
  /*Excerpt*/
190
  $this->add_control('premium_blog_excerpt',
630
  [
631
  'label' => esc_html__('Post Format Icon', 'premium-addons-for-elementor'),
632
  'tab' => Controls_Manager::TAB_STYLE,
633
+ 'condition' => [
634
+ 'premium_blog_post_format_icon' => 'yes'
635
+ ]
636
  ]
637
  );
638
 
804
  $this->end_controls_section();
805
 
806
  }
807
+
808
+ protected function get_blog_responsive_style() {
809
+
810
+ $breakpoints = Responsive::get_breakpoints();
811
+
812
+ $style = '<style>';
813
+ $style .= '@media ( max-width: ' . $breakpoints['lg'] . 'px ) {';
814
+ $style .= '.premium-blog-entry-title {';
815
+ $style .= 'line-height: 1;';
816
+ $style .= '}';
817
+ $style .= '.premium-blog-entry-title a {';
818
+ $style .= 'font-size: 18px;';
819
+ $style .= '}';
820
+ $style .= '}';
821
+ $style .= '@media ( max-width: ' . $breakpoints['md'] . 'px ) {';
822
+ $style .= '.premium-blog-post-container {';
823
+ $style .= 'width: 100% !important;';
824
+ $style .= '}';
825
+ $style .= '.premium-blog-content-wrapper {';
826
+ $style .= 'padding: 15px;';
827
+ $style .= '}';
828
+ $style .= '.premium-blog-entry-title {';
829
+ $style .= 'line-height: 1;';
830
+ $style .= '}';
831
+ $style .= '.premium-blog-entry-title a {';
832
+ $style .= 'font-size: 16px;';
833
+ $style .= '}';
834
+ $style .= '}';
835
+ $style .= '</style>';
836
+
837
+ return $style;
838
 
839
  }
840
 
865
  $post_args = premium_blog_get_post_settings($settings);
866
 
867
  $posts = premium_blog_get_post_data($post_args, $paged , $new_offset);
868
+
869
+ $excerpt_type = $settings['premium_blog_excerpt_type'];
870
  $excerpt_text = $settings['premium_blog_excerpt_text'];
871
+
872
+ switch($settings['premium_blog_columns_number']){
873
  case '50%' :
874
  $col_number = 'col-2';
875
  break;
880
  $col_number = 'col-4';
881
  break;
882
  }
883
+
884
+
885
  ?>
886
+ <div class="premium-blog-wrap <?php echo esc_attr($col_number); ?>" data-pa-masonry="<?php echo esc_attr($settings['premium_blog_masonry']); ?>">
887
  <?php
888
  if(count($posts)){
889
  global $post;
922
  </div>
923
  <?php endif; ?>
924
  <div class="premium-blog-entry-container">
925
+ <<?php echo $settings['premium_blog_title_tag']; ?> class="premium-blog-entry-title"><a href="<?php the_permalink(); ?>" target="<?php echo esc_attr($target); ?>"><?php the_title(); ?></a></<?php echo $settings['premium_blog_title_tag']; ?>>
926
  <div class="premium-blog-entry-meta" style="<?php if( $settings['premium_blog_post_format_icon'] !== 'yes' ) : echo 'margin-left:0px'; endif; ?>">
927
  <?php if( $settings['premium_blog_author_meta'] === 'yes' ) : ?>
928
  <span class="premium-blog-post-author premium-blog-meta-data"><i class="fa fa-user fa-fw"></i><?php the_author_posts_link();?></span>
957
  </div>
958
  </div>
959
  <?php }?>
960
+ <div class="premium-blog-clear-fix"></div>
961
  </div>
962
  <?php if ( $settings['premium_blog_paging'] === 'yes' ) : ?>
963
  <div class="premium-blog-pagination-container">
985
  </div>
986
  <?php endif; ?>
987
  <?php
988
+ echo $this->get_blog_responsive_style();
989
+ wp_reset_postdata();
990
 
991
  } ?>
992
 
995
  <?php
996
  }
997
  }
998
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
widgets/premium-button.php CHANGED
@@ -16,9 +16,9 @@ class Premium_Button_Widget extends Widget_Base
16
  public function getTemplateInstance() {
17
  return $this->templateInstance = premium_Template_Tags::getInstance();
18
  }
19
-
20
- public function get_title(){
21
- return esc_html__('Premium Button', 'premium-addons-for-elementor');
22
  }
23
 
24
  public function get_icon() {
@@ -45,7 +45,7 @@ class Premium_Button_Widget extends Widget_Base
45
  [
46
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
47
  'type' => Controls_Manager::TEXT,
48
- 'dynamic' => [ 'active' => true ],
49
  'default' => esc_html__('Click Me','premium-addons-for-elementor'),
50
  'label_block' => true,
51
  ]
@@ -827,4 +827,4 @@ class Premium_Button_Widget extends Widget_Base
827
  <?php
828
  }
829
  }
830
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Button_Widget());
16
  public function getTemplateInstance() {
17
  return $this->templateInstance = premium_Template_Tags::getInstance();
18
  }
19
+
20
+ public function get_title() {
21
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Button';
22
  }
23
 
24
  public function get_icon() {
45
  [
46
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
47
  'type' => Controls_Manager::TEXT,
48
+ 'dynamic' => [ 'active' => true ],
49
  'default' => esc_html__('Click Me','premium-addons-for-elementor'),
50
  'label_block' => true,
51
  ]
827
  <?php
828
  }
829
  }
830
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Button_Widget());
widgets/premium-carousel.php CHANGED
@@ -15,7 +15,7 @@ class Premium_Carousel_Widget extends Widget_Base {
15
  }
16
 
17
  public function get_title() {
18
- return esc_html__( 'Premium Carousel', 'premium-addons-for-elementor' );
19
  }
20
 
21
  public function get_icon() {
@@ -708,7 +708,7 @@ class Premium_Carousel_Widget extends Widget_Base {
708
  $slides_on_mob = $slides_on_desk;
709
  }
710
 
711
- $responsive = 'responsive : [{breakpoint: 1025,settings: {slidesToShow: ' . $slides_on_desk . ',slidesToScroll: ' . $slidesToScroll . '}},{breakpoint: 769,settings: {slidesToShow: ' . $slides_on_tabs . ',slidesToScroll: ' . $slides_on_tabs . '}},{breakpoint: 481,settings: {slidesToShow: ' . $slides_on_mob . ',slidesToScroll: ' . $slides_on_mob . '}}]';
712
 
713
  if( $settings['premium_carousel_loop'] == 'yes' ) {
714
  $infinite = true;
@@ -963,4 +963,4 @@ class Premium_Carousel_Widget extends Widget_Base {
963
  <?php
964
  }
965
  }
966
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
15
  }
16
 
17
  public function get_title() {
18
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Carousel';
19
  }
20
 
21
  public function get_icon() {
708
  $slides_on_mob = $slides_on_desk;
709
  }
710
 
711
+ $responsive = '[{breakpoint: 1025,settings: {slidesToShow: ' . $slides_on_desk . ',slidesToScroll: ' . $slidesToScroll . '}},{breakpoint: 769,settings: {slidesToShow: ' . $slides_on_tabs . ',slidesToScroll: ' . $slides_on_tabs . '}},{breakpoint: 481,settings: {slidesToShow: ' . $slides_on_mob . ',slidesToScroll: ' . $slides_on_mob . '}}]';
712
 
713
  if( $settings['premium_carousel_loop'] == 'yes' ) {
714
  $infinite = true;
963
  <?php
964
  }
965
  }
966
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
widgets/premium-contactform.php CHANGED
@@ -10,7 +10,7 @@ class Premium_ContactForm7_Widget extends Widget_Base {
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__( 'Premium Contact Form7', 'premium-addons-for-elementor' );
14
  }
15
 
16
  public function get_icon() {
@@ -610,4 +610,4 @@ class Premium_ContactForm7_Widget extends Widget_Base {
610
  }
611
  }
612
 
613
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_ContactForm7_Widget() );
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Contact Form7';
14
  }
15
 
16
  public function get_icon() {
610
  }
611
  }
612
 
613
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_ContactForm7_Widget() );
widgets/premium-countdown.php CHANGED
@@ -8,7 +8,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
8
  }
9
 
10
  public function get_title() {
11
- return esc_html__( 'Premium Countdown', 'premium-addons-for-elementor' );
12
  }
13
 
14
  public function get_icon() {
@@ -509,4 +509,4 @@ class Premium_Counter_Down_Widget extends Widget_Base {
509
  }
510
  }
511
 
512
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
8
  }
9
 
10
  public function get_title() {
11
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Countdown';
12
  }
13
 
14
  public function get_icon() {
509
  }
510
  }
511
 
512
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
widgets/premium-counter.php CHANGED
@@ -10,7 +10,7 @@ class Premium_Counter_Widget extends Widget_Base {
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__( 'Premium Counter', 'premium-addons-for-elementor' );
14
  }
15
 
16
  public function get_icon() {
@@ -38,7 +38,7 @@ class Premium_Counter_Widget extends Widget_Base {
38
  [
39
  'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ),
40
  'type' => Controls_Manager::TEXT,
41
- 'dynamic' => [ 'active' => true ],
42
  'description' => esc_html__( 'Enter title for stats counter block', 'premium-addons-for-elementor'),
43
  ]
44
  );
@@ -82,7 +82,7 @@ class Premium_Counter_Widget extends Widget_Base {
82
  [
83
  'label' => esc_html__( 'Value Prefix', 'premium-addons-for-elementor' ),
84
  'type' => Controls_Manager::TEXT,
85
- 'dynamic' => [ 'active' => true ],
86
  'description' => esc_html__( 'Enter prefix for counter value', 'premium-addons-for-elementor' )
87
  ]
88
  );
@@ -91,7 +91,7 @@ class Premium_Counter_Widget extends Widget_Base {
91
  [
92
  'label' => esc_html__( 'Value suffix', 'premium-addons-for-elementor' ),
93
  'type' => Controls_Manager::TEXT,
94
- 'dynamic' => [ 'active' => true ],
95
  'description' => esc_html__( 'Enter suffix for counter value', 'premium-addons-for-elementor' )
96
  ]
97
  );
@@ -541,7 +541,7 @@ class Premium_Counter_Widget extends Widget_Base {
541
 
542
  <span class="premium-counter-init" id="counter-<?php echo esc_attr($this->get_id()); ?>"><?php echo $exact_value; ?></span>
543
 
544
- <?php if (!empty( $settings['premium_counter_suffix'] ) ) : ?><span id="suffix" class="counter-su-suff"><?php echo $settings['premium_counter_suffix']; ?></span><?php endif; ?>
545
 
546
  <?php if (!empty( $settings['premium_counter_title'] ) ) : ?><h4 class="premium-counter-title"><div <?php echo $this->get_render_attribute_string('premium_counter_title'); ?>><?php echo $settings['premium_counter_title'];?></div></h4><?php endif; ?>
547
  </div>
@@ -554,7 +554,7 @@ class Premium_Counter_Widget extends Widget_Base {
554
 
555
  <?php else: ?>
556
 
557
- <?php if( !empty( $settings['premium_counter_icon'] ) || !empty( $settings['pct_image_upload'] ) ) : ?>
558
  <div class="premium-counter-icon<?php echo $left; ?>">
559
  <span data-animation="<?php echo $animation; ?>" class="icon<?php echo $flex_width; ?><?php echo $icon_style; ?>"><?php echo $icon_image; ?></span>
560
  </div>
@@ -566,7 +566,7 @@ class Premium_Counter_Widget extends Widget_Base {
566
 
567
  <span class="premium-counter-init" id="counter-<?php echo esc_attr($this->get_id()); ?>"><?php echo $exact_value; ?></span>
568
 
569
- <?php if (!empty( $settings['premium_counter_suffix'] ) ) : ?><span id="suffix" class="counter-su-suff"><?php echo $settings['premium_counter_suffix']; ?></span><?php endif; ?>
570
 
571
  <?php if (!empty( $settings['premium_counter_title'] ) ) : ?><h4 class="premium-counter-title"><div <?php echo $this->get_render_attribute_string('premium_counter_title'); ?>><?php echo $settings['premium_counter_title'];?></div></h4><?php endif; ?>
572
  </div>
@@ -579,4 +579,4 @@ class Premium_Counter_Widget extends Widget_Base {
579
  }
580
  }
581
 
582
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Widget() );
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Counter';
14
  }
15
 
16
  public function get_icon() {
38
  [
39
  'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ),
40
  'type' => Controls_Manager::TEXT,
41
+ 'dynamic' => [ 'active' => true ],
42
  'description' => esc_html__( 'Enter title for stats counter block', 'premium-addons-for-elementor'),
43
  ]
44
  );
82
  [
83
  'label' => esc_html__( 'Value Prefix', 'premium-addons-for-elementor' ),
84
  'type' => Controls_Manager::TEXT,
85
+ 'dynamic' => [ 'active' => true ],
86
  'description' => esc_html__( 'Enter prefix for counter value', 'premium-addons-for-elementor' )
87
  ]
88
  );
91
  [
92
  'label' => esc_html__( 'Value suffix', 'premium-addons-for-elementor' ),
93
  'type' => Controls_Manager::TEXT,
94
+ 'dynamic' => [ 'active' => true ],
95
  'description' => esc_html__( 'Enter suffix for counter value', 'premium-addons-for-elementor' )
96
  ]
97
  );
541
 
542
  <span class="premium-counter-init" id="counter-<?php echo esc_attr($this->get_id()); ?>"><?php echo $exact_value; ?></span>
543
 
544
+ <?php if (!empty( $settings['premium_counter_suffix'] ) ) : ?><span id="suffix" class="counter-su-pre"><?php echo $settings['premium_counter_suffix']; ?></span><?php endif; ?>
545
 
546
  <?php if (!empty( $settings['premium_counter_title'] ) ) : ?><h4 class="premium-counter-title"><div <?php echo $this->get_render_attribute_string('premium_counter_title'); ?>><?php echo $settings['premium_counter_title'];?></div></h4><?php endif; ?>
547
  </div>
554
 
555
  <?php else: ?>
556
 
557
+ <?php if( !empty( $settings['premium_counter_icon'] ) || !empty( $settings['premium_counter_image_upload'] ) ) : ?>
558
  <div class="premium-counter-icon<?php echo $left; ?>">
559
  <span data-animation="<?php echo $animation; ?>" class="icon<?php echo $flex_width; ?><?php echo $icon_style; ?>"><?php echo $icon_image; ?></span>
560
  </div>
566
 
567
  <span class="premium-counter-init" id="counter-<?php echo esc_attr($this->get_id()); ?>"><?php echo $exact_value; ?></span>
568
 
569
+ <?php if (!empty( $settings['premium_counter_suffix'] ) ) : ?><span id="suffix" class="counter-su-pre"><?php echo $settings['premium_counter_suffix']; ?></span><?php endif; ?>
570
 
571
  <?php if (!empty( $settings['premium_counter_title'] ) ) : ?><h4 class="premium-counter-title"><div <?php echo $this->get_render_attribute_string('premium_counter_title'); ?>><?php echo $settings['premium_counter_title'];?></div></h4><?php endif; ?>
572
  </div>
579
  }
580
  }
581
 
582
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Widget() );
widgets/premium-dual-header.php CHANGED
@@ -14,11 +14,12 @@ class Premium_Dual_Header_Widget extends Widget_Base
14
  public function get_name() {
15
  return 'premium-addon-dual-header';
16
  }
17
-
18
- public function get_title(){
19
- return esc_html__('Premium Dual Heading', 'premium-addons-for-elementor');
20
  }
21
-
 
22
  public function get_icon() {
23
  return 'pa-dual-header';
24
  }
@@ -43,7 +44,7 @@ class Premium_Dual_Header_Widget extends Widget_Base
43
  [
44
  'label' => esc_html__('First Heading', 'premium-addons-for-elementor'),
45
  'type' => Controls_Manager::TEXT,
46
- 'dynamic' => [ 'active' => true ],
47
  'default' => esc_html__('Premium', 'premium-addons-for-elementor'),
48
  'label_block' => true,
49
  ]
@@ -72,7 +73,7 @@ class Premium_Dual_Header_Widget extends Widget_Base
72
  [
73
  'label' => esc_html__('Second Heading', 'premium-addons-for-elementor'),
74
  'type' => Controls_Manager::TEXT,
75
- 'dynamic' => [ 'active' => true ],
76
  'default' => esc_html__('Addons', 'premium-addons-for-elementor'),
77
  'label_block' => true,
78
  ]
@@ -511,4 +512,3 @@ class Premium_Dual_Header_Widget extends Widget_Base
511
  }
512
  }
513
  Plugin::instance()->widgets_manager->register_widget_type(new Premium_Dual_Header_Widget());
514
-
14
  public function get_name() {
15
  return 'premium-addon-dual-header';
16
  }
17
+
18
+ public function get_title() {
19
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Dual Heading';
20
  }
21
+
22
+
23
  public function get_icon() {
24
  return 'pa-dual-header';
25
  }
44
  [
45
  'label' => esc_html__('First Heading', 'premium-addons-for-elementor'),
46
  'type' => Controls_Manager::TEXT,
47
+ 'dynamic' => [ 'active' => true ],
48
  'default' => esc_html__('Premium', 'premium-addons-for-elementor'),
49
  'label_block' => true,
50
  ]
73
  [
74
  'label' => esc_html__('Second Heading', 'premium-addons-for-elementor'),
75
  'type' => Controls_Manager::TEXT,
76
+ 'dynamic' => [ 'active' => true ],
77
  'default' => esc_html__('Addons', 'premium-addons-for-elementor'),
78
  'label_block' => true,
79
  ]
512
  }
513
  }
514
  Plugin::instance()->widgets_manager->register_widget_type(new Premium_Dual_Header_Widget());
 
widgets/premium-fancytext.php CHANGED
@@ -10,8 +10,8 @@ class Premium_Fancy_Text_Widget extends Widget_Base
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__('Premium Fancy Text', 'premium-addons-for-elementor');
14
- }
15
 
16
  public function get_icon() {
17
  return 'pa-fancy-text';
@@ -42,7 +42,7 @@ class Premium_Fancy_Text_Widget extends Widget_Base
42
  [
43
  'label' => esc_html__('Prefix', 'premium-addons-for-elementor'),
44
  'type' => Controls_Manager::TEXT,
45
- 'dynamic' => [ 'active' => true ],
46
  'default' => esc_html__('This is', 'premium-addons-for-elementor'),
47
  'description' => esc_html__( 'Text before Fancy text', 'premium-addons-for-elementor' ),
48
  'label_block' => true,
@@ -78,15 +78,15 @@ class Premium_Fancy_Text_Widget extends Widget_Base
78
  ],
79
  'fields' => array_values( $repeater->get_controls() ),
80
  'title_field' => '{{{ premium_text_strings_text_field }}}',
81
- ]
82
- );
83
 
84
  /*Prefix Text*/
85
  $this->add_control('premium_fancy_suffix_text',
86
  [
87
  'label' => esc_html__('Suffix', 'premium-addons-for-elementor'),
88
  'type' => Controls_Manager::TEXT,
89
- 'dynamic' => [ 'active' => true ],
90
  'default' => esc_html__('Text', 'premium-addons-for-elementor'),
91
  'description' => esc_html__( 'Text after Fancy text', 'premium-addons-for-elementor' ),
92
  'label_block' => true,
@@ -338,7 +338,7 @@ class Premium_Fancy_Text_Widget extends Widget_Base
338
  /*End Fancy Text Settings Tab*/
339
  $this->end_controls_section();
340
 
341
- /*Start Cursor Settings Tab*/
342
  $this->start_controls_section('premium_fancy_cursor_text_style_tab',
343
  [
344
  'label' => esc_html__('Cursor Text', 'premium-addons-for-elementor'),
@@ -364,7 +364,7 @@ class Premium_Fancy_Text_Widget extends Widget_Base
364
  ]
365
  );
366
 
367
- /*Cursor Typography*/
368
  $this->add_group_control(
369
  Group_Control_Typography::get_type(),
370
  [
@@ -385,7 +385,7 @@ class Premium_Fancy_Text_Widget extends Widget_Base
385
  ]
386
  );
387
 
388
- /*End Cursor Style Tab*/
389
  $this->end_controls_section();
390
 
391
  /*Start Prefix Suffix Text Settings Tab*/
@@ -497,4 +497,4 @@ class Premium_Fancy_Text_Widget extends Widget_Base
497
  <?php
498
  }
499
  }
500
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Fancy_Text_Widget());
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Fancy Text';
14
+ }
15
 
16
  public function get_icon() {
17
  return 'pa-fancy-text';
42
  [
43
  'label' => esc_html__('Prefix', 'premium-addons-for-elementor'),
44
  'type' => Controls_Manager::TEXT,
45
+ 'dynamic' => [ 'active' => true ],
46
  'default' => esc_html__('This is', 'premium-addons-for-elementor'),
47
  'description' => esc_html__( 'Text before Fancy text', 'premium-addons-for-elementor' ),
48
  'label_block' => true,
78
  ],
79
  'fields' => array_values( $repeater->get_controls() ),
80
  'title_field' => '{{{ premium_text_strings_text_field }}}',
81
+ ]
82
+ );
83
 
84
  /*Prefix Text*/
85
  $this->add_control('premium_fancy_suffix_text',
86
  [
87
  'label' => esc_html__('Suffix', 'premium-addons-for-elementor'),
88
  'type' => Controls_Manager::TEXT,
89
+ 'dynamic' => [ 'active' => true ],
90
  'default' => esc_html__('Text', 'premium-addons-for-elementor'),
91
  'description' => esc_html__( 'Text after Fancy text', 'premium-addons-for-elementor' ),
92
  'label_block' => true,
338
  /*End Fancy Text Settings Tab*/
339
  $this->end_controls_section();
340
 
341
+ /*Start Cursor Settings Tab*/
342
  $this->start_controls_section('premium_fancy_cursor_text_style_tab',
343
  [
344
  'label' => esc_html__('Cursor Text', 'premium-addons-for-elementor'),
364
  ]
365
  );
366
 
367
+ /*Cursor Typography*/
368
  $this->add_group_control(
369
  Group_Control_Typography::get_type(),
370
  [
385
  ]
386
  );
387
 
388
+ /*End Fancy Text Settings Tab*/
389
  $this->end_controls_section();
390
 
391
  /*Start Prefix Suffix Text Settings Tab*/
497
  <?php
498
  }
499
  }
500
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Fancy_Text_Widget());
widgets/premium-grid.php CHANGED
@@ -14,20 +14,20 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
14
  return $this->templateInstance = premium_Template_Tags::getInstance();
15
  }
16
 
 
 
 
 
17
  public function get_icon(){
18
  return 'pa-grid-icon';
19
  }
20
-
21
- public function get_title(){
22
- return esc_html__('Premium Grid', 'premium-addons-for-elementor');
23
- }
24
 
25
  public function get_script_depends(){
26
  return [
27
- 'premium-addons-js',
28
- 'prettyPhoto-js',
29
- 'isotope-js'
30
- ];
31
  }
32
 
33
  public function is_reload_preview_required(){
@@ -108,28 +108,28 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
108
  'name' => 'premium_gallery_img_name',
109
  'label' => esc_html__( 'Name', 'premium-addons-for-elementor' ),
110
  'type' => Controls_Manager::TEXT,
111
- 'dynamic' => [ 'active' => true ],
112
  'label_block' => true,
113
  ],
114
  [
115
  'name' => 'premium_gallery_img_alt',
116
  'label' => esc_html__( 'Alt', 'premium-addons-for-elementor' ),
117
  'type' => Controls_Manager::TEXT,
118
- 'dynamic' => [ 'active' => true ],
119
  'label_block' => true,
120
  ],
121
  [
122
  'name' => 'premium_gallery_img_desc',
123
  'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
124
  'type' => Controls_Manager::TEXTAREA,
125
- 'dynamic' => [ 'active' => true ],
126
  'label_block' => true,
127
  ],
128
  [
129
  'name' => 'premium_gallery_img_category',
130
  'label' => esc_html__( 'Category', 'premium-addons-for-elementor' ),
131
  'type' => Controls_Manager::TEXT,
132
- 'dynamic' => [ 'active' => true ],
133
  ],
134
  [
135
  'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
@@ -286,7 +286,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
286
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
287
  'gray' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
288
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
289
- 'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
290
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
291
  'trans' => esc_html__('Translate', 'premium-addons-for-elementor'),
292
  ],
@@ -776,7 +776,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
776
  'label' => esc_html__('Overlay Color', 'premium-addons-for-elementor'),
777
  'type' => Controls_Manager::COLOR,
778
  'selectors' => [
779
- '{{WRAPPER}} .pa-gallery-img.default:hover .pa-gallery-icons-wrapper, {{WRAPPER}} .pa-gallery-img:hover .pa-gallery-icons-caption-container,{{WRAPPER}} .pa-gallery-img.style1:hover .pa-gallery-icons-wrapper' => 'background-color: {{VALUE}};',
780
  ],
781
  ]
782
  );
@@ -1248,4 +1248,4 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
1248
  <?php endif; ?>
1249
  <?php }
1250
  }
1251
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Gallery_Widget());
14
  return $this->templateInstance = premium_Template_Tags::getInstance();
15
  }
16
 
17
+ public function get_title() {
18
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Grid';
19
+ }
20
+
21
  public function get_icon(){
22
  return 'pa-grid-icon';
23
  }
 
 
 
 
24
 
25
  public function get_script_depends(){
26
  return [
27
+ 'premium-addons-js',
28
+ 'prettyPhoto-js',
29
+ 'isotope-js'
30
+ ];
31
  }
32
 
33
  public function is_reload_preview_required(){
108
  'name' => 'premium_gallery_img_name',
109
  'label' => esc_html__( 'Name', 'premium-addons-for-elementor' ),
110
  'type' => Controls_Manager::TEXT,
111
+ 'dynamic' => [ 'active' => true ],
112
  'label_block' => true,
113
  ],
114
  [
115
  'name' => 'premium_gallery_img_alt',
116
  'label' => esc_html__( 'Alt', 'premium-addons-for-elementor' ),
117
  'type' => Controls_Manager::TEXT,
118
+ 'dynamic' => [ 'active' => true ],
119
  'label_block' => true,
120
  ],
121
  [
122
  'name' => 'premium_gallery_img_desc',
123
  'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
124
  'type' => Controls_Manager::TEXTAREA,
125
+ 'dynamic' => [ 'active' => true ],
126
  'label_block' => true,
127
  ],
128
  [
129
  'name' => 'premium_gallery_img_category',
130
  'label' => esc_html__( 'Category', 'premium-addons-for-elementor' ),
131
  'type' => Controls_Manager::TEXT,
132
+ 'dynamic' => [ 'active' => true ],
133
  ],
134
  [
135
  'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
286
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
287
  'gray' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
288
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
289
+ 'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
290
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
291
  'trans' => esc_html__('Translate', 'premium-addons-for-elementor'),
292
  ],
776
  'label' => esc_html__('Overlay Color', 'premium-addons-for-elementor'),
777
  'type' => Controls_Manager::COLOR,
778
  'selectors' => [
779
+ '{{WRAPPER}} .pa-gallery-img.default:hover .pa-gallery-icons-wrapper, {{WRAPPER}} .pa-gallery-img .pa-gallery-icons-caption-container, {{WRAPPER}} .pa-gallery-img:hover .pa-gallery-icons-caption-container, {{WRAPPER}} .pa-gallery-img.style1:hover .pa-gallery-icons-wrapper' => 'background-color: {{VALUE}};',
780
  ],
781
  ]
782
  );
1248
  <?php endif; ?>
1249
  <?php }
1250
  }
1251
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Gallery_Widget());
widgets/premium-image-button.php CHANGED
@@ -8,6 +8,10 @@ class Premium_Image_Button_Widget extends Widget_Base
8
  public function get_name() {
9
  return 'premium-addon-image-button';
10
  }
 
 
 
 
11
 
12
  public function getTemplateInstance() {
13
  return $this->templateInstance = premium_Template_Tags::getInstance();
@@ -16,10 +20,6 @@ class Premium_Image_Button_Widget extends Widget_Base
16
  public function get_icon() {
17
  return 'pa-image-button';
18
  }
19
-
20
- public function get_title(){
21
- return esc_html__('Premium Image Button', 'premium-addons-for-elementor');
22
- }
23
 
24
  public function get_categories() {
25
  return [ 'premium-elements' ];
@@ -41,7 +41,7 @@ class Premium_Image_Button_Widget extends Widget_Base
41
  [
42
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
43
  'type' => Controls_Manager::TEXT,
44
- 'dynamic' => [ 'active' => true ],
45
  'default' => esc_html__('Click Me','premium-addons-for-elementor'),
46
  'label_block' => true,
47
  ]
@@ -766,4 +766,4 @@ class Premium_Image_Button_Widget extends Widget_Base
766
  <?php
767
  }
768
  }
769
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Button_Widget());
8
  public function get_name() {
9
  return 'premium-addon-image-button';
10
  }
11
+
12
+ public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Image Button';
14
+ }
15
 
16
  public function getTemplateInstance() {
17
  return $this->templateInstance = premium_Template_Tags::getInstance();
20
  public function get_icon() {
21
  return 'pa-image-button';
22
  }
 
 
 
 
23
 
24
  public function get_categories() {
25
  return [ 'premium-elements' ];
41
  [
42
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
43
  'type' => Controls_Manager::TEXT,
44
+ 'dynamic' => [ 'active' => true ],
45
  'default' => esc_html__('Click Me','premium-addons-for-elementor'),
46
  'label_block' => true,
47
  ]
766
  <?php
767
  }
768
  }
769
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Button_Widget());
widgets/{premium-image-separator.php → premium-imageseparator.php} RENAMED
@@ -15,13 +15,13 @@ class Premium_Image_Separator_Widget extends Widget_Base
15
  return 'premium-addon-image-separator';
16
  }
17
 
 
 
 
 
18
  public function get_icon() {
19
  return 'pa-image-separator';
20
  }
21
-
22
- public function get_title(){
23
- return esc_html__('Premium Image Separator', 'premium-addons-for-elementor');
24
- }
25
 
26
  public function get_categories() {
27
  return [ 'premium-elements' ];
@@ -229,4 +229,4 @@ class Premium_Image_Separator_Widget extends Widget_Base
229
  <?php
230
  }
231
  }
232
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Separator_Widget());
15
  return 'premium-addon-image-separator';
16
  }
17
 
18
+ public function get_title() {
19
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Image Separator';
20
+ }
21
+
22
  public function get_icon() {
23
  return 'pa-image-separator';
24
  }
 
 
 
 
25
 
26
  public function get_categories() {
27
  return [ 'premium-elements' ];
229
  <?php
230
  }
231
  }
232
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Separator_Widget());
widgets/premium-maps.php CHANGED
@@ -15,8 +15,8 @@ class Premium_Maps_Widget extends Widget_Base
15
  }
16
 
17
  public function get_title() {
18
- return esc_html__('Premium Maps', 'premium-addons-for-elementor');
19
- }
20
 
21
  public function get_icon() {
22
  return 'pa-maps';
@@ -43,7 +43,7 @@ class Premium_Maps_Widget extends Widget_Base
43
 
44
  $map_api = get_option( 'pa_maps_save_settings' )['premium-map-api'];
45
  $map_api_disable = get_option( 'pa_maps_save_settings' )['premium-map-disable-api'];
46
- if(!isset($map_api) || empty($map_api) || $map_api_disable){
47
  $this->add_control('premium_maps_api_url',
48
  [
49
  'label' => '<span style="line-height: 1.4em;">Premium Maps requires an API key. Get your API key from <a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">here</a> and add it to Premium Addons admin page. Go to Dashboard -> Premium Addons for Elementor -> Google Maps API</span>',
@@ -78,9 +78,9 @@ class Premium_Maps_Widget extends Widget_Base
78
  $this->start_controls_section('premium_maps_map_pins_settings',
79
  [
80
  'label' => esc_html__('Markers', 'premium-addons-for-elementor'),
81
- ]
82
- );
83
-
84
  $repeater = new REPEATER();
85
 
86
  $repeater->add_control('map_latitude',
@@ -618,4 +618,4 @@ class Premium_Maps_Widget extends Widget_Base
618
  <?php
619
  }
620
  }
621
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Maps_Widget());
15
  }
16
 
17
  public function get_title() {
18
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Maps';
19
+ }
20
 
21
  public function get_icon() {
22
  return 'pa-maps';
43
 
44
  $map_api = get_option( 'pa_maps_save_settings' )['premium-map-api'];
45
  $map_api_disable = get_option( 'pa_maps_save_settings' )['premium-map-disable-api'];
46
+ if( ! isset( $map_api ) || empty( $map_api ) || $map_api_disable ){
47
  $this->add_control('premium_maps_api_url',
48
  [
49
  'label' => '<span style="line-height: 1.4em;">Premium Maps requires an API key. Get your API key from <a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">here</a> and add it to Premium Addons admin page. Go to Dashboard -> Premium Addons for Elementor -> Google Maps API</span>',
78
  $this->start_controls_section('premium_maps_map_pins_settings',
79
  [
80
  'label' => esc_html__('Markers', 'premium-addons-for-elementor'),
81
+ ]
82
+ );
83
+
84
  $repeater = new REPEATER();
85
 
86
  $repeater->add_control('map_latitude',
618
  <?php
619
  }
620
  }
621
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Maps_Widget());
widgets/premium-modalbox.php CHANGED
@@ -18,8 +18,8 @@ class Premium_Modal_Box_Widget extends Widget_Base
18
  }
19
 
20
  public function get_title() {
21
- return esc_html__('Premium Modal Box', 'premium-addons-for-elementor');
22
- }
23
 
24
  public function get_icon() {
25
  return 'pa-modal-box';
@@ -110,7 +110,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
110
  [
111
  'label' => esc_html__('Title', 'premium-addons-for-elementor'),
112
  'type' => Controls_Manager::TEXT,
113
- 'dynamic' => [ 'active' => true ],
114
  'description' => esc_html__('Provide the modal box with a title', 'premium-addons-for-elementor'),
115
  'default' => 'Modal Box Title',
116
  'condition' => [
@@ -160,8 +160,8 @@ class Premium_Modal_Box_Widget extends Widget_Base
160
  [
161
  'type' => Controls_Manager::WYSIWYG,
162
  'default' => 'Modal Box Content',
163
- 'dynamic' => [ 'active' => true ],
164
  'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
 
165
  'condition' => [
166
  'premium_modal_box_content_type' => 'editor',
167
  ],
@@ -221,7 +221,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
221
  'label' => esc_html__('Button Text', 'premium-addons-for-elementor'),
222
  'default' => esc_html__('Premium Modal Box','premium-addons-for-elementor'),
223
  'type' => Controls_Manager::TEXT,
224
- 'dynamic' => [ 'active' => true ],
225
  'label_block' => true,
226
  'condition' => [
227
  'premium_modal_box_display_on' => 'button'
@@ -407,7 +407,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
407
  [
408
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
409
  'type' => Controls_Manager::TEXT,
410
- 'dynamic' => [ 'active' => true ],
411
  'label_block' => true,
412
  'default' => esc_html__('Premium Modal Box', 'premium-addons-for-elementor'),
413
  'condition' => [
@@ -1262,4 +1262,4 @@ class Premium_Modal_Box_Widget extends Widget_Base
1262
  <?php
1263
  }
1264
  }
1265
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Modal_Box_Widget());
18
  }
19
 
20
  public function get_title() {
21
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Modal Box';
22
+ }
23
 
24
  public function get_icon() {
25
  return 'pa-modal-box';
110
  [
111
  'label' => esc_html__('Title', 'premium-addons-for-elementor'),
112
  'type' => Controls_Manager::TEXT,
113
+ 'dynamic' => [ 'active' => true ],
114
  'description' => esc_html__('Provide the modal box with a title', 'premium-addons-for-elementor'),
115
  'default' => 'Modal Box Title',
116
  'condition' => [
160
  [
161
  'type' => Controls_Manager::WYSIWYG,
162
  'default' => 'Modal Box Content',
 
163
  'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
164
+ 'dynamic' => [ 'active' => true ],
165
  'condition' => [
166
  'premium_modal_box_content_type' => 'editor',
167
  ],
221
  'label' => esc_html__('Button Text', 'premium-addons-for-elementor'),
222
  'default' => esc_html__('Premium Modal Box','premium-addons-for-elementor'),
223
  'type' => Controls_Manager::TEXT,
224
+ 'dynamic' => [ 'active' => true ],
225
  'label_block' => true,
226
  'condition' => [
227
  'premium_modal_box_display_on' => 'button'
407
  [
408
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
409
  'type' => Controls_Manager::TEXT,
410
+ 'dynamic' => [ 'active' => true ],
411
  'label_block' => true,
412
  'default' => esc_html__('Premium Modal Box', 'premium-addons-for-elementor'),
413
  'condition' => [
1262
  <?php
1263
  }
1264
  }
1265
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Modal_Box_Widget());
widgets/premium-person.php CHANGED
@@ -10,8 +10,8 @@ class Premium_Person_Widget extends Widget_Base
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__('Premium Person', 'premium-addons-for-elementor');
14
- }
15
 
16
  public function get_icon() {
17
  return 'pa-person';
@@ -100,13 +100,13 @@ class Premium_Person_Widget extends Widget_Base
100
  'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
101
  'type' => Controls_Manager::SELECT,
102
  'options' => [
103
- 'none' => esc_html__('None', 'premium-addons-for-elementor'),
104
  'zoomin' => esc_html__('Zoom In', 'premium-addons-for-elementor'),
105
  'zoomout'=> esc_html__('Zoom Out', 'premium-addons-for-elementor'),
106
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
107
- 'grayscale' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
108
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
109
- 'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
110
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
111
  'trans' => esc_html__('Translate', 'premium-addons-for-elementor'),
112
  ],
@@ -130,7 +130,7 @@ class Premium_Person_Widget extends Widget_Base
130
  [
131
  'label' => esc_html__('Name', 'premium-addons-for-elementor'),
132
  'type' => Controls_Manager::TEXT,
133
- 'dynamic' => [ 'active' => true ],
134
  'default' => esc_html__('John Frank', 'premium-addons-for-elementor'),
135
  'label_block' => true,
136
  ]
@@ -187,7 +187,7 @@ class Premium_Person_Widget extends Widget_Base
187
  [
188
  'label' => esc_html__('Description', 'premium-addons-for-elementor'),
189
  'type' => Controls_Manager::WYSIWYG,
190
- 'dynamic' => [ 'active' => true ],
191
  'default' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ullamcorper nulla non metus auctor fringilla','premium-addons-for-elementor'),
192
  ]
193
  );
@@ -233,7 +233,7 @@ class Premium_Person_Widget extends Widget_Base
233
  [
234
  'label' => esc_html__('Facebook', 'premium-addons-for-elementor'),
235
  'type' => Controls_Manager::TEXT,
236
- 'dynamic' => [ 'active' => true ],
237
  'default' => '#',
238
  'label_block' => true,
239
  ]
@@ -244,7 +244,7 @@ class Premium_Person_Widget extends Widget_Base
244
  [
245
  'label' => esc_html__('Twitter', 'premium-addons-for-elementor'),
246
  'type' => Controls_Manager::TEXT,
247
- 'dynamic' => [ 'active' => true ],
248
  'default' => '#',
249
  'label_block' => true,
250
  ]
@@ -255,8 +255,7 @@ class Premium_Person_Widget extends Widget_Base
255
  [
256
  'label' => esc_html__('LinkedIn', 'premium-addons-for-elementor'),
257
  'type' => Controls_Manager::TEXT,
258
- 'dynamic' => [ 'active' => true ],
259
- 'dynamic' => [ 'active' => true ],
260
  'default' => '#',
261
  'label_block' => true,
262
  ]
@@ -267,7 +266,7 @@ class Premium_Person_Widget extends Widget_Base
267
  [
268
  'label' => esc_html__('Google+', 'premium-addons-for-elementor'),
269
  'type' => Controls_Manager::TEXT,
270
- 'dynamic' => [ 'active' => true ],
271
  'default' => '#',
272
  'label_block' => true,
273
  ]
@@ -278,7 +277,7 @@ class Premium_Person_Widget extends Widget_Base
278
  [
279
  'label' => esc_html__('Pinterest', 'premium-addons-for-elementor'),
280
  'type' => Controls_Manager::TEXT,
281
- 'dynamic' => [ 'active' => true ],
282
  'default' => '#',
283
  'label_block' => true,
284
  ]
@@ -289,7 +288,7 @@ class Premium_Person_Widget extends Widget_Base
289
  [
290
  'label' => esc_html__('Dribbble', 'premium-addons-for-elementor'),
291
  'type' => Controls_Manager::TEXT,
292
- 'dynamic' => [ 'active' => true ],
293
  'default' => '#',
294
  'label_block' => true,
295
  ]
@@ -300,7 +299,7 @@ class Premium_Person_Widget extends Widget_Base
300
  [
301
  'label' => esc_html__('Behance', 'premium-addons-for-elementor'),
302
  'type' => Controls_Manager::TEXT,
303
- 'dynamic' => [ 'active' => true ],
304
  'default' => '#',
305
  'label_block' => true,
306
  ]
@@ -311,7 +310,7 @@ class Premium_Person_Widget extends Widget_Base
311
  [
312
  'label' => esc_html__('Email Address', 'premium-addons-for-elementor'),
313
  'type' => Controls_Manager::TEXT,
314
- 'dynamic' => [ 'active' => true ],
315
  'default' => '#',
316
  'label_block' => true,
317
  ]
@@ -563,4 +562,4 @@ class Premium_Person_Widget extends Widget_Base
563
  <?php
564
  }
565
  }
566
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Person_Widget());
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Person';
14
+ }
15
 
16
  public function get_icon() {
17
  return 'pa-person';
100
  'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
101
  'type' => Controls_Manager::SELECT,
102
  'options' => [
103
+ 'none' => esc_html__('None', 'premium-addons-for-elementor'),
104
  'zoomin' => esc_html__('Zoom In', 'premium-addons-for-elementor'),
105
  'zoomout'=> esc_html__('Zoom Out', 'premium-addons-for-elementor'),
106
  'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
107
+ 'grayscale'=> esc_html__('Grayscale', 'premium-addons-for-elementor'),
108
  'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
109
+ 'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
110
  'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
111
  'trans' => esc_html__('Translate', 'premium-addons-for-elementor'),
112
  ],
130
  [
131
  'label' => esc_html__('Name', 'premium-addons-for-elementor'),
132
  'type' => Controls_Manager::TEXT,
133
+ 'dynamic' => [ 'active' => true ],
134
  'default' => esc_html__('John Frank', 'premium-addons-for-elementor'),
135
  'label_block' => true,
136
  ]
187
  [
188
  'label' => esc_html__('Description', 'premium-addons-for-elementor'),
189
  'type' => Controls_Manager::WYSIWYG,
190
+ 'dynamic' => [ 'active' => true ],
191
  'default' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ullamcorper nulla non metus auctor fringilla','premium-addons-for-elementor'),
192
  ]
193
  );
233
  [
234
  'label' => esc_html__('Facebook', 'premium-addons-for-elementor'),
235
  'type' => Controls_Manager::TEXT,
236
+ 'dynamic' => [ 'active' => true ],
237
  'default' => '#',
238
  'label_block' => true,
239
  ]
244
  [
245
  'label' => esc_html__('Twitter', 'premium-addons-for-elementor'),
246
  'type' => Controls_Manager::TEXT,
247
+ 'dynamic' => [ 'active' => true ],
248
  'default' => '#',
249
  'label_block' => true,
250
  ]
255
  [
256
  'label' => esc_html__('LinkedIn', 'premium-addons-for-elementor'),
257
  'type' => Controls_Manager::TEXT,
258
+ 'dynamic' => [ 'active' => true ],
 
259
  'default' => '#',
260
  'label_block' => true,
261
  ]
266
  [
267
  'label' => esc_html__('Google+', 'premium-addons-for-elementor'),
268
  'type' => Controls_Manager::TEXT,
269
+ 'dynamic' => [ 'active' => true ],
270
  'default' => '#',
271
  'label_block' => true,
272
  ]
277
  [
278
  'label' => esc_html__('Pinterest', 'premium-addons-for-elementor'),
279
  'type' => Controls_Manager::TEXT,
280
+ 'dynamic' => [ 'active' => true ],
281
  'default' => '#',
282
  'label_block' => true,
283
  ]
288
  [
289
  'label' => esc_html__('Dribbble', 'premium-addons-for-elementor'),
290
  'type' => Controls_Manager::TEXT,
291
+ 'dynamic' => [ 'active' => true ],
292
  'default' => '#',
293
  'label_block' => true,
294
  ]
299
  [
300
  'label' => esc_html__('Behance', 'premium-addons-for-elementor'),
301
  'type' => Controls_Manager::TEXT,
302
+ 'dynamic' => [ 'active' => true ],
303
  'default' => '#',
304
  'label_block' => true,
305
  ]
310
  [
311
  'label' => esc_html__('Email Address', 'premium-addons-for-elementor'),
312
  'type' => Controls_Manager::TEXT,
313
+ 'dynamic' => [ 'active' => true ],
314
  'default' => '#',
315
  'label_block' => true,
316
  ]
562
  <?php
563
  }
564
  }
565
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Person_Widget());
widgets/premium-pricing-table.php CHANGED
@@ -11,14 +11,14 @@ class Premium_Pricing_Table_Widget extends Widget_Base
11
  return $this->templateInstance = premium_Template_Tags::getInstance();
12
  }
13
 
14
- public function get_title(){
15
- return esc_html__('Premium Pricing Table', 'premium-addons-for-elementor');
16
- }
17
-
18
  public function get_name() {
19
  return 'premium-addon-pricing-table';
20
  }
21
 
 
 
 
 
22
  public function get_icon() {
23
  return 'pa-pricing-table';
24
  }
@@ -67,7 +67,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
67
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
68
  'default' => 'Pricing Table',
69
  'type' => Controls_Manager::TEXT,
70
- 'dynamic' => [ 'active' => true ],
71
  'label_block' => true,
72
  ]
73
  );
@@ -103,6 +103,15 @@ class Premium_Pricing_Table_Widget extends Widget_Base
103
  ]
104
  ]
105
  );
 
 
 
 
 
 
 
 
 
106
 
107
  /*Price Currency*/
108
  $this->add_control('premium_pricing_table_price_currency',
@@ -113,15 +122,6 @@ class Premium_Pricing_Table_Widget extends Widget_Base
113
  'label_block' => true,
114
  ]
115
  );
116
-
117
- /*Price Value*/
118
- $this->add_control('premium_pricing_table_slashed_price_value',
119
- [
120
- 'label' => esc_html__('Slashed Price', 'premium-addons-for-elementor'),
121
- 'type' => Controls_Manager::TEXT,
122
- 'label_block' => true,
123
- ]
124
- );
125
 
126
  /*Price Value*/
127
  $this->add_control('premium_pricing_table_price_value',
@@ -271,7 +271,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
271
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
272
  'default' => esc_html__('Get Started' , 'premium-addons-for-elementor'),
273
  'type' => Controls_Manager::TEXT,
274
- 'dynamic' => [ 'active' => true ],
275
  'label_block' => true,
276
  ]
277
  );
@@ -353,7 +353,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
353
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
354
  'default' => esc_html__('Popular', 'premium-addons-for-elementor'),
355
  'type' => Controls_Manager::TEXT,
356
- 'dynamic' => [ 'active' => true ],
357
  'label_block' => true,
358
  ]
359
  );
@@ -615,7 +615,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
615
  'right' => 0,
616
  'bottom'=> 20,
617
  'left' => 0,
618
- 'unit' => 'px',
619
  ],
620
  'selectors' => [
621
  '{{WRAPPER}} .premium-pricing-icon-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
@@ -634,7 +634,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
634
  'right' => 0,
635
  'bottom'=> 0,
636
  'left' => 0,
637
- 'unit' => 'px',
638
  ],
639
  'selectors' => [
640
  '{{WRAPPER}} .premium-pricing-icon-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
@@ -702,7 +702,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
702
  'right' => 0,
703
  'bottom'=> 0,
704
  'left' => 0,
705
- 'unit' => 'px',
706
  ],
707
  'selectors' => [
708
  '{{WRAPPER}} .premium-pricing-table-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
@@ -721,7 +721,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
721
  'right' => 0,
722
  'bottom'=> 20,
723
  'left' => 0,
724
- 'unit' => 'px',
725
  ],
726
  'selectors' => [
727
  '{{WRAPPER}} .premium-pricing-table-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
@@ -742,6 +742,50 @@ class Premium_Pricing_Table_Widget extends Widget_Base
742
  ]
743
  ]
744
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
745
 
746
  $this->add_control('premium_pricing_currency_heading',
747
  [
@@ -769,6 +813,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
769
  $this->add_group_control(
770
  Group_Control_Typography::get_type(),
771
  [
 
772
  'name' => 'currency_typo',
773
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
774
  'selector' => '{{WRAPPER}} .premium-pricing-price-currency',
@@ -812,49 +857,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
812
  ]
813
  ]
814
  );
815
-
816
- $this->add_control('premium_pricing_slashed_price_heading',
817
- [
818
- 'label' => esc_html__('Slashed Price', 'premium-addons-for-elementor'),
819
- 'type' => Controls_Manager::HEADING,
820
- ]
821
- );
822
 
823
- /*Price Color*/
824
- $this->add_control('premium_pricing_slashed_price_color',
825
- [
826
- 'label' => esc_html__('Color', 'premium-addons-for-elementor'),
827
- 'type' => Controls_Manager::COLOR,
828
- 'scheme' => [
829
- 'type' => Scheme_Color::get_type(),
830
- 'value' => Scheme_Color::COLOR_1,
831
- ],
832
- 'selectors' => [
833
- '{{WRAPPER}} .premium-pricing-slashed-price-value' => 'color: {{VALUE}};'
834
- ],
835
- ]
836
- );
837
-
838
- /*Price Typo*/
839
- $this->add_group_control(
840
- Group_Control_Typography::get_type(),
841
- [
842
- 'name' => 'slashed_price_typo',
843
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
844
- 'selector' => '{{WRAPPER}} .premium-pricing-slashed-price-value',
845
- ]
846
- );
847
-
848
- $this->add_responsive_control('premium_pricing_slashed_price_margin',
849
- [
850
- 'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
851
- 'type' => Controls_Manager::DIMENSIONS,
852
- 'size_units' => ['px', 'em', '%'],
853
- 'selectors' => [
854
- '{{WRAPPER}} .premium-pricing--slashed-price-value' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
855
- ]
856
- ]
857
- );
858
 
859
  $this->add_control('premium_pricing_price_heading',
860
  [
@@ -883,6 +886,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
883
  $this->add_group_control(
884
  Group_Control_Typography::get_type(),
885
  [
 
886
  'name' => 'price_typo',
887
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
888
  'selector' => '{{WRAPPER}} .premium-pricing-price-value',
@@ -927,6 +931,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
927
  $this->add_group_control(
928
  Group_Control_Typography::get_type(),
929
  [
 
930
  'name' => 'separator_typo',
931
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
932
  'selector' => '{{WRAPPER}} .premium-pricing-price-separator',
@@ -943,7 +948,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
943
  'right' => 0,
944
  'bottom'=> 20,
945
  'left' => -15,
946
- 'unit' => 'px',
947
  ],
948
  'selectors' => [
949
  '{{WRAPPER}} .premium-pricing-price-separator' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -978,6 +983,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
978
  $this->add_group_control(
979
  Group_Control_Typography::get_type(),
980
  [
 
981
  'name' => 'duration_typo',
982
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
983
  'selector' => '{{WRAPPER}} .premium-pricing-price-duration',
@@ -1729,7 +1735,7 @@ class Premium_Pricing_Table_Widget extends Widget_Base
1729
  $this->start_controls_tab('premium_pricing_table_box_style_hover',
1730
  [
1731
  'label' => esc_html__('Hover', 'premium-addons-for-elementor'),
1732
- ]
1733
  );
1734
 
1735
  $this->add_group_control(
@@ -1832,8 +1838,8 @@ class Premium_Pricing_Table_Widget extends Widget_Base
1832
  <div class="premium-pricing-table-container">
1833
  <?php if($settings['premium_pricing_table_badge_switcher']) : ?>
1834
  <div class="premium-pricing-badge-container <?php echo esc_attr($badge_position); ?>">
1835
- <div class="corner"><span><?php echo $settings['premium_pricing_table_badge_text']; ?></span></div>
1836
- </div>
1837
  <?php endif; ?>
1838
  <?php if($settings['premium_pricing_table_icon_switcher'] == 'yes') : ?>
1839
  <div class="premium-pricing-icon-container"><i class="<?php echo esc_attr( $settings['premium_pricing_table_icon_selection'] ); ?>"></i></div>
@@ -1842,12 +1848,12 @@ class Premium_Pricing_Table_Widget extends Widget_Base
1842
  <<?php echo $title_tag;?> class="premium-pricing-table-title"><span <?php echo $this->get_render_attribute_string('premium_pricing_table_title_text'); ?>><?php echo $settings['premium_pricing_table_title_text'];?></span></<?php echo $title_tag;?>><?php endif; ?>
1843
  <?php if($settings['premium_pricing_table_price_switcher'] == 'yes') : ?>
1844
  <div class="premium-pricing-price-container">
 
 
 
1845
  <span class="premium-pricing-price-currency">
1846
  <?php echo $settings['premium_pricing_table_price_currency']; ?>
1847
  </span>
1848
- <strike class="premium-pricing-slashed-price-value">
1849
- <?php echo $settings['premium_pricing_table_slashed_price_value']; ?>
1850
- </strike>
1851
  <span class="premium-pricing-price-value">
1852
  <?php echo $settings['premium_pricing_table_price_value']; ?>
1853
  </span>
@@ -1886,4 +1892,4 @@ class Premium_Pricing_Table_Widget extends Widget_Base
1886
  <?php
1887
  }
1888
  }
1889
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Pricing_Table_Widget());
11
  return $this->templateInstance = premium_Template_Tags::getInstance();
12
  }
13
 
 
 
 
 
14
  public function get_name() {
15
  return 'premium-addon-pricing-table';
16
  }
17
 
18
+ public function get_title() {
19
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Pricing Table';
20
+ }
21
+
22
  public function get_icon() {
23
  return 'pa-pricing-table';
24
  }
67
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
68
  'default' => 'Pricing Table',
69
  'type' => Controls_Manager::TEXT,
70
+ 'dynamic' => [ 'active' => true ],
71
  'label_block' => true,
72
  ]
73
  );
103
  ]
104
  ]
105
  );
106
+
107
+ /*Price Value*/
108
+ $this->add_control('premium_pricing_table_slashed_price_value',
109
+ [
110
+ 'label' => esc_html__('Slashed Price', 'premium-addons-for-elementor'),
111
+ 'type' => Controls_Manager::TEXT,
112
+ 'label_block' => true,
113
+ ]
114
+ );
115
 
116
  /*Price Currency*/
117
  $this->add_control('premium_pricing_table_price_currency',
122
  'label_block' => true,
123
  ]
124
  );
 
 
 
 
 
 
 
 
 
125
 
126
  /*Price Value*/
127
  $this->add_control('premium_pricing_table_price_value',
271
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
272
  'default' => esc_html__('Get Started' , 'premium-addons-for-elementor'),
273
  'type' => Controls_Manager::TEXT,
274
+ 'dynamic' => [ 'active' => true ],
275
  'label_block' => true,
276
  ]
277
  );
353
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
354
  'default' => esc_html__('Popular', 'premium-addons-for-elementor'),
355
  'type' => Controls_Manager::TEXT,
356
+ 'dynamic' => [ 'active' => true ],
357
  'label_block' => true,
358
  ]
359
  );
615
  'right' => 0,
616
  'bottom'=> 20,
617
  'left' => 0,
618
+ 'unit' => 'px',
619
  ],
620
  'selectors' => [
621
  '{{WRAPPER}} .premium-pricing-icon-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
634
  'right' => 0,
635
  'bottom'=> 0,
636
  'left' => 0,
637
+ 'unit' => 'px',
638
  ],
639
  'selectors' => [
640
  '{{WRAPPER}} .premium-pricing-icon-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
702
  'right' => 0,
703
  'bottom'=> 0,
704
  'left' => 0,
705
+ 'unit' => 'px',
706
  ],
707
  'selectors' => [
708
  '{{WRAPPER}} .premium-pricing-table-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
721
  'right' => 0,
722
  'bottom'=> 20,
723
  'left' => 0,
724
+ 'unit' => 'px',
725
  ],
726
  'selectors' => [
727
  '{{WRAPPER}} .premium-pricing-table-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
742
  ]
743
  ]
744
  );
745
+
746
+ $this->add_control('premium_pricing_slashed_price_heading',
747
+ [
748
+ 'label' => esc_html__('Slashed Price', 'premium-addons-for-elementor'),
749
+ 'type' => Controls_Manager::HEADING,
750
+ ]
751
+ );
752
+
753
+ /*Slashed Price Color*/
754
+ $this->add_control('premium_pricing_slashed_price_color',
755
+ [
756
+ 'label' => esc_html__('Color', 'premium-addons-for-elementor'),
757
+ 'type' => Controls_Manager::COLOR,
758
+ 'scheme' => [
759
+ 'type' => Scheme_Color::get_type(),
760
+ 'value' => Scheme_Color::COLOR_1,
761
+ ],
762
+ 'selectors' => [
763
+ '{{WRAPPER}} .premium-pricing-slashed-price-value' => 'color: {{VALUE}};'
764
+ ],
765
+ ]
766
+ );
767
+
768
+ /*Slashed Price Typo*/
769
+ $this->add_group_control(
770
+ Group_Control_Typography::get_type(),
771
+ [
772
+ 'name' => 'slashed_price_typo',
773
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
774
+ 'selector' => '{{WRAPPER}} .premium-pricing-slashed-price-value',
775
+ ]
776
+ );
777
+
778
+ /*Slashed Price Margin*/
779
+ $this->add_responsive_control('premium_pricing_slashed_price_margin',
780
+ [
781
+ 'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
782
+ 'type' => Controls_Manager::DIMENSIONS,
783
+ 'size_units' => ['px', 'em', '%'],
784
+ 'selectors' => [
785
+ '{{WRAPPER}} .premium-pricing--slashed-price-value' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
786
+ ]
787
+ ]
788
+ );
789
 
790
  $this->add_control('premium_pricing_currency_heading',
791
  [
813
  $this->add_group_control(
814
  Group_Control_Typography::get_type(),
815
  [
816
+ 'label' => esc_html__('Typography', 'premium-addons-for-elementor'),
817
  'name' => 'currency_typo',
818
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
819
  'selector' => '{{WRAPPER}} .premium-pricing-price-currency',
857
  ]
858
  ]
859
  );
 
 
 
 
 
 
 
860
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
861
 
862
  $this->add_control('premium_pricing_price_heading',
863
  [
886
  $this->add_group_control(
887
  Group_Control_Typography::get_type(),
888
  [
889
+ 'label' => esc_html__('Typography', 'premium-addons-for-elementor'),
890
  'name' => 'price_typo',
891
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
892
  'selector' => '{{WRAPPER}} .premium-pricing-price-value',
931
  $this->add_group_control(
932
  Group_Control_Typography::get_type(),
933
  [
934
+ 'label' => esc_html__('Typography', 'premium-addons-for-elementor'),
935
  'name' => 'separator_typo',
936
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
937
  'selector' => '{{WRAPPER}} .premium-pricing-price-separator',
948
  'right' => 0,
949
  'bottom'=> 20,
950
  'left' => -15,
951
+ 'unit' => 'px',
952
  ],
953
  'selectors' => [
954
  '{{WRAPPER}} .premium-pricing-price-separator' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
983
  $this->add_group_control(
984
  Group_Control_Typography::get_type(),
985
  [
986
+ 'label' => esc_html__('Typography', 'premium-addons-for-elementor'),
987
  'name' => 'duration_typo',
988
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
989
  'selector' => '{{WRAPPER}} .premium-pricing-price-duration',
1735
  $this->start_controls_tab('premium_pricing_table_box_style_hover',
1736
  [
1737
  'label' => esc_html__('Hover', 'premium-addons-for-elementor'),
1738
+ ]
1739
  );
1740
 
1741
  $this->add_group_control(
1838
  <div class="premium-pricing-table-container">
1839
  <?php if($settings['premium_pricing_table_badge_switcher']) : ?>
1840
  <div class="premium-pricing-badge-container <?php echo esc_attr($badge_position); ?>">
1841
+ <div class="corner"><span><?php echo $settings['premium_pricing_table_badge_text']; ?></span></div>
1842
+ </div>
1843
  <?php endif; ?>
1844
  <?php if($settings['premium_pricing_table_icon_switcher'] == 'yes') : ?>
1845
  <div class="premium-pricing-icon-container"><i class="<?php echo esc_attr( $settings['premium_pricing_table_icon_selection'] ); ?>"></i></div>
1848
  <<?php echo $title_tag;?> class="premium-pricing-table-title"><span <?php echo $this->get_render_attribute_string('premium_pricing_table_title_text'); ?>><?php echo $settings['premium_pricing_table_title_text'];?></span></<?php echo $title_tag;?>><?php endif; ?>
1849
  <?php if($settings['premium_pricing_table_price_switcher'] == 'yes') : ?>
1850
  <div class="premium-pricing-price-container">
1851
+ <strike class="premium-pricing-slashed-price-value">
1852
+ <?php echo $settings['premium_pricing_table_slashed_price_value']; ?>
1853
+ </strike>
1854
  <span class="premium-pricing-price-currency">
1855
  <?php echo $settings['premium_pricing_table_price_currency']; ?>
1856
  </span>
 
 
 
1857
  <span class="premium-pricing-price-value">
1858
  <?php echo $settings['premium_pricing_table_price_value']; ?>
1859
  </span>
1892
  <?php
1893
  }
1894
  }
1895
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Pricing_Table_Widget());
widgets/premium-progressbar.php CHANGED
@@ -10,8 +10,8 @@ class Premium_Progressbar_Widget extends Widget_Base
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__('Premium Progress Bar', 'premium-addons-for-elementor');
14
- }
15
 
16
  public function get_icon() {
17
  return 'pa-progress-bar';
@@ -120,11 +120,12 @@ class Premium_Progressbar_Widget extends Widget_Base
120
  'type' => Controls_Manager::SWITCHER,
121
  'default' => 'yes',
122
  'description' => esc_html__('Enable percentage for labels','premium-addons-for-elementor'),
123
- 'condition' =>[
124
- 'premium_progressbar_select_label'=>'more_labels',
125
- ]
126
  ]
127
  );
 
128
  $this->add_control('premium_progressbar_select_label_icon',
129
  [
130
  'label' => esc_html__('Labels Indicator', 'premium-addons-for-elementor'),
@@ -140,6 +141,7 @@ class Premium_Progressbar_Widget extends Widget_Base
140
  ]
141
  ]
142
  );
 
143
  $this->add_control('premium_progressbar_more_labels_align',
144
  [
145
  'label' => esc_html__('Labels Alignment','premuim-addons-for-elementor'),
@@ -689,4 +691,4 @@ class Premium_Progressbar_Widget extends Widget_Base
689
  <?php
690
  }
691
  }
692
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Progressbar_Widget());
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Progress Bar';
14
+ }
15
 
16
  public function get_icon() {
17
  return 'pa-progress-bar';
120
  'type' => Controls_Manager::SWITCHER,
121
  'default' => 'yes',
122
  'description' => esc_html__('Enable percentage for labels','premium-addons-for-elementor'),
123
+ 'condition' => [
124
+ 'premium_progressbar_select_label'=>'more_labels',
125
+ ]
126
  ]
127
  );
128
+
129
  $this->add_control('premium_progressbar_select_label_icon',
130
  [
131
  'label' => esc_html__('Labels Indicator', 'premium-addons-for-elementor'),
141
  ]
142
  ]
143
  );
144
+
145
  $this->add_control('premium_progressbar_more_labels_align',
146
  [
147
  'label' => esc_html__('Labels Alignment','premuim-addons-for-elementor'),
691
  <?php
692
  }
693
  }
694
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Progressbar_Widget());
widgets/premium-testimonials.php CHANGED
@@ -10,8 +10,8 @@ class Premium_Testimonials_Widget extends Widget_Base
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__('Premium Testimonial', 'premium-addons-for-elementor');
14
- }
15
 
16
  public function get_icon() {
17
  return 'pa-testimonials';
@@ -548,4 +548,4 @@ class Premium_Testimonials_Widget extends Widget_Base
548
  <?php
549
  }
550
  }
551
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Testimonials_Widget());
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Testimonial';
14
+ }
15
 
16
  public function get_icon() {
17
  return 'pa-testimonials';
548
  <?php
549
  }
550
  }
551
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Testimonials_Widget());
widgets/premium-title.php CHANGED
@@ -10,8 +10,8 @@ class Premium_Title_Widget extends Widget_Base
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__('Premium Title', 'premium-addons-for-elementor');
14
- }
15
 
16
  public function get_icon() {
17
  return 'pa-title';
@@ -39,7 +39,7 @@ class Premium_Title_Widget extends Widget_Base
39
  'type' => Controls_Manager::TEXT,
40
  'default' => esc_html__('Premium Title','premium-addons-for-elementor'),
41
  'label_block' => true,
42
- 'dynamic' => [ 'active' => true ]
43
  ]
44
  );
45
 
@@ -569,4 +569,4 @@ class Premium_Title_Widget extends Widget_Base
569
  <?php
570
  }
571
  }
572
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Title_Widget());
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Title';
14
+ }
15
 
16
  public function get_icon() {
17
  return 'pa-title';
39
  'type' => Controls_Manager::TEXT,
40
  'default' => esc_html__('Premium Title','premium-addons-for-elementor'),
41
  'label_block' => true,
42
+ 'dynamic' => [ 'active' => true ]
43
  ]
44
  );
45
 
569
  <?php
570
  }
571
  }
572
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Title_Widget());
widgets/premium-videobox.php CHANGED
@@ -10,8 +10,8 @@ class Premium_Video_Box_Widget extends Widget_Base
10
  }
11
 
12
  public function get_title() {
13
- return esc_html__('Premium Video Box', 'premium-addons-for-elementor');
14
- }
15
 
16
  public function get_icon() {
17
  return 'pa-video-box';
@@ -176,10 +176,10 @@ class Premium_Video_Box_Widget extends Widget_Base
176
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
177
  'type' => Controls_Manager::TEXTAREA,
178
  'default' => esc_html__('Play Video','premium-addons-for-elementor'),
179
- 'dynamic' => [ 'active' => true ],
180
  'condition' => [
181
  'premium_video_box_video_text_switcher' => 'yes'
182
  ],
 
183
  'label_block' => true,
184
  ]
185
  );
@@ -550,4 +550,4 @@ class Premium_Video_Box_Widget extends Widget_Base
550
  <?php
551
  }
552
  }
553
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Video_Box_Widget());
10
  }
11
 
12
  public function get_title() {
13
+ return \PremiumAddons\Helper_Functions::get_prefix() . ' Video Box';
14
+ }
15
 
16
  public function get_icon() {
17
  return 'pa-video-box';
176
  'label' => esc_html__('Text', 'premium-addons-for-elementor'),
177
  'type' => Controls_Manager::TEXTAREA,
178
  'default' => esc_html__('Play Video','premium-addons-for-elementor'),
 
179
  'condition' => [
180
  'premium_video_box_video_text_switcher' => 'yes'
181
  ],
182
+ 'dynamic' => [ 'active' => true ],
183
  'label_block' => true,
184
  ]
185
  );
550
  <?php
551
  }
552
  }
553
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Video_Box_Widget());