WooLentor – Elementor WooCommerce Builder Addons, Variation Swatches Addons, Gutenberg WooCommerce Product block, grid, slider, templates, widgets, Quick View, Wishlist, Products Compare, Product Filter – All in One Solution - Version 2.1.2

Version Description

Download this release

Release Info

Developer devitemsllc
Plugin Icon 128x128 WooLentor – Elementor WooCommerce Builder Addons, Variation Swatches Addons, Gutenberg WooCommerce Product block, grid, slider, templates, widgets, Quick View, Wishlist, Products Compare, Product Filter – All in One Solution
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.1.2

assets/css/woolentor-widgets.css CHANGED
@@ -386,7 +386,12 @@
386
  position: relative;
387
  overflow: hidden;
388
  }
389
-
 
 
 
 
 
390
  .ht-products .ht-product .ht-product-inner .ht-product-countdown-wrap {
391
  position: absolute;
392
  left: 0;
@@ -4967,7 +4972,7 @@ div[class*="woolentor-single-select-drop"] .select2-results__option::before{
4967
  /**
4968
  * Thirdparty plugin support
4969
  */
4970
- .woocommerce-cart .woolentor-page-template .woocommerce {
4971
  -webkit-box-orient: vertical;
4972
  -webkit-box-direction: normal;
4973
  -ms-flex-flow: column;
386
  position: relative;
387
  overflow: hidden;
388
  }
389
+ .woolentor-product-same-height.ht-products .ht-product .ht-product-inner{
390
+ height: 100%;
391
+ }
392
+ .woolentor-product-same-height.ht-products.product-slider .slick-list,.woolentor-product-same-height.ht-products.product-slider .slick-track,.woolentor-product-same-height.ht-products.product-slider .ht-product{
393
+ height: 100% !important;
394
+ }
395
  .ht-products .ht-product .ht-product-inner .ht-product-countdown-wrap {
396
  position: absolute;
397
  left: 0;
4972
  /**
4973
  * Thirdparty plugin support
4974
  */
4975
+ .woocommerce-cart .woolentor-page-template .woocommerce:not(.ht-row) {
4976
  -webkit-box-orient: vertical;
4977
  -webkit-box-direction: normal;
4978
  -ms-flex-flow: column;
classes/class.widgets_control.php CHANGED
@@ -33,94 +33,356 @@ class Widgets_Control{
33
 
34
  // Add custom category.
35
  public function add_category( $elements_manager ) {
 
36
  $elements_manager->add_category(
37
  'woolentor-addons',
38
  [
39
  'title' => __( 'Woolentor Addons','woolentor'),
40
- 'icon' => 'font',
 
 
 
 
 
 
 
 
41
  ]
42
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
 
45
  // Widgets Register
46
  public function init_widgets(){
47
 
48
- $wl_element_manager = array(
49
- 'product_tabs',
50
- 'add_banner',
51
- 'special_day_offer',
52
- 'wb_image_marker',
53
- 'wl_store_features',
54
- 'wl_faq',
55
- 'wl_category_grid',
56
- 'wl_onepage_slider',
57
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  if( is_plugin_active('wishsuite/wishsuite.php') ){
60
- $wl_element_manager[] = 'wb_wishsuite_table';
 
 
 
61
  }
62
 
63
  if( is_plugin_active('ever-compare/ever-compare.php') ){
64
- $wl_element_manager[] = 'wb_ever_compare_table';
 
 
 
65
  }
66
 
67
  if( is_plugin_active('just-tables/just-tables.php') || is_plugin_active('just-tables-pro/just-tables-pro.php') ){
68
- $wl_element_manager[] = 'wb_just_table';
 
 
 
69
  }
70
 
71
  if( is_plugin_active('whols/whols.php') || is_plugin_active('whols-pro/whols-pro.php') ){
72
- $wl_element_manager[] = 'wb_whols';
 
 
 
73
  }
74
 
75
  if( is_plugin_active('wc-multi-currency/wcmilticurrency.php') || is_plugin_active('multicurrencypro/multicurrencypro.php') ){
76
- $wl_element_manager[] = 'wb_wc_multicurrency';
 
 
 
77
  }
78
 
79
- if( !is_plugin_active('woolentor-addons-pro/woolentor_addons_pro.php') ){
80
- $wl_element_manager[] = 'universal_product';
81
- $wl_element_manager[] = 'wl_category';
82
- $wl_element_manager[] = 'wl_brand';
83
- $wl_element_manager[] = 'wb_customer_review';
84
- $wl_element_manager[] = 'wl_testimonial';
85
- }
86
 
87
- // WooCommerce Builder
88
- if( woolentor_get_option( 'enablecustomlayout', 'woolentor_woo_template_tabs', 'on' ) == 'on' ){
89
- $wlb_element = array(
90
- 'wb_archive_product',
91
- 'wl_product_filter',
92
- 'wl_product_horizontal_filter',
93
- 'wb_product_title',
94
- 'wb_product_related',
95
- 'wb_product_add_to_cart',
96
- 'wb_product_additional_information',
97
- 'wb_product_data_tab',
98
- 'wb_product_description',
99
- 'wb_product_short_description',
100
- 'wb_product_price',
101
- 'wb_product_rating',
102
- 'wb_product_reviews',
103
- 'wb_product_image',
104
- 'wl_product_video_gallery',
105
- 'wb_product_upsell',
106
- 'wb_product_stock',
107
- 'wb_product_meta',
108
- 'wb_product_call_for_price',
109
- 'wb_product_suggest_price',
110
- 'wb_product_qr_code',
111
- 'product_curvy',
112
- 'product_image_accordion',
113
- 'product_accordion',
114
- );
115
- }else{ $wlb_element = array(); }
116
- $wl_element_manager = array_merge( $wl_element_manager, $wlb_element );
117
-
118
- foreach ( $wl_element_manager as $element ){
119
- if ( ( woolentor_get_option( $element, 'woolentor_elements_tabs', 'on' ) === 'on' ) && file_exists( WOOLENTOR_ADDONS_PL_PATH.'includes/addons/'.$element.'.php' ) ){
120
- require( WOOLENTOR_ADDONS_PL_PATH.'includes/addons/'.$element.'.php' );
121
- }
122
- }
123
-
124
  }
125
 
126
 
33
 
34
  // Add custom category.
35
  public function add_category( $elements_manager ) {
36
+
37
  $elements_manager->add_category(
38
  'woolentor-addons',
39
  [
40
  'title' => __( 'Woolentor Addons','woolentor'),
41
+ 'icon' => 'fa fa-plug',
42
+ ]
43
+ );
44
+
45
+ $elements_manager->add_category(
46
+ 'woolentor-addons-pro',
47
+ [
48
+ 'title' => __( 'Woolentor Pro','woolentor-pro'),
49
+ 'icon' => 'fa fa-plug',
50
  ]
51
  );
52
+
53
+ // Register In top panel if exist woolentor post type
54
+ if( get_post_type() === 'woolentor-template' ){
55
+ $reorder_cats = function( $categories ){
56
+ uksort( $this->categories, function( $keyOne, $keyTwo ){
57
+ if( substr( $keyOne, 0, 10 ) == 'woolentor-'){
58
+ return -1;
59
+ }
60
+ if( substr( $keyTwo, 0, 10 ) == 'woolentor-'){
61
+ return 1;
62
+ }
63
+ return 0;
64
+ });
65
+
66
+ };
67
+ $reorder_cats->call( $elements_manager, [ 'woolentor-addons', 'woolentor-addons-pro' ] );
68
+ }
69
+
70
  }
71
 
72
  // Widgets Register
73
  public function init_widgets(){
74
 
75
+ if( get_post_type() === 'woolentor-template' ){
76
+ $tmpType = $this->get_template_type( get_post_meta( get_the_ID(), 'woolentor_template_meta_type', true ) );
77
+ }else{
78
+ $tmpType = '';
79
+ }
80
+
81
+ foreach ( $this->widget_list_manager( $tmpType ) as $element_key => $element ){
82
+
83
+ $widget_path = ( $element['is_pro'] == true ) ? WOOLENTOR_ADDONS_PL_PATH_PRO : WOOLENTOR_ADDONS_PL_PATH;
84
+
85
+ if ( ( woolentor_get_option( $element_key, 'woolentor_elements_tabs', 'on' ) === 'on' ) && file_exists( $widget_path.'includes/addons/'.$element_key.'.php' ) ){
86
+ require_once( $widget_path.'includes/addons/'.$element_key.'.php' );
87
+ }
88
+
89
+ }
90
+
91
+ }
92
+
93
+ /* Widget list generate */
94
+ public function widget_list_manager( $tmpType ){
95
+
96
+ $is_builder = ( woolentor_get_option( 'enablecustomlayout', 'woolentor_woo_template_tabs', 'on' ) == 'on' ) ? true : false;
97
+
98
+ $common_widget = $this->widget_list()['common'];
99
+ $builder_common = ( $is_builder == true ) ? $this->widget_list()['builder_common'] : [];
100
+ $template_wise = ( $is_builder == true && $tmpType !== '' && array_key_exists( $tmpType, $this->widget_list() ) ) ? $this->widget_list()[$tmpType] : [];
101
+
102
+ $generate_list = [];
103
+
104
+ if( $tmpType === '' ){
105
+ foreach( $this->widget_list() as $widget_list_key => $widget_list ){
106
+
107
+ if( $is_builder == false ){
108
+ $generate_list = $common_widget;
109
+ }else{
110
+ $generate_list += $widget_list;
111
+ }
112
+
113
+ }
114
+ }else{
115
+ $generate_list = array_merge( $template_wise, $common_widget, $builder_common );
116
+ }
117
+
118
+ return $generate_list;
119
+
120
+ }
121
+
122
+ /* Manage Template type */
123
+ public function get_template_type( $type ){
124
+
125
+ switch ( $type ) {
126
+
127
+ case 'single':
128
+ case 'quickview':
129
+ $template_type = 'single';
130
+ break;
131
+
132
+ case 'shop':
133
+ case 'archive':
134
+ $template_type = 'shop';
135
+ break;
136
+
137
+ case 'cart':
138
+ $template_type = 'cart';
139
+ break;
140
+
141
+ case 'emptycart':
142
+ $template_type = 'emptycart';
143
+ break;
144
+
145
+ case 'minicart':
146
+ $template_type = 'minicart';
147
+ break;
148
+
149
+ case 'checkout':
150
+ case 'checkouttop':
151
+ $template_type = 'checkout';
152
+ break;
153
+
154
+ case 'myaccount':
155
+ case 'myaccountlogin':
156
+ case 'dashboard':
157
+ case 'orders':
158
+ case 'downloads':
159
+ case 'edit-address':
160
+ case 'edit-account':
161
+ $template_type = 'myaccount';
162
+ break;
163
+
164
+ case 'thankyou':
165
+ $template_type = 'thankyou';
166
+ break;
167
+
168
+ default:
169
+ $template_type = '';
170
+
171
+ }
172
+
173
+ return $template_type;
174
+
175
+ }
176
+
177
+ /* Widget List */
178
+ public function widget_list(){
179
+
180
+ $is_pro = is_plugin_active('woolentor-addons-pro/woolentor_addons_pro.php') ? true : false;
181
+
182
+ $widget_list = [
183
+ 'common' => [
184
+ 'universal_product' => [
185
+ 'title' => esc_html__('Universal Product','woolentor'),
186
+ 'is_pro' => $is_pro,
187
+ ],
188
+ 'product_tabs' => [
189
+ 'title' => esc_html__('Product Tabs','woolentor'),
190
+ 'is_pro' => false,
191
+ ],
192
+ 'add_banner' => [
193
+ 'title' => esc_html__('Adds Banner','woolentor'),
194
+ 'is_pro' => false,
195
+ ],
196
+ 'special_day_offer' => [
197
+ 'title' => esc_html__('Special Day Offer','woolentor'),
198
+ 'is_pro' => false,
199
+ ],
200
+ 'wb_image_marker' => [
201
+ 'title' => esc_html__('Image Marker','woolentor'),
202
+ 'is_pro' => false,
203
+ ],
204
+ 'wl_store_features' => [
205
+ 'title' => esc_html__('Store Features','woolentor'),
206
+ 'is_pro' => false,
207
+ ],
208
+ 'wl_faq' => [
209
+ 'title' => esc_html__('Faq','woolentor'),
210
+ 'is_pro' => false,
211
+ ],
212
+ 'wl_category_grid' => [
213
+ 'title' => esc_html__('Category Grid','woolentor'),
214
+ 'is_pro' => false,
215
+ ],
216
+ 'wl_onepage_slider' => [
217
+ 'title' => esc_html__('One Page Slider','woolentor'),
218
+ 'is_pro' => false,
219
+ ],
220
+ 'product_curvy' => [
221
+ 'title' => esc_html__('Product Curvy','woolentor'),
222
+ 'is_pro' => false,
223
+ ],
224
+ 'product_image_accordion' => [
225
+ 'title' => esc_html__('Product Image Accordion','woolentor'),
226
+ 'is_pro' => false,
227
+ ],
228
+ 'product_accordion' => [
229
+ 'title' => esc_html__('Product Accordion'),
230
+ 'is_pro' => false,
231
+ ],
232
+ 'wl_category' => [
233
+ 'title' => esc_html__('Category','woolentor'),
234
+ 'is_pro' => $is_pro,
235
+ ],
236
+ 'wl_brand' => [
237
+ 'title' => esc_html__('Brand','woolentor'),
238
+ 'is_pro' => $is_pro,
239
+ ],
240
+ 'wb_customer_review' => [
241
+ 'title' => esc_html__('Customer Review','woolentor'),
242
+ 'is_pro' => $is_pro,
243
+ ],
244
+ 'wl_testimonial' => [
245
+ 'title' => esc_html__('Testimonial','woolentor'),
246
+ 'is_pro' => $is_pro,
247
+ ],
248
+
249
+ ],
250
+
251
+ 'builder_common' => [
252
+
253
+ 'wl_product_filter' => [
254
+ 'title' => esc_html__('Product Filter','woolentor'),
255
+ 'is_pro' => false,
256
+ ],
257
+ 'wl_product_horizontal_filter' => [
258
+ 'title' => esc_html__('Horizontal Product Filter','woolentor'),
259
+ 'is_pro' => false,
260
+ ],
261
+ 'wb_product_call_for_price' => [
262
+ 'title' => esc_html__('Product Call for Price','woolentor'),
263
+ 'is_pro' => false,
264
+ ],
265
+ 'wb_product_suggest_price' => [
266
+ 'title' => esc_html__('Product suggest price','woolentor'),
267
+ 'is_pro' => false,
268
+ ],
269
+
270
+ ],
271
+
272
+ 'single' => [
273
+ 'wb_product_title' => [
274
+ 'title' => esc_html__('Product Title','woolentor'),
275
+ 'is_pro' => false,
276
+ ],
277
+ 'wb_product_related' => [
278
+ 'title' => esc_html__('Related Product','woolentor'),
279
+ 'is_pro' => false,
280
+ ],
281
+ 'wb_product_add_to_cart'=>[
282
+ 'title' => esc_html__('Product Add To Cart','woolentor'),
283
+ 'is_pro' => false,
284
+ ],
285
+ 'wb_product_additional_information' => [
286
+ 'title' => esc_html__('Product Additional Info','woolentor'),
287
+ 'is_pro' => false,
288
+ ],
289
+ 'wb_product_data_tab' => [
290
+ 'title' => esc_html__('Product Data tabs','woolentor'),
291
+ 'is_pro' => false,
292
+ ],
293
+ 'wb_product_description' => [
294
+ 'title' => esc_html__('Product Description','woolentor'),
295
+ 'is_pro' => false,
296
+ ],
297
+ 'wb_product_short_description' => [
298
+ 'title' => esc_html__('Product short description','woolentor'),
299
+ 'is_pro' => false,
300
+ ],
301
+ 'wb_product_price' => [
302
+ 'title' => esc_html__('Product Price','woolentor'),
303
+ 'is_pro' => false,
304
+ ],
305
+ 'wb_product_rating' => [
306
+ 'title' => esc_html__('Product rating','woolentor'),
307
+ 'is_pro' => false,
308
+ ],
309
+ 'wb_product_reviews' => [
310
+ 'title' => esc_html__('Product reviews','woolentor'),
311
+ 'is_pro' => false,
312
+ ],
313
+ 'wb_product_image' => [
314
+ 'title' => esc_html__('Product Image','woolentor'),
315
+ 'is_pro' => false,
316
+ ],
317
+ 'wl_product_video_gallery' => [
318
+ 'title' => esc_html__('Product Video Gallery','woolentor'),
319
+ 'is_pro' => false,
320
+ ],
321
+ 'wb_product_upsell' => [
322
+ 'title' => esc_html__('Product Upsell','woolentor'),
323
+ 'is_pro' => false,
324
+ ],
325
+ 'wb_product_stock' => [
326
+ 'title' => esc_html__('Product Stock','woolentor'),
327
+ 'is_pro' => false,
328
+ ],
329
+ 'wb_product_meta' => [
330
+ 'title' => esc_html__('Product Meta','woolentor'),
331
+ 'is_pro' => false,
332
+ ],
333
+ 'wb_product_qr_code' => [
334
+ 'title' => esc_html__('Product QR Code','woolentor'),
335
+ 'is_pro' => false,
336
+ ],
337
+ ],
338
+
339
+ 'shop' => [
340
+ 'wb_archive_product' => [
341
+ 'title' => esc_html__('Archive Layout Default','woolentor'),
342
+ 'is_pro' => false,
343
+ ],
344
+ ]
345
+
346
+ ];
347
 
348
  if( is_plugin_active('wishsuite/wishsuite.php') ){
349
+ $widget_list['common']['wb_wishsuite_table'] = [
350
+ 'title' => esc_html__('WishSuite Table','woolentor'),
351
+ 'is_pro' => false,
352
+ ];
353
  }
354
 
355
  if( is_plugin_active('ever-compare/ever-compare.php') ){
356
+ $widget_list['common']['wb_ever_compare_table'] = [
357
+ 'title' => esc_html__('EverCompare','woolentor'),
358
+ 'is_pro' => false,
359
+ ];
360
  }
361
 
362
  if( is_plugin_active('just-tables/just-tables.php') || is_plugin_active('just-tables-pro/just-tables-pro.php') ){
363
+ $widget_list['common']['wb_just_table'] = [
364
+ 'title' => esc_html__('JustTable','woolentor'),
365
+ 'is_pro' => false,
366
+ ];
367
  }
368
 
369
  if( is_plugin_active('whols/whols.php') || is_plugin_active('whols-pro/whols-pro.php') ){
370
+ $widget_list['common']['wb_whols'] = [
371
+ 'title' => esc_html__('Whols','woolentor'),
372
+ 'is_pro' => false,
373
+ ];
374
  }
375
 
376
  if( is_plugin_active('wc-multi-currency/wcmilticurrency.php') || is_plugin_active('multicurrencypro/multicurrencypro.php') ){
377
+ $widget_list['common']['wb_wc_multicurrency'] = [
378
+ 'title' => esc_html__('WC Multicurrency','woolentor'),
379
+ 'is_pro' => false,
380
+ ];
381
  }
382
 
383
+ return apply_filters( 'woolentor_widget_list', $widget_list );
384
+
 
 
 
 
 
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  }
387
 
388
 
includes/addons/universal_product.php CHANGED
@@ -72,6 +72,19 @@ class Woolentor_Universal_Product_Layout_Widget extends Widget_Base {
72
  ]
73
  );
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  $this->add_control(
76
  'woolentor_product_grid_column',
77
  [
@@ -2055,6 +2068,7 @@ class Woolentor_Universal_Product_Layout_Widget extends Widget_Base {
2055
  $order = $this->get_settings_for_display('order');
2056
  $tabuniqid = $this->get_id();
2057
  $columns = $this->get_settings_for_display('woolentor_product_grid_column');
 
2058
 
2059
  // Query Argument
2060
  $query_args = array(
@@ -2260,7 +2274,7 @@ class Woolentor_Universal_Product_Layout_Widget extends Widget_Base {
2260
  <?php }; ?>
2261
 
2262
  <?php if( is_array( $product_cats ) && (count( $product_cats ) > 0) && ( $settings['product_layout_style'] == 'tab' ) ): ?>
2263
- <div class="ht-products woocommerce">
2264
 
2265
  <?php
2266
  $z=0;
@@ -2476,7 +2490,7 @@ class Woolentor_Universal_Product_Layout_Widget extends Widget_Base {
2476
 
2477
  <?php else: ?>
2478
  <?php if( $settings['product_layout_style'] == 'slider' ){ echo '<div class="ht-row">'; } ?>
2479
- <div class="ht-products woocommerce <?php if( $settings['product_layout_style'] == 'slider' ){ echo esc_attr( 'product-slider' ); } else{ echo 'ht-row'; } ?>" dir="<?php echo $direction; ?>" data-settings='<?php if( $settings['product_layout_style'] == 'slider' ){ echo wp_json_encode( $slider_settings ); } ?>'>
2480
 
2481
  <?php
2482
  if( $products->have_posts() ):
72
  ]
73
  );
74
 
75
+ $this->add_control(
76
+ 'same_height_box',
77
+ [
78
+ 'label' => __( 'Same Height Box ?', 'woolentor' ),
79
+ 'type' => Controls_Manager::SWITCHER,
80
+ 'label_on' => __( 'Yes', 'woolentor' ),
81
+ 'label_off' => __( 'No', 'woolentor' ),
82
+ 'return_value' => 'yes',
83
+ 'default' => 'no',
84
+ ]
85
+ );
86
+
87
+
88
  $this->add_control(
89
  'woolentor_product_grid_column',
90
  [
2068
  $order = $this->get_settings_for_display('order');
2069
  $tabuniqid = $this->get_id();
2070
  $columns = $this->get_settings_for_display('woolentor_product_grid_column');
2071
+ $same_height_box = $this->get_settings_for_display('same_height_box');
2072
 
2073
  // Query Argument
2074
  $query_args = array(
2274
  <?php }; ?>
2275
 
2276
  <?php if( is_array( $product_cats ) && (count( $product_cats ) > 0) && ( $settings['product_layout_style'] == 'tab' ) ): ?>
2277
+ <div class="<?php echo $same_height_box == 'yes' ? 'woolentor-product-same-height' : ''; ?> ht-products woocommerce">
2278
 
2279
  <?php
2280
  $z=0;
2490
 
2491
  <?php else: ?>
2492
  <?php if( $settings['product_layout_style'] == 'slider' ){ echo '<div class="ht-row">'; } ?>
2493
+ <div class="<?php echo $same_height_box == 'yes' ? 'woolentor-product-same-height' : ''; ?> ht-products woocommerce <?php if( $settings['product_layout_style'] == 'slider' ){ echo esc_attr( 'product-slider' ); } else{ echo 'ht-row'; } ?>" dir="<?php echo $direction; ?>" data-settings='<?php if( $settings['product_layout_style'] == 'slider' ){ echo wp_json_encode( $slider_settings ); } ?>'>
2494
 
2495
  <?php
2496
  if( $products->have_posts() ):
includes/admin/admin-init.php CHANGED
@@ -264,8 +264,7 @@ class Woolentor_Admin_Init{
264
 
265
  wp_send_json_success([
266
  'message' => esc_html__( 'Data Saved successfully!', 'woolentor' ),
267
- 'data' => $data,
268
- 'savedata' => get_option('woolentor_elements_tabs'),
269
  ]);
270
 
271
  }
264
 
265
  wp_send_json_success([
266
  'message' => esc_html__( 'Data Saved successfully!', 'woolentor' ),
267
+ 'data' => $data
 
268
  ]);
269
 
270
  }
includes/admin/assets/css/woolentor-admin.css CHANGED
@@ -443,6 +443,70 @@
443
  font-size: 13px;
444
  text-transform: uppercase;
445
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
 
447
  /* Icon List */
448
  @font-face {
443
  font-size: 13px;
444
  text-transform: uppercase;
445
  }
446
+
447
+ /* For Repeater */
448
+ .woolentor-admin-option.woolentor-repeater-heading {
449
+ display: block !important;
450
+ text-align: left;
451
+ padding-bottom: 0 !important;
452
+ }
453
+ .woolentor-option-repeater-item:not(.woolentor_active_repeater) .woolentor-option-repeater-fields, .woolentor-option-repeater-item.woolentor-repeater-hidden {
454
+ display: none;
455
+ }
456
+ .woolentor-option-repeater-item-area{
457
+ margin-right: 10px;
458
+ }
459
+ .woolentor-option-repeater-item {
460
+ margin-bottom: 10px;
461
+ }
462
+ .woolentor-option-repeater-item + .woolentor-option-repeater-item {
463
+ margin-top: 10px;
464
+ }
465
+ .woolentor-option-repeater-item .woolentor-option-repeater-tools {
466
+ display: flex;
467
+ justify-content: space-between;
468
+ align-items: center;
469
+ border: 1px solid #d5dadf;
470
+ cursor: pointer;
471
+ background-color: #FFFFFF;
472
+ }
473
+ .woolentor-option-repeater-tools .woolentor-option-repeater-item-title {
474
+ margin-left: 10px;
475
+ }
476
+ .woolentor-option-repeater-item-remove {
477
+ width: 40px;
478
+ display: flex;
479
+ height: 40px;
480
+ justify-content: center;
481
+ align-items: center;
482
+ border-left: 1px solid #d5dadf;
483
+ }
484
+ .woolentor-option-repeater-item-remove:hover{
485
+ color: rgb(230, 23, 23);
486
+ }
487
+ .woolentor-option-repeater-fields {
488
+ border: 1px solid #d5dadf;
489
+ padding: 10px;
490
+ border-top: 0;
491
+ }
492
+ button.woolentor-repeater-item-add {
493
+ padding: 5px 15px;
494
+ font-size: 13px;
495
+ cursor: pointer;
496
+ margin-top: 10px;
497
+ text-transform: uppercase;
498
+ margin-right: 10px;
499
+ display: flex;
500
+ align-items: center;
501
+ border: none;
502
+ border-radius: 3px;
503
+ transition: 0.4s;
504
+ }
505
+ button.woolentor-repeater-item-add:hover {
506
+ border-color: #0065cc;
507
+ background-color: #0065cc;
508
+ box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
509
+ }
510
 
511
  /* Icon List */
512
  @font-face {
includes/admin/assets/js/woolentor-admin.js CHANGED
@@ -320,7 +320,7 @@
320
  section : $section,
321
  fileds : $field_keys,
322
  action : 'woolentor_save_opt_data',
323
- data : $option_form.serializeJSON()
324
  },
325
  beforeSend: function(){
326
  $savebtn.text( WOOLENTOR_ADMIN.message.loading ).addClass('updating-message');
@@ -367,7 +367,81 @@
367
  WooLentorOnChangeField('.woolentor-module-setting-popup-content .radio', 'radio', '.notification_fake', 'fakes' );
368
  WooLentorOnChangeField('.woolentor-module-setting-popup-content .radio', 'radio', '.notification_real', 'actual' );
369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  }
 
371
 
372
  // Extension Tabs
373
  woolentor_admin_tabs( $(".woolentor-admin-tabs"), '.woolentor-admin-tab-pane' );
320
  section : $section,
321
  fileds : $field_keys,
322
  action : 'woolentor_save_opt_data',
323
+ data : $(this).closest('.woolentor-module-setting-popup-content').find('form.woolentor-module-setting-data > div:not(.woolentor-repeater-hidden) :input').serializeJSON()
324
  },
325
  beforeSend: function(){
326
  $savebtn.text( WOOLENTOR_ADMIN.message.loading ).addClass('updating-message');
367
  WooLentorOnChangeField('.woolentor-module-setting-popup-content .radio', 'radio', '.notification_fake', 'fakes' );
368
  WooLentorOnChangeField('.woolentor-module-setting-popup-content .radio', 'radio', '.notification_real', 'actual' );
369
 
370
+ // Repeater Field
371
+ woolentor_repeater_field();
372
+
373
+
374
+ }
375
+
376
+ /* Repeater Item control */
377
+ function woolentor_repeater_field(){
378
+
379
+ /* Add field */
380
+ $('.woolentor-repeater-item-add').on('click',function(e){
381
+ e.preventDefault();
382
+
383
+ var $this = $(this),
384
+ $hidden = $this.prev('.woolentor-repeater-hidden').clone(true),
385
+ $itemCount = $('.woolentor-option-repeater-item:not(.woolentor-repeater-hidden)').length;
386
+
387
+ $hidden.attr('data-id', $itemCount );
388
+ $('.woolentor-option-repeater-item-area .woolentor-option-repeater-item').siblings().removeClass('woolentor_active_repeater');
389
+ $hidden.removeClass('woolentor-repeater-hidden').addClass('woolentor_active_repeater');
390
+ $hidden.insertAfter( '.woolentor-option-repeater-item-area div.woolentor-option-repeater-item:last' );
391
+
392
+ // Enable Button
393
+ $('.woolentor-admin-module-save').removeClass('disabled').attr('disabled', false).text( WOOLENTOR_ADMIN.message.btntxt );
394
+
395
+ return false;
396
+
397
+ });
398
+
399
+ // Hide Show Manage
400
+ $('.woolentor-option-repeater-item').on('click', '.woolentor-option-repeater-tools', function(){
401
+ const $this = $(this),
402
+ $parentItem = $this.parent();
403
+ if( $parentItem.hasClass('woolentor_active_repeater') ) {
404
+ $parentItem.removeClass('woolentor_active_repeater');
405
+ } else {
406
+ $parentItem.addClass('woolentor_active_repeater').siblings().removeClass('woolentor_active_repeater');
407
+ }
408
+ });
409
+
410
+ // Remove Element
411
+ $( '.woolentor-option-repeater-item-remove' ).on('click', function( event ) {
412
+ $(this).parents('.woolentor-option-repeater-item').remove();
413
+ // ID Reorder
414
+ $('.woolentor-option-repeater-item:not(.woolentor-repeater-hidden)').each( function( index ) {
415
+ $(this).attr('data-id', index );
416
+ });
417
+
418
+ // If delete all item then insert empty item
419
+ if( $('.woolentor-option-repeater-item').length == 1 ){
420
+ var emptyHtml = $('<div class="woolentor-option-repeater-item-area"><div class="woolentor-option-repeater-item" style="margin:0;height:0;">&nbsp;</div></div>');
421
+ emptyHtml.insertAfter('.woolentor-repeater-heading');
422
+ }
423
+
424
+ // Enable Button
425
+ $('.woolentor-admin-module-save').removeClass('disabled').attr('disabled', false).text( WOOLENTOR_ADMIN.message.btntxt );
426
+
427
+ return false;
428
+ });
429
+
430
+ // Initiate sortable Field
431
+ if( $( ".woolentor-option-repeater-item-area" ).length > 0 ){
432
+ $( ".woolentor-option-repeater-item-area" ).sortable({
433
+ axis: 'y',
434
+ connectWith: ".woolentor-option-repeater-item",
435
+ handle: ".woolentor-option-repeater-tools",
436
+ placeholder: "widget-placeholder",
437
+ update: function( event, ui ) {
438
+ $('.woolentor-admin-module-save').removeClass('disabled').attr('disabled', false).text( WOOLENTOR_ADMIN.message.btntxt );
439
+ }
440
+ });
441
+ }
442
+
443
  }
444
+ woolentor_repeater_field();
445
 
446
  // Extension Tabs
447
  woolentor_admin_tabs( $(".woolentor-admin-tabs"), '.woolentor-admin-tab-pane' );
includes/admin/include/admin_field-manager.php CHANGED
@@ -31,12 +31,14 @@ class Woolentor_Admin_Fields_Manager {
31
  wp_enqueue_style( 'wp-color-picker' );
32
  wp_enqueue_media();
33
  wp_enqueue_script( 'wp-color-picker' );
 
34
  wp_enqueue_script( 'jquery' );
35
  }
36
 
37
  public function add_field( $option, $section ){
38
 
39
  $name = isset( $option['option_id'] ) ? $option['option_id'] : $option['name'];
 
40
  $type = isset( $option['type'] ) ? $option['type'] : 'text';
41
  $label = isset( $option['label'] ) ? $option['label'] : '';
42
  $preview = isset( $option['preview'] ) ? $option['preview'] : '';
@@ -45,6 +47,7 @@ class Woolentor_Admin_Fields_Manager {
45
  $require_settings = isset( $option['require_settings'] ) ? $option['require_settings'] : '';
46
  $setting_fields = isset( $option['setting_fields'] ) ? $option['setting_fields'] : '';
47
  $is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : '';
 
48
  $callback = isset( $option['callback'] ) ? $option['callback'] : [ $this, 'callback_' . $type ];
49
 
50
  $args = array(
@@ -52,6 +55,8 @@ class Woolentor_Admin_Fields_Manager {
52
  'class' => isset( $option['class'] ) ? $option['class'] : $name,
53
  'desc' => isset( $option['desc'] ) ? $option['desc'] : '',
54
  'name' => $label,
 
 
55
  'section' => $section,
56
  'size' => isset( $option['size'] ) ? $option['size'] : null,
57
  'options' => isset( $option['options'] ) ? $option['options'] : '',
@@ -63,6 +68,7 @@ class Woolentor_Admin_Fields_Manager {
63
  'max' => isset( $option['max'] ) ? $option['max'] : '',
64
  'step' => isset( $option['step'] ) ? $option['step'] : '',
65
  'headding' => isset( $option['headding'] ) ? $option['headding'] : '',
 
66
  'additional_info' => [
67
  'preview' => $preview,
68
  'documentation' => $documentation,
@@ -132,7 +138,7 @@ class Woolentor_Admin_Fields_Manager {
132
  */
133
  public function callback_text( $args ) {
134
 
135
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
136
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
137
  $type = isset( $args['type'] ) ? $args['type'] : 'text';
138
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
@@ -165,7 +171,7 @@ class Woolentor_Admin_Fields_Manager {
165
  */
166
  public function callback_image_upload( $args ) {
167
 
168
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
169
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
170
  $id = $args['section'] . '[' . $args['id'] . ']';
171
 
@@ -240,6 +246,75 @@ class Woolentor_Admin_Fields_Manager {
240
 
241
  }
242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  /**
244
  * Displays a checkbox for a settings field
245
  *
@@ -247,7 +322,7 @@ class Woolentor_Admin_Fields_Manager {
247
  */
248
  public function callback_element( $args ) {
249
 
250
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
251
 
252
  $checked = checked( $value, 'on', false );
253
  $switch_id = esc_attr('data-switch-id=element');
@@ -296,7 +371,8 @@ class Woolentor_Admin_Fields_Manager {
296
  */
297
  public function callback_number( $args ) {
298
 
299
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
 
300
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
301
  $type = isset( $args['type'] ) ? $args['type'] : 'number';
302
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
@@ -334,7 +410,7 @@ class Woolentor_Admin_Fields_Manager {
334
  */
335
  public function callback_checkbox( $args ) {
336
 
337
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
338
 
339
  $checked = checked( $value, 'on', false );
340
  $data_atr = '';
@@ -366,7 +442,7 @@ class Woolentor_Admin_Fields_Manager {
366
  */
367
  public function callback_radio( $args ) {
368
 
369
- $value = $this->get_option( $args['id'], $args['section'], $args['std'] );
370
 
371
  $data_atr = $disabled = '';
372
  if( $args['additional_info']['is_pro'] === true ){
@@ -403,7 +479,7 @@ class Woolentor_Admin_Fields_Manager {
403
  */
404
  public function callback_select( $args ) {
405
 
406
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
407
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
408
 
409
  $data_atr = $disabled = '';
@@ -438,7 +514,8 @@ class Woolentor_Admin_Fields_Manager {
438
  */
439
  public function callback_selectgroup( $args ) {
440
 
441
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
 
442
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
443
 
444
  $data_atr = $disabled = '';
@@ -484,7 +561,7 @@ class Woolentor_Admin_Fields_Manager {
484
  */
485
  public function callback_multiselect( $args ) {
486
 
487
- $value = $this->get_option( $args['id'], $args['section'], $args['std'] );
488
 
489
  $data_atr = $disabled = '';
490
  if( $args['additional_info']['is_pro'] === true ){
@@ -522,7 +599,8 @@ class Woolentor_Admin_Fields_Manager {
522
  */
523
  public function callback_color( $args ) {
524
 
525
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
 
526
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
527
 
528
  $data_atr = $disabled = '';
@@ -553,7 +631,7 @@ class Woolentor_Admin_Fields_Manager {
553
  */
554
  public function callback_dimensions( $args ) {
555
 
556
- $value = $this->get_option( $args['id'], $args['section'], $args['std'] );
557
 
558
  $data_atr = $disabled = '';
559
  if( $args['additional_info']['is_pro'] === true ){
@@ -588,6 +666,39 @@ class Woolentor_Admin_Fields_Manager {
588
  echo $html;
589
  }
590
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
591
  /**
592
  * Get the value of a settings field
593
  *
@@ -675,6 +786,17 @@ class Woolentor_Admin_Fields_Manager {
675
  self.siblings('.woolentor_display').html('');
676
  });
677
 
 
 
 
 
 
 
 
 
 
 
 
678
  });
679
  </script>
680
  <?php
31
  wp_enqueue_style( 'wp-color-picker' );
32
  wp_enqueue_media();
33
  wp_enqueue_script( 'wp-color-picker' );
34
+ wp_enqueue_script( 'jquery-ui-sortable' );
35
  wp_enqueue_script( 'jquery' );
36
  }
37
 
38
  public function add_field( $option, $section ){
39
 
40
  $name = isset( $option['option_id'] ) ? $option['option_id'] : $option['name'];
41
+ $value = isset( $option['value'] ) ? $option['value'] : '';
42
  $type = isset( $option['type'] ) ? $option['type'] : 'text';
43
  $label = isset( $option['label'] ) ? $option['label'] : '';
44
  $preview = isset( $option['preview'] ) ? $option['preview'] : '';
47
  $require_settings = isset( $option['require_settings'] ) ? $option['require_settings'] : '';
48
  $setting_fields = isset( $option['setting_fields'] ) ? $option['setting_fields'] : '';
49
  $is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : '';
50
+ $fields = isset( $option['fields'] ) ? $option['fields'] : [];
51
  $callback = isset( $option['callback'] ) ? $option['callback'] : [ $this, 'callback_' . $type ];
52
 
53
  $args = array(
55
  'class' => isset( $option['class'] ) ? $option['class'] : $name,
56
  'desc' => isset( $option['desc'] ) ? $option['desc'] : '',
57
  'name' => $label,
58
+ 'value' => $value,
59
+ 'title_field' => isset( $option['title_field'] ) ? $option['title_field'] : '',
60
  'section' => $section,
61
  'size' => isset( $option['size'] ) ? $option['size'] : null,
62
  'options' => isset( $option['options'] ) ? $option['options'] : '',
68
  'max' => isset( $option['max'] ) ? $option['max'] : '',
69
  'step' => isset( $option['step'] ) ? $option['step'] : '',
70
  'headding' => isset( $option['headding'] ) ? $option['headding'] : '',
71
+ 'fields' => $fields,
72
  'additional_info' => [
73
  'preview' => $preview,
74
  'documentation' => $documentation,
138
  */
139
  public function callback_text( $args ) {
140
 
141
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
142
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
143
  $type = isset( $args['type'] ) ? $args['type'] : 'text';
144
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
171
  */
172
  public function callback_image_upload( $args ) {
173
 
174
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
175
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
176
  $id = $args['section'] . '[' . $args['id'] . ']';
177
 
246
 
247
  }
248
 
249
+ /**
250
+ * Displays a repeater field for a settings field
251
+ *
252
+ * @param array $args settings field args
253
+ */
254
+ public function callback_repeater( $args ) {
255
+
256
+ $values = $this->get_option( $args['id'], $args['section'], $args['std'] );
257
+ echo '<div class="woolentor-admin-option woolentor-repeater-heading">';
258
+ echo $this->get_field_title( $args );
259
+ echo $this->get_field_description( $args );
260
+ echo '</div>';
261
+ $number = 0;
262
+ if ( ! empty( $values ) && is_array( $values ) ) {
263
+ echo '<div class="woolentor-option-repeater-item-area">';
264
+ foreach( $values as $key => $value ){
265
+ echo '<div class="woolentor-option-repeater-item" data-id="'.esc_attr( $number ).'">';
266
+
267
+ $title_field = isset( $values[$key][$args['title_field']] ) ? $values[$key][$args['title_field']] : '';
268
+ ?>
269
+ <div class="woolentor-option-repeater-tools">
270
+ <div class="woolentor-option-repeater-item-title">
271
+ <?php echo esc_html( $title_field ); ?>
272
+ </div>
273
+ <div class="woolentor-option-repeater-item-remove">
274
+ <span class="dashicon dashicons dashicons-no-alt">&nbsp;</span>
275
+ </div>
276
+ </div>
277
+ <div class="woolentor-option-repeater-fields">
278
+ <?php
279
+ foreach ( $args['fields'] as $field ) {
280
+ $field['option_id'] = '['.$args['id'].'][]['.$field['name'].']';
281
+ $field['value'] = ( isset( $field['name'] ) && isset( $values[$key][$field['name']] ) ) ? $values[$key][$field['name']] : '';
282
+ $this->add_field( $field, $args['section'] );
283
+ }
284
+ ?>
285
+ </div>
286
+ <?php
287
+ echo '</div>';
288
+ $number++;
289
+ }
290
+ echo '</div>';
291
+ }else{
292
+ echo '<div class="woolentor-option-repeater-item-area"><div class="woolentor-option-repeater-item" style="margin:0;height:0;">&nbsp;</div></div>';
293
+ }
294
+
295
+ echo '<div class="woolentor-option-repeater-item woolentor-repeater-hidden">';
296
+ ?>
297
+ <div class="woolentor-option-repeater-tools">
298
+ <div class="woolentor-option-repeater-item-title">&nbsp;</div>
299
+ <div class="woolentor-option-repeater-item-remove">
300
+ <span class="dashicon dashicons dashicons-no-alt">&nbsp;</span>
301
+ </div>
302
+ </div>
303
+ <div class="woolentor-option-repeater-fields">
304
+ <?php
305
+ foreach( $args['fields'] as $field ){
306
+ $field['option_id'] = '['.$args['id'].'][]['.$field['name'].']';
307
+ $this->add_field( $field, $args['section'] );
308
+ }
309
+ ?>
310
+ </div>
311
+ <?php
312
+ echo '</div>';
313
+ echo '<button type="button" class="woolentor-repeater-item-add woolentor-admin-btn-primary"><span class="dashicon dashicons dashicons-plus-alt2"></span>'.esc_html__('Add Item','woolentor').'</button>';
314
+
315
+
316
+ }
317
+
318
  /**
319
  * Displays a checkbox for a settings field
320
  *
322
  */
323
  public function callback_element( $args ) {
324
 
325
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
326
 
327
  $checked = checked( $value, 'on', false );
328
  $switch_id = esc_attr('data-switch-id=element');
371
  */
372
  public function callback_number( $args ) {
373
 
374
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
375
+
376
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
377
  $type = isset( $args['type'] ) ? $args['type'] : 'number';
378
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
410
  */
411
  public function callback_checkbox( $args ) {
412
 
413
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
414
 
415
  $checked = checked( $value, 'on', false );
416
  $data_atr = '';
442
  */
443
  public function callback_radio( $args ) {
444
 
445
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? $args['value'] : $this->get_option( $args['id'], $args['section'], $args['std'] );
446
 
447
  $data_atr = $disabled = '';
448
  if( $args['additional_info']['is_pro'] === true ){
479
  */
480
  public function callback_select( $args ) {
481
 
482
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
483
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
484
 
485
  $data_atr = $disabled = '';
514
  */
515
  public function callback_selectgroup( $args ) {
516
 
517
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
518
+
519
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
520
 
521
  $data_atr = $disabled = '';
561
  */
562
  public function callback_multiselect( $args ) {
563
 
564
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? $args['value'] : $this->get_option( $args['id'], $args['section'], $args['std'] );
565
 
566
  $data_atr = $disabled = '';
567
  if( $args['additional_info']['is_pro'] === true ){
599
  */
600
  public function callback_color( $args ) {
601
 
602
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
603
+
604
  $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
605
 
606
  $data_atr = $disabled = '';
631
  */
632
  public function callback_dimensions( $args ) {
633
 
634
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? $args['value'] : $this->get_option( $args['id'], $args['section'], $args['std'] );
635
 
636
  $data_atr = $disabled = '';
637
  if( $args['additional_info']['is_pro'] === true ){
666
  echo $html;
667
  }
668
 
669
+ /**
670
+ * Displays a date picker field for a settings field
671
+ *
672
+ * @param array $args settings field args
673
+ */
674
+ public function callback_date( $args ) {
675
+
676
+ $value = ( isset( $args['value'] ) && !empty ( $args['value'] ) ) ? esc_attr( $args['value'] ) : esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
677
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
678
+ $type = isset( $args['type'] ) ? $args['type'] : 'text';
679
+ $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
680
+
681
+ $data_atr = $disabled = '';
682
+ if( $args['additional_info']['is_pro'] === true ){
683
+ $disabled = esc_attr('disabled=true');
684
+ $data_atr = esc_attr( 'data-woolentor-pro=disabled' );
685
+ }
686
+
687
+ $html = '<div class="woolentor-admin-option '.esc_attr( $args['class'] ).'">';
688
+ $html .= '<div class="woolentor-admin-option-content">';
689
+ $html .= $this->get_field_title( $args );
690
+ $html .= $this->get_field_description( $args );
691
+ $html .= '</div>';
692
+ $html .= '<div class="woolentor-admin-option-action" '.$data_atr.'>';
693
+ $html .= '<div class="woolentor-admin-input">';
694
+ $html .= sprintf( '<input type="%1$s" class="%2$s-text woolentor-date-picker-field" id="%3$s[%4$s]" name="%4$s" value="%5$s" %6$s/>', $type, $size, $args['section'], $args['id'], $value, $placeholder );
695
+ $html .= '</div>';
696
+ $html .= '</div>';
697
+ $html .= '</div>';
698
+
699
+ echo $html;
700
+ }
701
+
702
  /**
703
  * Get the value of a settings field
704
  *
786
  self.siblings('.woolentor_display').html('');
787
  });
788
 
789
+ // Initiate sortable Field
790
+ $( ".woolentor-option-repeater-item-area" ).sortable({
791
+ axis: 'y',
792
+ connectWith: ".woolentor-option-repeater-item",
793
+ handle: ".woolentor-option-repeater-tools",
794
+ placeholder: "widget-placeholder",
795
+ update: function( event, ui ) {
796
+ $('.woolentor-admin-module-save').removeClass('disabled').attr('disabled', false).text( WOOLENTOR_ADMIN.message.btntxt );
797
+ }
798
+ });
799
+
800
  });
801
  </script>
802
  <?php
includes/admin/include/admin_fields.php CHANGED
@@ -652,6 +652,14 @@ class Woolentor_Admin_Fields {
652
  'is_pro' => true,
653
  ),
654
 
 
 
 
 
 
 
 
 
655
  array(
656
  'name' => 'wl_myaccount_dashboardp',
657
  'label' => esc_html__( 'My Account Dashboard', 'woolentor' ),
652
  'is_pro' => true,
653
  ),
654
 
655
+ array(
656
+ 'name' => 'wl_myaccount_navigationp',
657
+ 'label' => esc_html__( 'My Account Navigation', 'woolentor' ),
658
+ 'type' => 'element',
659
+ 'default' => 'off',
660
+ 'is_pro' => true,
661
+ ),
662
+
663
  array(
664
  'name' => 'wl_myaccount_dashboardp',
665
  'label' => esc_html__( 'My Account Dashboard', 'woolentor' ),
includes/modules/shopify-like-checkout/assets/shopify-like-checkout.css CHANGED
@@ -104,7 +104,7 @@
104
  }
105
 
106
  .woolentor-checkout__logo img{
107
- width: 100%;
108
  }
109
 
110
  .woolentor-checkout__breadcrumb {
104
  }
105
 
106
  .woolentor-checkout__logo img{
107
+ max-width: 100%;
108
  }
109
 
110
  .woolentor-checkout__breadcrumb {
includes/modules/shopify-like-checkout/class.shopify-like-checkout.php CHANGED
@@ -54,10 +54,17 @@ class Woolentor_Shopify_Like_Checkout extends \WC_Checkout{
54
  return;
55
  }
56
 
57
- if ( apply_filters( 'wooLentor_wc_styles_dependency', true ) ) {
 
 
 
 
 
 
58
  wp_deregister_style( 'woocommerce-layout' );
59
  wp_deregister_style( 'woocommerce-smallscreen' );
60
  wp_deregister_style( 'woocommerce-general' );
 
61
  }
62
 
63
  // Styles
@@ -73,6 +80,7 @@ class Woolentor_Shopify_Like_Checkout extends \WC_Checkout{
73
  'nonce' => wp_create_nonce('woolentor_slc_nonce') // Nonce for shopify like checkout
74
  )
75
  );
 
76
  }
77
 
78
  /**
54
  return;
55
  }
56
 
57
+ if ( apply_filters( 'woolentor_wc_styles_dependency', true ) ) {
58
+
59
+ wp_dequeue_style( 'woocommerce-layout' );
60
+ wp_dequeue_style( 'woocommerce-smallscreen' );
61
+ wp_dequeue_style( 'woocommerce-general' );
62
+
63
+ //Over Confirm for Default style
64
  wp_deregister_style( 'woocommerce-layout' );
65
  wp_deregister_style( 'woocommerce-smallscreen' );
66
  wp_deregister_style( 'woocommerce-general' );
67
+
68
  }
69
 
70
  // Styles
80
  'nonce' => wp_create_nonce('woolentor_slc_nonce') // Nonce for shopify like checkout
81
  )
82
  );
83
+
84
  }
85
 
86
  /**
readme.txt CHANGED
@@ -3,11 +3,11 @@ Contributors: hasthemes, htplugins, devitemsllc, tarekht
3
  Tags: Elementor, WooCommerce, WooCommerce Elementor, WooCommerce Builder, WooCommerce Product
4
  Requires at least: 4.7
5
  Tested up to: 5.8.2
6
- Stable tag: 2.1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- WooLentor is a Elementor Addons for WooCommerce Product.
11
 
12
  == Description ==
13
  WooLentor is a WooCommerce Addons plugin for Elementor Page Builder. WooCommerce Builder is included in this plugin to build custom product page and archive pages.
@@ -325,6 +325,11 @@ Elementor Pro is not required. But you can use wooLentor with Elementor free & P
325
 
326
  == Changelog ==
327
 
 
 
 
 
 
328
  = Version: 2.1.1 - Date: 2021-11-29 =
329
  * Added : Template Builder option added from own post type.
330
  * Added : Shopify Style checkout page.
3
  Tags: Elementor, WooCommerce, WooCommerce Elementor, WooCommerce Builder, WooCommerce Product
4
  Requires at least: 4.7
5
  Tested up to: 5.8.2
6
+ Stable tag: 2.1.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ All-in-one solution to enhance your WooCommerce website including WooCommerce Elementor Addons, splendid features, and a WooCommerce builder for Elementor.
11
 
12
  == Description ==
13
  WooLentor is a WooCommerce Addons plugin for Elementor Page Builder. WooCommerce Builder is included in this plugin to build custom product page and archive pages.
325
 
326
  == Changelog ==
327
 
328
+ = Version: 2.1.2 - Date: 2021-12-07 =
329
+ * Added : Product box same height option in Universal product layout
330
+ * Improved : Elelementor Widget register.
331
+ * Solved : Logo dimension issue for shopify style checkout page.
332
+
333
  = Version: 2.1.1 - Date: 2021-11-29 =
334
  * Added : Template Builder option added from own post type.
335
  * Added : Shopify Style checkout page.
woolentor_addons_elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooLentor - WooCommerce Elementor Addons + Builder
4
  * Description: The WooCommerce elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://woolentor.com/
6
- * Version: 2.1.1
7
  * Author: HasThemes
8
  * Author URI: https://hasthemes.com/plugins/woolentor-pro/
9
  * License: GPL-2.0+
@@ -17,7 +17,7 @@
17
 
18
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
 
20
- define( 'WOOLENTOR_VERSION', '2.1.1' );
21
  define( 'WOOLENTOR_ADDONS_PL_ROOT', __FILE__ );
22
  define( 'WOOLENTOR_ADDONS_PL_URL', plugins_url( '/', WOOLENTOR_ADDONS_PL_ROOT ) );
23
  define( 'WOOLENTOR_ADDONS_PL_PATH', plugin_dir_path( WOOLENTOR_ADDONS_PL_ROOT ) );
3
  * Plugin Name: WooLentor - WooCommerce Elementor Addons + Builder
4
  * Description: The WooCommerce elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://woolentor.com/
6
+ * Version: 2.1.2
7
  * Author: HasThemes
8
  * Author URI: https://hasthemes.com/plugins/woolentor-pro/
9
  * License: GPL-2.0+
17
 
18
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
 
20
+ define( 'WOOLENTOR_VERSION', '2.1.2' );
21
  define( 'WOOLENTOR_ADDONS_PL_ROOT', __FILE__ );
22
  define( 'WOOLENTOR_ADDONS_PL_URL', plugins_url( '/', WOOLENTOR_ADDONS_PL_ROOT ) );
23
  define( 'WOOLENTOR_ADDONS_PL_PATH', plugin_dir_path( WOOLENTOR_ADDONS_PL_ROOT ) );