Shortcodes and extra features for Phlox theme - Version 2.5.0

Version Description

Download this release

Release Info

Developer averta
Plugin Icon 128x128 Shortcodes and extra features for Phlox theme
Version 2.5.0
Comparing to
See all releases

Code changes from version 2.4.19 to 2.5.0

Files changed (70) hide show
  1. README.txt +111 -1
  2. admin/assets/js/elementor/widgets.js +25 -20
  3. admin/assets/js/plugins.js +1 -1
  4. admin/includes/admin-ajax.php +12 -1
  5. admin/includes/admin-hooks.php +94 -39
  6. admin/includes/admin-the-functions.php +148 -0
  7. admin/includes/compatibility/element-pack/element-pack.php +12 -0
  8. admin/includes/index.php +2 -0
  9. admin/includes/metaboxes/metabox-fields-general-custom-logo.php +59 -0
  10. admin/includes/metaboxes/metabox-fields-general-header-template-settings.php +71 -0
  11. admin/includes/metaboxes/metabox-fields-general-header-template.php +85 -0
  12. admin/includes/metaboxes/metabox-fields-general-header.php +250 -175
  13. admin/includes/metaboxes/metabox-fields-general-top-header.php +62 -9
  14. auxin-elements.php +1 -1
  15. includes/classes/class-auxels-search-post-type.php +296 -0
  16. includes/classes/class-auxin-demo-importer.php +148 -46
  17. includes/classes/class-auxin-welcome-sections.php +4 -2
  18. includes/classes/class-auxin-welcome.php +4 -4
  19. includes/define.php +1 -1
  20. includes/elementor/class-auxin-elementor-core-elements.php +148 -113
  21. includes/elementor/modules/documents/footer.php +1 -1
  22. includes/elementor/widgets/accordion.php +0 -4
  23. includes/elementor/widgets/audio.php +0 -7
  24. includes/elementor/widgets/before-after.php +0 -6
  25. includes/elementor/widgets/button.php +2 -7
  26. includes/elementor/widgets/carousel-navigation.php +522 -0
  27. includes/elementor/widgets/contact-box.php +0 -7
  28. includes/elementor/widgets/contact-form.php +0 -7
  29. includes/elementor/widgets/custom-list.php +4 -5
  30. includes/elementor/widgets/divider.php +0 -7
  31. includes/elementor/widgets/gallery.php +0 -12
  32. includes/elementor/widgets/gmap.php +1 -8
  33. includes/elementor/widgets/icon.php +1 -10
  34. includes/elementor/widgets/image.php +4 -3
  35. includes/elementor/widgets/mailchimp.php +3 -7
  36. includes/elementor/widgets/quote.php +0 -4
  37. includes/elementor/widgets/recent-comments.php +1 -6
  38. includes/elementor/widgets/recent-posts-grid-carousel.php +4 -9
  39. includes/elementor/widgets/recent-posts-land-style.php +2 -8
  40. includes/elementor/widgets/recent-posts-masonry.php +5 -10
  41. includes/elementor/widgets/recent-posts-tiles-carousel.php +0 -5
  42. includes/elementor/widgets/recent-posts-tiles.php +0 -5
  43. includes/elementor/widgets/recent-posts-timeline.php +2 -7
  44. includes/elementor/widgets/recent-products.php +0 -5
  45. includes/elementor/widgets/search.php +0 -7
  46. includes/elementor/widgets/staff.php +56 -17
  47. includes/elementor/widgets/svg.php +447 -0
  48. includes/elementor/widgets/tabs.php +0 -4
  49. includes/elementor/widgets/testimonial.php +4 -3
  50. includes/elementor/widgets/text.php +27 -9
  51. includes/elementor/widgets/theme-elements/copyright.php +240 -0
  52. includes/elementor/widgets/theme-elements/current-time.php +0 -7
  53. includes/elementor/widgets/theme-elements/logo.php +38 -21
  54. includes/elementor/widgets/theme-elements/menu.php +267 -121
  55. includes/elementor/widgets/theme-elements/modern-search.php +634 -0
  56. includes/elementor/widgets/theme-elements/search.php +80 -60
  57. includes/elementor/widgets/theme-elements/shopping-cart.php +94 -11
  58. includes/elementor/widgets/theme-elements/site-title.php +1 -8
  59. includes/elementor/widgets/touch-slider.php +0 -5
  60. includes/elementor/widgets/video.php +6 -11
  61. includes/elements/recent-posts-grid-carousel.php +1 -1
  62. includes/elements/staff.php +7 -0
  63. includes/elements/text.php +6 -3
  64. includes/general-functions.php +78 -8
  65. includes/general-hooks.php +251 -61
  66. public/assets/js/plugins.js +1 -1
  67. public/assets/js/scripts.js +122 -0
  68. public/class-auxels.php +1 -0
  69. public/includes/class-auxels-frontend-assets.php +1 -0
  70. public/includes/frontend-ajax.php +196 -1
README.txt CHANGED
@@ -7,7 +7,7 @@ Tags: phlox, gallery, elementor, siteorigin, auxin, averta, auxin-elements, fram
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
  Tested up to: 5.3.3
10
- Stable tag: 2.4.19
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -155,6 +155,116 @@ Bugs can be reported in our [support forums](https://docs.phlox.pro).
155
 
156
  == Changelog ==
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  = Version 2.4.18 / (03.02.2020) =
159
  - [Improvement]: Some improvements for modern heading element applied.
160
  - [Improvement]: Improvements for dark mode styles in Elementor panel applied.
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
  Tested up to: 5.3.3
10
+ Stable tag: 2.5.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
155
 
156
  == Changelog ==
157
 
158
+ = Version 2.5.0 / (09.03.2020) =
159
+ - [Fix]: Merge branch '2.5.0' into develop
160
+ - [Fix]: Automatically disable Elementor default colors and fonts on fresh installations
161
+ - [Fix]: Moving the Elementor related codes to main Elementor class
162
+ - [Fix]: Changing the default search icon for modern search element
163
+ - [Fix]: Renaming the phlox icon set in Elementor font library
164
+ - [Fix]: add icon to elementor icon controller
165
+ - [Fix]: Renaming old search element to search form
166
+ - [Fix]: Improvement in text and default values in options of shpopping cart element
167
+ - [Fix]: Built-in fullscreen options removed from customizer
168
+ - [Fix]: Fix not importing terms which it's name is number
169
+ - [Fix]: Add New Search Widget To Theme Elements
170
+ - [Fix]: Fixing a bug for hover color option of read more link in recent post element.
171
+ - [Fix]: Changing the priority of page option tabs
172
+ - [Fix]: Imrpvement in shopping cart options and enabling simple mode by default
173
+ - [Fix]: Bug fix - header button option not importing when demo importing
174
+ - [Fix]: Update Menu of imported header or footer
175
+ - [Fix]: Fix font and url issue while importing demos
176
+ - [Fix]: Removing redundant namespace and whitespaces
177
+ - [Fix]: Adding dynamic source to all Elementor URL controls
178
+ - [Fix]: Allow importing a header a footer template if imported demo is deleted.
179
+ - [Fix]: Renaming the transient for caching downloaded template data
180
+ - [Fix]: Renaming the temporary importer options for menu items
181
+ - [Fix]: Renaming the temporary importer options for menu items
182
+ - [Fix]: Changing the key of some transients
183
+ - [Fix]: Set search phrase argument after search for sku
184
+ - [Fix]: Making sure if the ported template is a valid template
185
+ - [Fix]: Product Search Bug Fix
186
+ - [Fix]: Fix an issue with unexpected generated css style
187
+ - [Fix]: Fix an issue with elementor header selectors and attributes
188
+ - [Fix]: Add comment for importing product attributes
189
+ - [Fix]: Correct url add in custom css of an element
190
+ - [Fix]: Importer Improvement
191
+ - [Fix]: An issue with unit size of slider controls in mailchimp element fixed
192
+ - [Fix]: Fix an issue with default search bakcground color
193
+ - [Fix]: add user menu to imported default header or footer
194
+ - [Fix]: Automatically import and set default header and footer template
195
+ - [Fix]: Fixing the ajax fatal error.
196
+ - [Fix]: Fixing a notice for undefined license tokens
197
+ - [Fix]: Changing the priority of hook for importing and inserting default header template
198
+ - [Fix]: template importer function load only in admin pages
199
+ - [Fix]: Template Importer Improvement
200
+ - [Fix]: Storing the current Elementor version while importing a template
201
+ - [Fix]: Code improvement and preventing DIY
202
+ - [Fix]: Fixing a conflict
203
+ - [Fix]: Flush css after importing the template
204
+ - [Fix]: Improve the json response of template library controller
205
+ - [Fix]: Instagram link for staff Element added
206
+ - [Fix]: remove dependency for fullscreen search options in customizer
207
+ - [Fix]: Moving fullscreen search options to new section in custmizer
208
+ - [Fix]: Typo fixed in search element
209
+ - [Fix]: remove deprecated install notice for pro tools
210
+ - [Fix]: A fix for retrieving header template Id
211
+ - [Fix]: Turn off the Legacy options by default and fallback to built-in header and footer if Elementor is disabled
212
+ - [Fix]: Removing extra packages for shopping cart Element class
213
+ - [Fix]: Improving Elementor install notice
214
+ - [Fix]: Change the typof use legacy header controller from switch to select
215
+ - [Fix]: Fix an issue with use legacy header default value
216
+ - [Fix]: Chnage Elementor Footer Template Classname
217
+ - [Fix]: Shooping cart depend on activation of WooCommerce
218
+ - [Fix]: Enable the ajax option for search element
219
+ - [Fix]: version bumped to 2.5.0
220
+ - [Fix]: Improvement in ajax messages of header footer builder importer.
221
+ - [Fix]: Improve ajax template importer for auxin_template_library control
222
+ - [Fix]: A quick fix for path to simple svg element
223
+ - [Fix]: Override Use Legacy Header Based on Metabox
224
+ - [Fix]: Override Header Tempalte based on Metabox
225
+ - [Fix]: Add Use Legacy Header Dependency to Header and Topheader Bar Section
226
+ - [Fix]: Add Header Template Section in Metabox
227
+ - [Fix]: Add Header Template Settings Section in Metabox
228
+ - [Fix]: Add New Sections and change the order of sections
229
+ - [Fix]: moving simple svg element to core auxin elements
230
+ - [Fix]: Make JSON Messages Translateble
231
+ - [Fix]: Make JSON Massages Translateble
232
+ - [Fix]: change camel case variable names
233
+ - [Fix]: use get_instance instead of creating new instance of class
234
+ - [Fix]: Template Controller - template ajax import
235
+ - [Fix]: Fix plugin domain
236
+ - [Fix]: Add some cart feature that exist in customizer to elementor cart element
237
+ - [Fix]: 1. Move search global options to extras->search results panel 2. add ajax search option to elementor search element
238
+ - [Fix]: Improvement in translatable description for logo element.
239
+ - [Fix]: the expiration period for dismissing element pack notice increased.
240
+ - [Fix]: Remove Elementor Pack Notice for License
241
+ - [Fix]: Fix an issue with default background color on header
242
+ - [Fix]: Add Custom Logo Section to Page Metabox
243
+ - [Fix]: Fix an issue with sticky footer
244
+ - [Fix]: Improve the footer render template function
245
+ - [Fix]: Add Use legacy footer dependencies
246
+ - [Fix]: copyright element added
247
+ - [Fix]: Add Use Legacy Dependency to Header Options
248
+ - [Fix]: inline svg for infobox element added; plus, copyright element added
249
+ - [Fix]: fixing the conflict for
250
+ - [Fix]: 1. Added : cart type to page metabox 2. Fixed: cart light or dark mode option always get from page metabox not customizer options
251
+ - [Fix]: adding active fullscreen typo and colors to navigation menu element
252
+ - [Fix]: Improve Ajax Search Function
253
+ - [Fix]: Remove search function from general functions and add it as a class
254
+ - [Fix]: Add some new options and optimize the options
255
+ - [Fix]: Add an ability to use font icon in carousel navigation
256
+ - [Fix]: Add Carousel Navigation Widget
257
+ - [Fix]: text shadow option added to fulscreen mobile menu opttions
258
+ - [Fix]: text shadow options and new active menu item option added to navigation menu element
259
+ - [Fix]: adding new word to dictionary
260
+ - [Fix]: rearrange and improvements in navigation menu element
261
+ - [Fix]: modify description for an option in carousel elements
262
+ - [Fix]: word spell ignore list added to editor settings
263
+ - [Fix]: initial changes for ajax search functionality added
264
+ - [Fix]: Improve the header template render function
265
+ - [Fix]: improve the header template functionality
266
+ - [Fix]: Add Dependency to header sections
267
+
268
  = Version 2.4.18 / (03.02.2020) =
269
  - [Improvement]: Some improvements for modern heading element applied.
270
  - [Improvement]: Improvements for dark mode styles in Elementor panel applied.
admin/assets/js/elementor/widgets.js CHANGED
@@ -11,48 +11,48 @@
11
  if ( elementorFrontend.isEditMode() ) {
12
 
13
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux-before-after.default', $.fn.AuxinBeforeAfterInit );
14
-
15
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux-gallery.default', $.fn.AuxinTriggerResize );
16
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux-gallery.default', $.fn.AuxinIsotopeImageLayoutsInit );
17
-
18
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_accordion.default', $.fn.AuxinAccordionInit );
19
-
20
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_tabs.default', $.fn.AuxinLiveTabsInit );
21
-
22
-
23
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_video.default', function( $scope ){ window.wp.mediaelement.initialize() } );
24
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_audio.default', function( $scope ){ window.wp.mediaelement.initialize() } );
25
-
26
-
27
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_grid.default',
28
  function( $scope ){ $.fn.AuxinIsotopeLayoutInit( $('body') ); }
29
  );
30
-
31
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_masonry.default',
32
  function( $scope ){ $.fn.AuxinIsotopeLayoutInit( $('body') ); }
33
  );
34
-
35
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_tile.default',
36
  function( $scope ){ $.fn.AuxinIsotopeTilesInit( $('body') ); }
37
  );
38
-
39
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_grid_carousel.default',
40
  function( $scope ){ $.fn.AuxinCarouselInit( $('body') ); }
41
  );
42
-
43
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_news_grid.default',
44
  function( $scope ){ $.fn.AuxinCarouselInit( $('body') ); }
45
  );
46
 
47
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_shopping_cart.default',
48
- function( $scope ){
49
- $.fn.AuxinDropdownEffectInit( $('body') );
50
- $.fn.AuxinCartCanvasInit( $('body') );
51
  }
52
  );
53
 
54
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_menu_box.default',
55
- function( $scope ){
56
  $scope.find('.aux-master-menu').mastermenu();
57
  $.fn.AuxinMobileMenuInit( $scope );
58
  }
@@ -63,18 +63,23 @@
63
  $.fn.AuxinTiltElementInit($scope);
64
  });
65
 
66
- elementorFrontend.hooks.addAction( 'frontend/element_ready/global',
67
- function( $scope ) {
68
  $.fn.AuxinPageCoverAnimationInit( $scope );
69
  $.fn.AuxinToggleListInit( $scope );
70
  $.fn.AuxinAppearAnimationsInit( $scope );
71
  }
72
-
73
  );
74
-
 
 
 
 
 
 
 
75
  }
76
 
77
  });
78
 
79
  })(jQuery, window, document);
80
-
11
  if ( elementorFrontend.isEditMode() ) {
12
 
13
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux-before-after.default', $.fn.AuxinBeforeAfterInit );
14
+
15
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux-gallery.default', $.fn.AuxinTriggerResize );
16
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux-gallery.default', $.fn.AuxinIsotopeImageLayoutsInit );
17
+
18
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_accordion.default', $.fn.AuxinAccordionInit );
19
+
20
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_tabs.default', $.fn.AuxinLiveTabsInit );
21
+
22
+
23
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_video.default', function( $scope ){ window.wp.mediaelement.initialize() } );
24
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_audio.default', function( $scope ){ window.wp.mediaelement.initialize() } );
25
+
26
+
27
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_grid.default',
28
  function( $scope ){ $.fn.AuxinIsotopeLayoutInit( $('body') ); }
29
  );
30
+
31
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_masonry.default',
32
  function( $scope ){ $.fn.AuxinIsotopeLayoutInit( $('body') ); }
33
  );
34
+
35
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_tile.default',
36
  function( $scope ){ $.fn.AuxinIsotopeTilesInit( $('body') ); }
37
  );
38
+
39
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_portfolios_grid_carousel.default',
40
  function( $scope ){ $.fn.AuxinCarouselInit( $('body') ); }
41
  );
42
+
43
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_recent_news_grid.default',
44
  function( $scope ){ $.fn.AuxinCarouselInit( $('body') ); }
45
  );
46
 
47
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_shopping_cart.default',
48
+ function( $scope ){
49
+ $.fn.AuxinDropdownEffectInit( $('body') );
50
+ $.fn.AuxinCartCanvasInit( $('body') );
51
  }
52
  );
53
 
54
  elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_menu_box.default',
55
+ function( $scope ){
56
  $scope.find('.aux-master-menu').mastermenu();
57
  $.fn.AuxinMobileMenuInit( $scope );
58
  }
63
  $.fn.AuxinTiltElementInit($scope);
64
  });
65
 
66
+ elementorFrontend.hooks.addAction( 'frontend/element_ready/global',
67
+ function( $scope ) {
68
  $.fn.AuxinPageCoverAnimationInit( $scope );
69
  $.fn.AuxinToggleListInit( $scope );
70
  $.fn.AuxinAppearAnimationsInit( $scope );
71
  }
 
72
  );
73
+
74
+ elementorFrontend.hooks.addAction( 'frontend/element_ready/aux_search_box.default', function( $scope ) {
75
+ $.fn.AuxinElementorSearchElement( $scope );
76
+ $(window).on( 'resize', function(){
77
+ $.fn.AuxinElementorSearchElement( $scope );
78
+ });
79
+ });
80
+
81
  }
82
 
83
  });
84
 
85
  })(jQuery, window, document);
 
admin/assets/js/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Phlox Core Plugin - v2.4.19 (2020-02-03)
2
  * All required javascript plugins for admin
3
  * http://phlox.pro/
4
  * Place any jQuery/helper plugins in here, instead of separate, slower script files!
1
+ /*! Phlox Core Plugin - v2.5.0 (2020-03-09)
2
  * All required javascript plugins for admin
3
  * http://phlox.pro/
4
  * Place any jQuery/helper plugins in here, instead of separate, slower script files!
admin/includes/admin-ajax.php CHANGED
@@ -391,4 +391,15 @@ function auxin_customizer_import(){
391
  wp_send_json_success( __( 'Successfully Imported.', 'auxin-elements' ) );
392
 
393
  }
394
- add_action( 'wp_ajax_auxin_customizer_import', 'auxin_customizer_import' );
 
 
 
 
 
 
 
 
 
 
 
391
  wp_send_json_success( __( 'Successfully Imported.', 'auxin-elements' ) );
392
 
393
  }
394
+ add_action( 'wp_ajax_auxin_customizer_import', 'auxin_customizer_import' );
395
+
396
+
397
+ /**
398
+ * Ajax handler for auxin_template_library control to import template
399
+ *
400
+ * @return json
401
+ */
402
+ function auxin_template_control_importer() {
403
+ wp_send_json( auxin_template_importer( $_POST['id'], $_POST['template_type'], 'update_menu' ) );
404
+ }
405
+ add_action( 'wp_ajax_auxin_template_control_importer', 'auxin_template_control_importer' );
admin/includes/admin-hooks.php CHANGED
@@ -318,37 +318,53 @@ add_filter( 'auxin_admin_metabox_models_post', 'auxels_add_post_metabox_models'
318
  /*-----------------------------------------------------------------------------------*/
319
 
320
  function auxels_add_page_metabox_models( $models ){
321
-
 
 
322
  include_once( 'metaboxes/metabox-fields-general-top-header.php');
323
  include_once( 'metaboxes/metabox-fields-general-header.php');
324
  include_once( 'metaboxes/metabox-fields-general-footer.php');
325
  include_once( 'metaboxes/metabox-fields-page-template.php');
326
 
327
  $models[] = array(
328
- 'model' => auxin_metabox_fields_general_top_header(),
329
- 'priority' => 13
330
  );
331
 
332
  $models[] = array(
333
- 'model' => auxin_metabox_fields_general_header(),
334
- 'priority' => 16
335
  );
336
 
337
  $models[] = array(
338
- 'model' => auxin_metabox_fields_general_footer(),
339
- 'priority' => 20
340
  );
341
 
342
  $models[] = array(
343
  'model' => auxin_metabox_fields_page_template(),
344
- 'priority' => 15
 
 
 
 
 
345
  );
346
 
347
  $models[] = array(
348
  'model' => auxin_metabox_fields_general_advanced(),
349
- 'priority' => 36
350
  );
351
 
 
 
 
 
 
 
 
 
 
352
 
353
  return $models;
354
  }
@@ -709,36 +725,6 @@ function auxin_notice_manager(){
709
  ]
710
  ]);
711
  }
712
-
713
- if( ! is_plugin_active( 'auxin-pro-tools/auxin-pro-tools.php' ) ){
714
- $plugin_title = __( 'Phlox Pro Features', 'auxin-elements' );
715
- $button_label = sprintf( esc_html__( 'Activate %s', 'auxin-elements' ), $plugin_title );
716
- $installed_plugins = get_plugins();
717
- if( ! isset( $installed_plugins[ 'auxin-pro-tools/auxin-pro-tools.php' ] ) ){
718
- $button_label = sprintf( esc_html__( 'Install %s', 'auxin-elements' ), $plugin_title );
719
- }
720
-
721
- $notice_list[ 'activate_plugin_phlox_pro_tools' ] = new Auxin_Notices([
722
- 'id' => 'activate_plugin_phlox_pro_tools',
723
- 'title' => __('Please install Phlox Pro features', 'auxin-elements' ),
724
- 'desc' => sprintf( __( 'To take full advantages of Phlox Pro, please install %s plugin.', 'auxin-elements' ), '<strong>'. $plugin_title .'</strong>' ),
725
- 'skin' => 'default', // 'success', 'info', 'error'
726
- 'has_close' => false,
727
- 'buttons' => [
728
- [
729
- 'label' => $button_label,
730
- 'target' => '_self',
731
- 'link' => self_admin_url( 'admin.php?page=auxin-welcome&tab=plugins&items=auxin-pro-tools&view=abstract' )
732
- ],
733
- [
734
- 'label' => __('Not Now', 'auxin-elements'),
735
- 'type' => 'skip',
736
- 'expiration' => HOUR_IN_SECONDS * 2
737
- ]
738
- ]
739
- ]);
740
- }
741
-
742
  }
743
 
744
  $notice_list = apply_filters( 'auxin_admin_notices_instances', $notice_list );
@@ -953,3 +939,72 @@ function auxin_check_license_terms(){
953
  }
954
  }
955
  add_action('admin_notices', 'auxin_check_license_terms');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  /*-----------------------------------------------------------------------------------*/
319
 
320
  function auxels_add_page_metabox_models( $models ){
321
+ include_once( 'metaboxes/metabox-fields-general-header-template-settings.php');
322
+ include_once( 'metaboxes/metabox-fields-general-header-template.php');
323
+ include_once( 'metaboxes/metabox-fields-general-custom-logo.php');
324
  include_once( 'metaboxes/metabox-fields-general-top-header.php');
325
  include_once( 'metaboxes/metabox-fields-general-header.php');
326
  include_once( 'metaboxes/metabox-fields-general-footer.php');
327
  include_once( 'metaboxes/metabox-fields-page-template.php');
328
 
329
  $models[] = array(
330
+ 'model' => auxin_metabox_fields_general_custom_logo(),
331
+ 'priority' => 2
332
  );
333
 
334
  $models[] = array(
335
+ 'model' => auxin_metabox_fields_header_templates(),
336
+ 'priority' => 3
337
  );
338
 
339
  $models[] = array(
340
+ 'model' => auxin_metabox_fields_header_templates_settings(),
341
+ 'priority' => 4
342
  );
343
 
344
  $models[] = array(
345
  'model' => auxin_metabox_fields_page_template(),
346
+ 'priority' => 8
347
+ );
348
+
349
+ $models[] = array(
350
+ 'model' => auxin_metabox_fields_general_footer(),
351
+ 'priority' => 9
352
  );
353
 
354
  $models[] = array(
355
  'model' => auxin_metabox_fields_general_advanced(),
356
+ 'priority' => 10
357
  );
358
 
359
+ $models[] = array(
360
+ 'model' => auxin_metabox_fields_general_header(),
361
+ 'priority' => 11
362
+ );
363
+
364
+ $models[] = array(
365
+ 'model' => auxin_metabox_fields_general_top_header(),
366
+ 'priority' => 12
367
+ );
368
 
369
  return $models;
370
  }
725
  ]
726
  ]);
727
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
728
  }
729
 
730
  $notice_list = apply_filters( 'auxin_admin_notices_instances', $notice_list );
939
  }
940
  }
941
  add_action('admin_notices', 'auxin_check_license_terms');
942
+
943
+
944
+ /**
945
+ * Check if no header template imported or created import our default header and set it as site header
946
+ *
947
+ * @deprecated version 2.5.0
948
+ *
949
+ * @return void
950
+ */
951
+ function auxin_maybe_set_default_header_template() {
952
+
953
+ // check if auxin-elements and elementor is active and if site header template is set or not
954
+ if ( ! empty( auxin_get_option('site_elementor_header_template' ) ) || ! class_exists( '\Elementor\Plugin' ) ){
955
+ return;
956
+ }
957
+
958
+ $imported_header_templates_ids = array_keys( auxin_get_elementor_templates_list( 'header' ) );
959
+
960
+ // check if any template imported or not, if imported set the first template as site header template
961
+ if ( count( $imported_header_templates_ids ) > 1 ) {
962
+ auxin_update_option( 'site_elementor_header_edit_template', $imported_header_templates_ids[1] );
963
+ auxin_update_option( 'site_elementor_header_template', $imported_header_templates_ids[1] );
964
+ return;
965
+ }
966
+
967
+ $template_data = auxin_template_importer( '7183', 'header', 'update_menu' ); // 7183 is the ID of agency header template
968
+
969
+ if ( $template_data['success'] == true ) {
970
+ auxin_update_option( 'site_elementor_header_edit_template', $template_data['data']['postId'] );
971
+ auxin_update_option( 'site_elementor_header_template', $template_data['data']['postId'] );
972
+ }
973
+
974
+ }
975
+ add_action( 'admin_init', 'auxin_maybe_set_default_header_template', 13 ); // Run after `auxin_maybe_port_deprecated_elementor_header_template`
976
+
977
+
978
+
979
+ /**
980
+ * Check if no fooetr template imported or created import our default footer and set it as site footer
981
+ *
982
+ * @deprecated version 2.5.0
983
+ *
984
+ * @return void
985
+ */
986
+ function auxin_maybe_set_default_footer_template() {
987
+
988
+ // check if auxin-elements and elementor is active and if site footer template is set or not
989
+ if ( ! empty( auxin_get_option('site_elementor_footer_template' ) ) || ! class_exists( '\Elementor\Plugin' ) ){
990
+ return;
991
+ }
992
+
993
+ $imported_footer_templates_ids = array_keys( auxin_get_elementor_templates_list( 'footer' ) );
994
+
995
+ // check if any template imported or not, if imported set the first template as site footer template
996
+ if ( count( $imported_footer_templates_ids ) > 1 ) {
997
+ auxin_update_option( 'site_elementor_footer_edit_template', $imported_footer_templates_ids[1] );
998
+ auxin_update_option( 'site_elementor_footer_template', $imported_footer_templates_ids[1] );
999
+ return;
1000
+ }
1001
+
1002
+ $template_data = auxin_template_importer( '7361', 'footer', 'update_menu' ); // 7183 is the ID of agency footer template
1003
+
1004
+ if ( $template_data['success'] == true ) {
1005
+ auxin_update_option( 'site_elementor_footer_edit_template', $template_data['data']['postId'] );
1006
+ auxin_update_option( 'site_elementor_footer_template', $template_data['data']['postId'] );
1007
+ }
1008
+
1009
+ }
1010
+ add_action( 'admin_init', 'auxin_maybe_set_default_footer_template', 13 ); // Run after `auxin_maybe_port_deprecated_elementor_footer_template`
admin/includes/admin-the-functions.php CHANGED
@@ -160,4 +160,152 @@ function auxin_set_uncategorized_term ( $post_id, $post ) {
160
  wp_set_object_terms( $post_id, 'uncategorized', $taxonomy );
161
  }
162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  }
160
  wp_set_object_terms( $post_id, 'uncategorized', $taxonomy );
161
  }
162
  }
163
+ }
164
+
165
+ /**
166
+ * Import requested template from server
167
+ *
168
+ */
169
+ if ( ! function_exists('auxin_template_importer') ) {
170
+ function auxin_template_importer( $template_ID = '', $template_type = '', $action = '' ) {
171
+
172
+ $template_ID = sanitize_text_field( trim( $template_ID ) );
173
+ $template_type = sanitize_text_field( trim( $template_type ) );
174
+
175
+ if ( empty( $template_ID ) || empty( $template_type ) )
176
+ return [
177
+ 'success' => false,
178
+ 'data' => [
179
+ 'message' => __( 'Template ID or type is required.', 'auxin-elements')
180
+ ]
181
+ ];
182
+
183
+ // Get All Templates data
184
+ $templates_data = Auxin_Welcome::get_instance()->get_demo_list('templates');
185
+
186
+ // Find data of selected template
187
+ $has_template = false;
188
+ foreach ( $templates_data['templates'] as $key => $template_info ) {
189
+ if ( $template_info['id'] == $template_ID && $template_info['type'] == $template_type ) {
190
+ $has_template = true;
191
+ $template = $template_info;
192
+ break;
193
+ }
194
+ }
195
+
196
+ if ( ! $has_template ){
197
+ return [
198
+ 'success' => false,
199
+ 'data' => [
200
+ 'message' => __( 'Template Not Found.', 'auxin-elements' )
201
+ ]
202
+ ];
203
+ }
204
+
205
+ // Import Template
206
+ $template_data_key = sanitize_key( "auxin_template_kit_{$template_type}_data_for_origin_id_{$template_ID}" );
207
+ $template_imported_id_key = sanitize_key( "auxin_template_kit_new_id_for_origin_{$template_ID}" );
208
+
209
+ $template_imported_new_id = auxin_get_transient( $template_imported_id_key );
210
+
211
+ // Check if the template is already imported and was not deleted
212
+ if ( false !== $template_imported_new_id && ! in_array( get_post_status( $template_imported_new_id ), [ false, 'trash' ] ) ) {
213
+ return [
214
+ 'success' => true,
215
+ 'data' => [
216
+ 'message' => __( 'Template is already imported.', 'auxin-elements' ),
217
+ 'data' => false,
218
+ 'isImported' => true,
219
+ ]
220
+ ];
221
+ }
222
+
223
+ if( false === $template_data = auxin_get_transient( $template_data_key ) ){
224
+
225
+ // Retrieve the template data
226
+ $template_data = Auxin_Demo_Importer::get_instance()->fetch_template_data( $template_ID );
227
+
228
+ if( ! $template_data ){
229
+ return [
230
+ 'success' => false,
231
+ 'data' => [
232
+ 'message' => __( 'Connection error, please check your connection.', 'auxin-elements' )
233
+ ]
234
+ ];
235
+ }
236
+
237
+ // Set transient for 48h
238
+ auxin_set_transient( $template_data_key, $template_data, WEEK_IN_SECONDS );
239
+ }
240
+
241
+
242
+ $post_type = "elementor_library";
243
+ $args = [
244
+ 'post_title' => wp_strip_all_tags( $template['title'] ),
245
+ 'post_status' => 'publish',
246
+ 'post_type' => $post_type
247
+ ];
248
+
249
+ // Inserting template into database
250
+ $post_id = wp_insert_post( $args );
251
+
252
+ if( ! is_wp_error( $post_id ) ){
253
+
254
+ // update menu name to use menu created by user
255
+ if ( $action == 'update_menu' ) {
256
+ if ( has_nav_menu('header-primary') && $template_type == 'header'){
257
+ $location = 'header-primary';
258
+ } else if ( has_nav_menu('footer') && $template_type == 'footer' ){
259
+ $location = 'footer';
260
+ } else {
261
+ $location = '';
262
+ }
263
+
264
+ $header_menu = ( ! empty( $location ) ) ? get_term( get_nav_menu_locations()[$location], 'nav_menu' ) : '';
265
+ $template_data = ( ! empty( $header_menu ) ) ? preg_replace( '#"menu_slug":".+?(?=")"#', '"menu_slug":"'.$header_menu->name.'"', $template_data ) : $template_data;
266
+ }
267
+
268
+ $json_content = json_decode( $template_data , true );
269
+ $elementor_version = defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : '2.9.0';
270
+
271
+ update_post_meta( $post_id, '_elementor_edit_mode', 'builder' );
272
+ update_post_meta( $post_id, '_elementor_data', $json_content['content'] );
273
+ update_post_meta( $post_id, '_elementor_version', $elementor_version );
274
+
275
+ // Set page template
276
+ if( ! empty( $template['page_tmpl'] ) ){
277
+ update_post_meta( $post_id, '_wp_page_template', $template['page_tmpl'] );
278
+ }
279
+
280
+ // Set template type
281
+ if( $post_type === 'elementor_library' ) {
282
+ update_post_meta( $post_id, '_elementor_template_type', $template_type );
283
+ }
284
+
285
+ auxin_set_transient( $template_imported_id_key, $post_id, MONTH_IN_SECONDS );
286
+
287
+ // Force to generate CSS file for this template
288
+ Auxin_Demo_Importer::get_instance()->maybe_flush_post( $post_id );
289
+
290
+ // NOTE: Here we can set new header or footer template az main header or footer
291
+ return [
292
+ 'success' => true,
293
+ 'data' => [
294
+ 'message' => __( 'Template Imported Successfully', 'auxin-elements'),
295
+ 'postId' => $post_id,
296
+ 'isImported' => false,
297
+ 'postTitle' => get_the_title( $post_id )
298
+ ]
299
+ ];
300
+
301
+ } else {
302
+
303
+ return [
304
+ 'success' => false,
305
+ 'data' => [
306
+ 'message' => __( 'Error while saving the template.', 'auxin-elements')
307
+ ]
308
+ ];
309
+ }
310
+ }
311
  }
admin/includes/compatibility/element-pack/element-pack.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Remove license notices for elementor pack
4
+ *
5
+ * @return void
6
+ */
7
+ function auxin_compatibility_element_pack_remove_license_notice(){
8
+ update_user_meta( get_current_user_id(), 'element-pack-notice-id-license-issue', true );
9
+ set_transient( 'element-pack-notice-id-license-issue', true, YEAR_IN_SECONDS );
10
+ }
11
+
12
+ add_action( 'auxin_plugin_updated', 'auxin_compatibility_element_pack_remove_license_notice');
admin/includes/index.php CHANGED
@@ -10,6 +10,8 @@ include_once( 'compatibility/visual-composer/vc.php' );
10
  include_once( 'compatibility/uvca/uvca.php' );
11
  include_once( 'compatibility/sliders/rev.php' );
12
  include_once( 'compatibility/sliders/layerslider.php' );
 
 
13
 
14
  if ( function_exists('icl_object_id') ) {
15
  include_once( 'compatibility/wpml/translate.php' );
10
  include_once( 'compatibility/uvca/uvca.php' );
11
  include_once( 'compatibility/sliders/rev.php' );
12
  include_once( 'compatibility/sliders/layerslider.php' );
13
+ include_once( 'compatibility/element-pack/element-pack.php' );
14
+
15
 
16
  if ( function_exists('icl_object_id') ) {
17
  include_once( 'compatibility/wpml/translate.php' );
admin/includes/metaboxes/metabox-fields-general-custom-logo.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Adds fields for custom logo metabox
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author averta
9
+ * @link http://phlox.pro/
10
+ * @copyright (c) 2010-2020 averta
11
+ */
12
+
13
+ // no direct access allowed
14
+ if ( ! defined('ABSPATH') ) exit;
15
+
16
+
17
+ function auxin_metabox_fields_general_custom_logo(){
18
+
19
+ $model = new Auxin_Metabox_Model();
20
+ $model->id = 'custom-logo';
21
+ $model->title = __('Custom Logo', 'auxin-elements');
22
+ $model->fields = array(
23
+ array(
24
+ 'title' => __( 'Page Logo', 'auxin-elements' ),
25
+ 'description' => __( 'The main logo which appears only on this page. If you do not specify an image, the default logo will be used.', 'auxin-elements' ),
26
+ 'id' => 'aux_custom_logo',
27
+ 'type' => 'image',
28
+ 'default' => ''
29
+ ),
30
+
31
+ array(
32
+ 'title' => __( 'Page Secondary Logo', 'auxin-elements' ),
33
+ 'description' => __( 'The secondary logo which appears when the header becomes sticky. If you do not specify an image, the default secondary logo will be used.', 'auxin-elements' ),
34
+ 'id' => 'aux_custom_logo2',
35
+ 'type' => 'image',
36
+ 'default' => ''
37
+ ),
38
+
39
+ array(
40
+ 'title' => __( 'Page Logo Width', 'auxin-elements' ),
41
+ 'description' => __( 'Specifies the max width of logo image in pixels. Leave it blank to use the theme default value for this option.', 'auxin-elements' ),
42
+ 'id' => 'aux_custom_logo_width',
43
+ 'type' => 'text',
44
+ 'default' => '',
45
+ 'style_callback' => function( $value = null ){
46
+ // Get the dependency value while saving the metafield
47
+ $enabled = isset( $_POST['aux_use_custom_logo'] ) ? $_POST['aux_use_custom_logo'] : 0;
48
+ if( ! auxin_is_true( $enabled ) ){
49
+ return '';
50
+ }
51
+ $value = trim( $value, 'px');
52
+ return $value ? ".aux-logo-header .aux-logo-anchor{ max-width:{$value}px; }" : '';
53
+ }
54
+ ),
55
+
56
+ );
57
+
58
+ return $model;
59
+ }
admin/includes/metaboxes/metabox-fields-general-header-template-settings.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Adds fields for header templates settings metabox
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author averta
9
+ * @link http://phlox.pro/
10
+ * @copyright (c) 2010-2020 averta
11
+ */
12
+
13
+ // no direct access allowed
14
+ if ( ! defined('ABSPATH') ) exit;
15
+
16
+
17
+ function auxin_metabox_fields_header_templates_settings(){
18
+
19
+ $model = new Auxin_Metabox_Model();
20
+ $model->id = 'header-templates-settings';
21
+ $model->title = __('Header Templates Settings', 'auxin-elements');
22
+ $model->fields = [
23
+ array(
24
+ 'title' => __( 'Enable Overlay Header', 'auxin-elements' ),
25
+ 'description' => __( 'Whether to set a overlay header for this page.', 'auxin-elements' ),
26
+ 'id' => 'page_overlay_header',
27
+ 'type' => 'select',
28
+ 'default' => 'default',
29
+ 'choices' => array(
30
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
31
+ 'yes' => __( 'Yes', 'auxin-elements' ),
32
+ 'no' => __( 'No', 'auxin-elements' ),
33
+ )
34
+ ),
35
+
36
+ array(
37
+ 'title' => __( 'Enable Sticky Header', 'auxin-elements' ),
38
+ 'description' => __( 'Whether to pin the header menu on top.', 'auxin-elements' ),
39
+ 'id' => 'page_header_top_sticky',
40
+ 'type' => 'select',
41
+ 'choices' => array (
42
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
43
+ 'yes' => __( 'Yes', 'auxin-elements' ),
44
+ 'no' => __( 'No', 'auxin-elements' ),
45
+ ),
46
+ ),
47
+
48
+ array(
49
+ 'title' => __( 'Sticky Header Height', 'auxin-elements' ),
50
+ 'description' => __( 'Specifies the sticky header height for this page. Leave it blank to use the theme default value for this option.', 'auxin-elements' ),
51
+ 'id' => 'page_header_container_scaled_height',
52
+ 'type' => 'text',
53
+ 'style_callback' => function( $value = null ){
54
+ $selector = ".aux-top-sticky .site-header-section.aux-sticky .aux-fill .aux-menu-depth-0 > .aux-item-content, ".
55
+ ".aux-top-sticky .site-header-section.aux-sticky .aux-header-elements { height:%spx; }";
56
+
57
+ return $value ? sprintf( $selector , $value ) : '';
58
+ },
59
+ 'dependency' => array(
60
+ array(
61
+ 'id' => 'page_header_top_sticky',
62
+ 'value' => array('yes'),
63
+ 'operator'=> '=='
64
+ ),
65
+ ),
66
+ 'default' => '',
67
+ ),
68
+ ];
69
+
70
+ return $model;
71
+ }
admin/includes/metaboxes/metabox-fields-general-header-template.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Adds fields for header templates metabox
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author averta
9
+ * @link http://phlox.pro/
10
+ * @copyright (c) 2010-2020 averta
11
+ */
12
+
13
+ // no direct access allowed
14
+ if ( ! defined('ABSPATH') ) exit;
15
+
16
+
17
+ function auxin_metabox_fields_header_templates(){
18
+
19
+ $model = new Auxin_Metabox_Model();
20
+ $model->id = 'header-templates';
21
+ $model->title = __('Header Templates', 'auxin-elements');
22
+ $model->fields = [];
23
+
24
+ if ( auxin_is_plugin_active( 'elementor/elementor.php' ) ) {
25
+
26
+ $model->fields[] = array(
27
+ 'title' => __( 'Current Header', THEME_DOMAIN ),
28
+ 'id' => 'page_elementor_header_edit_template',
29
+ 'type' => 'edit_template',
30
+ 'template' => 'header',
31
+ 'dependency' => array(
32
+ array(
33
+ 'id' => 'page_header_use_legacy',
34
+ 'value' => array( 'no' ),
35
+ 'operator'=> '!='
36
+ ),
37
+ ),
38
+ );
39
+
40
+
41
+ $templates_list = auxin_get_elementor_templates_list('header');
42
+ $templates_list[ auxin_get_option( 'site_elementor_header_template' ) . '-def'] = __( 'Theme Default', THEME_DOMAIN );
43
+
44
+ $model->fields[] = array(
45
+ 'title' => __( 'Your Headers', THEME_DOMAIN ),
46
+ 'id' => 'page_elementor_header_template',
47
+ 'type' => 'selective_list',
48
+ 'choices' => $templates_list,
49
+ 'dependency' => array(
50
+ array(
51
+ 'id' => 'page_header_use_legacy',
52
+ 'value' => array( 'no' ),
53
+ 'operator'=> '!='
54
+ ),
55
+ ),
56
+ 'related_controls' => ['page_elementor_header_edit_template']
57
+ );
58
+
59
+ } else {
60
+ $model->fields[] = array(
61
+ 'title' => __( 'Header Builder', THEME_DOMAIN ),
62
+ 'description' => __( 'Get header builder and templates by installing Elementor plugin.', THEME_DOMAIN ),
63
+ 'id' => 'page_header_install_elementor',
64
+ 'section' => 'header-section-builder',
65
+ 'type' => 'install_elementor_plugin',
66
+ );
67
+ }
68
+
69
+ $model->fields[] = array(
70
+ 'title' => __( 'Use Legacy Header', THEME_DOMAIN ),
71
+ 'description' => __( 'Enable it to replace header section with an Elementor template', THEME_DOMAIN ),
72
+ 'id' => 'page_header_use_legacy',
73
+ 'type' => 'select',
74
+ 'transport' => 'postMessage',
75
+ 'default' => 'default',
76
+ 'related_controls' => ['page_top_header_section_use_legacy', 'page_header_section_use_legacy'],
77
+ 'choices' => array(
78
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
79
+ 'yes' => __( 'Yes', 'auxin-elements' ),
80
+ 'no' => __( 'No', 'auxin-elements' ),
81
+ ),
82
+ );
83
+
84
+ return $model;
85
+ }
admin/includes/metaboxes/metabox-fields-general-header.php CHANGED
@@ -16,10 +16,26 @@ if ( ! defined('ABSPATH') ) exit;
16
 
17
  function auxin_metabox_fields_general_header(){
18
 
19
- $model = new Auxin_Metabox_Model();
20
- $model->id = 'general-header';
21
- $model->title = __('Header Setting', 'auxin-elements');
22
- $model->fields = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  array(
25
  'title' => __( 'Page Custom Menu', 'auxin-elements' ),
@@ -28,6 +44,13 @@ function auxin_metabox_fields_general_header(){
28
  'type' => 'select',
29
  'choices' => auxin_registered_nav_menus(),
30
  'default' => 'default',
 
 
 
 
 
 
 
31
  ),
32
 
33
  array(
@@ -36,6 +59,13 @@ function auxin_metabox_fields_general_header(){
36
  'id' => 'display_page_header_cover',
37
  'type' => 'switch',
38
  'default' => '0',
 
 
 
 
 
 
 
39
  ),
40
 
41
  array(
@@ -47,7 +77,12 @@ function auxin_metabox_fields_general_header(){
47
  array(
48
  'id' => 'display_page_header_cover',
49
  'value' => array('1'),
50
- )
 
 
 
 
 
51
  ),
52
  'default' => '',
53
  ),
@@ -61,7 +96,12 @@ function auxin_metabox_fields_general_header(){
61
  array(
62
  'id' => 'display_page_header_cover',
63
  'value' => array('1'),
64
- )
 
 
 
 
 
65
  ),
66
  'default' => '',
67
  ),
@@ -75,7 +115,12 @@ function auxin_metabox_fields_general_header(){
75
  array(
76
  'id' => 'display_page_header_cover',
77
  'value' => array('1'),
78
- )
 
 
 
 
 
79
  ),
80
  'default' => '',
81
  ),
@@ -84,7 +129,13 @@ function auxin_metabox_fields_general_header(){
84
  'title' => __( 'Header Menu Layout', 'auxin-elements' ),
85
  'description' => __( 'Specifies the header layout for this page. By choosing a layout, the corresponding options will appear below.', 'auxin-elements' ),
86
  'id' => 'page_header_navigation_layout',
87
- 'dependency' => array(),
 
 
 
 
 
 
88
  'default' => 'default',
89
  'type' => 'select',
90
  'transport' => 'refresh',
@@ -160,7 +211,12 @@ function auxin_metabox_fields_general_header(){
160
  array(
161
  'id' => 'page_header_navigation_layout',
162
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
163
- )
 
 
 
 
 
164
  ),
165
  'default' => 'default'
166
  ),
@@ -174,7 +230,12 @@ function auxin_metabox_fields_general_header(){
174
  array(
175
  'id' => 'page_header_navigation_layout',
176
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
177
- )
 
 
 
 
 
178
  ),
179
  'style_callback' => function( $value = null ){
180
  $value = rtrim( $value, 'px' );
@@ -197,7 +258,12 @@ function auxin_metabox_fields_general_header(){
197
  array(
198
  'id' => 'page_header_navigation_layout',
199
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
200
- )
 
 
 
 
 
201
  ),
202
  'default' => 'default',
203
  'choices' => array(
@@ -216,7 +282,12 @@ function auxin_metabox_fields_general_header(){
216
  array(
217
  'id' => 'page_header_navigation_layout',
218
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
219
- )
 
 
 
 
 
220
  ),
221
  'default' => 'default',
222
  'choices' => array(
@@ -235,7 +306,12 @@ function auxin_metabox_fields_general_header(){
235
  array(
236
  'id' => 'page_header_navigation_layout',
237
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
238
- )
 
 
 
 
 
239
  ),
240
  'default' => 'default',
241
  'choices' => array(
@@ -259,7 +335,12 @@ function auxin_metabox_fields_general_header(){
259
  array(
260
  'id' => 'page_header_navigation_layout',
261
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
262
- )
 
 
 
 
 
263
  ),
264
  'style_callback' => function( $value = null ){
265
  return $value ? ".site-header-section.aux-add-border .aux-wrapper{border-color:$value;}" : '';
@@ -276,7 +357,12 @@ function auxin_metabox_fields_general_header(){
276
  array(
277
  'id' => 'page_header_navigation_layout',
278
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
279
- )
 
 
 
 
 
280
  ),
281
  'default' => 'default',
282
  'choices' => array(
@@ -299,28 +385,14 @@ function auxin_metabox_fields_general_header(){
299
  array(
300
  'id' => 'page_header_navigation_layout',
301
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
302
- )
303
- ),
304
- 'default' => ''
305
- ),
306
-
307
- array(
308
- 'title' => __( 'Enable Overlay Header', 'auxin-elements' ),
309
- 'description' => __( 'Whether to set a overlay header for this page.', 'auxin-elements' ),
310
- 'id' => 'page_overlay_header',
311
- 'type' => 'select',
312
- 'dependency' => array(
313
  array(
314
- 'id' => 'page_header_navigation_layout',
315
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
316
- )
 
317
  ),
318
- 'default' => 'default',
319
- 'choices' => array(
320
- 'default' => __( 'Theme Default', 'auxin-elements' ),
321
- 'yes' => __( 'Yes', 'auxin-elements' ),
322
- 'no' => __( 'No', 'auxin-elements' ),
323
- )
324
  ),
325
 
326
  array(
@@ -332,10 +404,21 @@ function auxin_metabox_fields_general_header(){
332
  array(
333
  'id' => 'page_header_navigation_layout',
334
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
335
- )
 
 
 
 
 
336
  ),
337
  'style_callback' => function( $value = null ){
338
- return $value ? ".site-header-section { background-color:$value; }" : '';
 
 
 
 
 
 
339
  },
340
  'default' => ''
341
  ),
@@ -354,52 +437,14 @@ function auxin_metabox_fields_general_header(){
354
  array(
355
  'id' => 'page_header_navigation_layout',
356
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
357
- )
358
- ),
359
- 'default' => 'default'
360
- ),
361
-
362
- array(
363
- 'title' => __( 'Enable Sticky Header', 'auxin-elements' ),
364
- 'description' => __( 'Whether to pin the header menu on top.', 'auxin-elements' ),
365
- 'id' => 'page_header_top_sticky',
366
- 'type' => 'select',
367
- 'dependency' => array(
368
- array(
369
- 'id' => 'page_header_navigation_layout',
370
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
371
- )
372
- ),
373
- 'choices' => array (
374
- 'default' => __( 'Theme Default', 'auxin-elements' ),
375
- 'yes' => __( 'Yes', 'auxin-elements' ),
376
- 'no' => __( 'No', 'auxin-elements' ),
377
- ),
378
- ),
379
-
380
- array(
381
- 'title' => __( 'Sticky Header Height', 'auxin-elements' ),
382
- 'description' => __( 'Specifies the sticky header height for this page. Leave it blank to use the theme default value for this option.', 'auxin-elements' ),
383
- 'id' => 'page_header_container_scaled_height',
384
- 'type' => 'text',
385
- 'style_callback' => function( $value = null ){
386
- $selector = ".aux-top-sticky .site-header-section.aux-sticky .aux-fill .aux-menu-depth-0 > .aux-item-content, ".
387
- ".aux-top-sticky .site-header-section.aux-sticky .aux-header-elements { height:%spx; }";
388
-
389
- return $value ? sprintf( $selector , $value ) : '';
390
- },
391
- 'dependency' => array(
392
- array(
393
- 'id' => 'page_header_top_sticky',
394
- 'value' => array('yes', 'default'),
395
- 'operator'=> '=='
396
  ),
397
  array(
398
- 'id' => 'page_header_navigation_layout',
399
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left' ),
400
- )
 
401
  ),
402
- 'default' => '',
403
  ),
404
 
405
  array(
@@ -416,7 +461,12 @@ function auxin_metabox_fields_general_header(){
416
  array(
417
  'id' => 'page_header_navigation_layout',
418
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
419
- )
 
 
 
 
 
420
  ),
421
  'style_callback' => function( $value = null ){
422
  return $value ? ".site-header-section.aux-sticky { background-color:$value; }" : '';
@@ -438,7 +488,12 @@ function auxin_metabox_fields_general_header(){
438
  array(
439
  'id' => 'page_header_navigation_layout',
440
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
441
- )
 
 
 
 
 
442
  ),
443
  'style_callback' => function( $value = null ){
444
  return $value ? ".aux-top-sticky .site-header-section.aux-sticky .aux-wrapper{border-bottom: 1px solid $value;}" : '';
@@ -460,7 +515,12 @@ function auxin_metabox_fields_general_header(){
460
  array(
461
  'id' => 'page_header_navigation_layout',
462
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
463
- )
 
 
 
 
 
464
  ),
465
  'choices' => array (
466
  'default' => __( 'Theme Default', 'auxin-elements' ),
@@ -484,7 +544,12 @@ function auxin_metabox_fields_general_header(){
484
  array(
485
  'id' => 'page_header_navigation_layout',
486
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
487
- )
 
 
 
 
 
488
  ),
489
  'default' => 'default',
490
  'choices' => array(
@@ -505,7 +570,12 @@ function auxin_metabox_fields_general_header(){
505
  'id' => 'page_header_navigation_layout',
506
  'value' => 'vertical',
507
  'operator' => '=='
508
- )
 
 
 
 
 
509
  ),
510
  ),
511
 
@@ -518,7 +588,12 @@ function auxin_metabox_fields_general_header(){
518
  'id' => 'page_header_navigation_layout',
519
  'value' => 'vertical',
520
  'operator' => '=='
521
- )
 
 
 
 
 
522
  ),
523
  'choices' => array (
524
  'default' => __( 'Theme Default', 'auxin-elements' ),
@@ -539,7 +614,12 @@ function auxin_metabox_fields_general_header(){
539
  'id' => 'page_header_navigation_layout',
540
  'value' => 'vertical',
541
  'operator' => '=='
542
- )
 
 
 
 
 
543
  ),
544
  'default' => 'default',
545
  'choices' => array(
@@ -559,7 +639,12 @@ function auxin_metabox_fields_general_header(){
559
  'id' => 'page_header_navigation_layout',
560
  'value' => 'vertical',
561
  'operator' => '=='
562
- )
 
 
 
 
 
563
  ),
564
  'default' => 'default',
565
  'choices' => array(
@@ -578,7 +663,12 @@ function auxin_metabox_fields_general_header(){
578
  array(
579
  'id' => 'page_header_navigation_layout',
580
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
581
- )
 
 
 
 
 
582
  ),
583
  'default' => 'default',
584
  'choices' => array(
@@ -602,7 +692,12 @@ function auxin_metabox_fields_general_header(){
602
  'id' => 'page_header_social_icons',
603
  'value' => 'yes',
604
  'operator' => '=='
605
- )
 
 
 
 
 
606
  ),
607
  'default' => 'default',
608
  'choices' => array(
@@ -627,7 +722,12 @@ function auxin_metabox_fields_general_header(){
627
  array(
628
  'id' => 'page_header_navigation_layout',
629
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
630
- )
 
 
 
 
 
631
  ),
632
  'starter' => '1',
633
  'default' => 'default',
@@ -637,7 +737,33 @@ function auxin_metabox_fields_general_header(){
637
  'no' => __( 'No', 'auxin-elements' ),
638
  )
639
  );
640
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
641
  $model->fields[] = array(
642
  'title' => __( 'Icon for Cart', 'auxin-elements' ),
643
  'description' => '',
@@ -651,7 +777,12 @@ function auxin_metabox_fields_general_header(){
651
  array(
652
  'id' => 'page_show_header_cart',
653
  'value' => 'yes',
654
- )
 
 
 
 
 
655
  ),
656
  'default' => 'default'
657
  );
@@ -669,13 +800,19 @@ function auxin_metabox_fields_general_header(){
669
  array(
670
  'id' => 'page_show_header_cart',
671
  'value' => 'yes',
672
- )
 
 
 
 
 
673
  ),
674
  'choices' => array(
 
675
  'light' => __( 'Light', 'auxin-elements' ),
676
  'dark' => __( 'Dark', 'auxin-elements' )
677
  ),
678
- 'default' => 'light'
679
  );
680
 
681
  $model->fields[] = array(
@@ -691,7 +828,12 @@ function auxin_metabox_fields_general_header(){
691
  array(
692
  'id' => 'page_show_header_cart',
693
  'value' => 'yes',
694
- )
 
 
 
 
 
695
  ),
696
  'choices' => array(
697
  'default' => __( 'Default', 'auxin-elements' ),
@@ -710,7 +852,12 @@ function auxin_metabox_fields_general_header(){
710
  array(
711
  'id' => 'page_header_navigation_layout',
712
  'value' => array( 'logo-left-menu-middle' ),
713
- )
 
 
 
 
 
714
  ),
715
  'default' => 'default',
716
  'choices' => array(
@@ -729,7 +876,12 @@ function auxin_metabox_fields_general_header(){
729
  array(
730
  'id' => 'page_header_navigation_layout',
731
  'value' => array( 'logo-left-menu-middle' ),
732
- )
 
 
 
 
 
733
  ),
734
  'default' => 'default',
735
  'choices' => array(
@@ -741,82 +893,5 @@ function auxin_metabox_fields_general_header(){
741
 
742
  }
743
 
744
- $model->fields[] = array(
745
- 'title' => __('Custom Page Logo?', 'auxin-elements'),
746
- 'description' => __('Whether to display a custom logo for this page or not.', 'auxin-elements'),
747
- 'id' => 'aux_use_custom_logo',
748
- 'type' => 'switch',
749
- 'dependency' => array(
750
- array(
751
- 'id' => 'page_header_navigation_layout',
752
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
753
- )
754
- ),
755
- 'default' => '0'
756
- );
757
-
758
- $model->fields[] = array(
759
- 'title' => __( 'Page Logo', 'auxin-elements' ),
760
- 'description' => __( 'The main logo which appears only on this page. If you do not specify an image, the default logo will be used.', 'auxin-elements' ),
761
- 'id' => 'aux_custom_logo',
762
- 'type' => 'image',
763
- 'dependency' => array(
764
- array(
765
- 'id' => 'aux_use_custom_logo',
766
- 'value' => '1'
767
- ),
768
- array(
769
- 'id' => 'page_header_navigation_layout',
770
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
771
- )
772
- ),
773
- 'default' => ''
774
- );
775
-
776
- $model->fields[] = array(
777
- 'title' => __( 'Page Secondary Logo', 'auxin-elements' ),
778
- 'description' => __( 'The secondary logo which appears when the header becomes sticky. If you do not specify an image, the default secondary logo will be used.', 'auxin-elements' ),
779
- 'id' => 'aux_custom_logo2',
780
- 'type' => 'image',
781
- 'dependency' => array(
782
- array(
783
- 'id' => 'aux_use_custom_logo',
784
- 'value' => '1'
785
- ),
786
- array(
787
- 'id' => 'page_header_navigation_layout',
788
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
789
- )
790
- ),
791
- 'default' => ''
792
- );
793
-
794
- $model->fields[] = array(
795
- 'title' => __( 'Page Logo Width', 'auxin-elements' ),
796
- 'description' => __( 'Specifies the max width of logo image in pixels. Leave it blank to use the theme default value for this option.', 'auxin-elements' ),
797
- 'id' => 'aux_custom_logo_width',
798
- 'type' => 'text',
799
- 'dependency' => array(
800
- array(
801
- 'id' => 'aux_use_custom_logo',
802
- 'value' => '1'
803
- ),
804
- array(
805
- 'id' => 'page_header_navigation_layout',
806
- 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
807
- )
808
- ),
809
- 'default' => '',
810
- 'style_callback' => function( $value = null ){
811
- // Get the dependency value while saving the metafield
812
- $enabled = isset( $_POST['aux_use_custom_logo'] ) ? $_POST['aux_use_custom_logo'] : 0;
813
- if( ! auxin_is_true( $enabled ) ){
814
- return '';
815
- }
816
- $value = trim( $value, 'px');
817
- return $value ? ".aux-logo-header .aux-logo-anchor{ max-width:{$value}px; }" : '';
818
- }
819
- );
820
-
821
  return $model;
822
  }
16
 
17
  function auxin_metabox_fields_general_header(){
18
 
19
+ $model = new Auxin_Metabox_Model();
20
+ $model->id = 'general-header';
21
+ $model->title = __('Header', 'auxin-elements');
22
+ $model->is_deprecated = true;
23
+ $model->fields = array(
24
+
25
+ array(
26
+ 'title' => __( 'Use Legacy Header', THEME_DOMAIN ),
27
+ 'description' => __( 'Enable it to replace header section with an Elementor template', THEME_DOMAIN ),
28
+ 'id' => 'page_header_section_use_legacy',
29
+ 'type' => 'select',
30
+ 'transport' => 'postMessage',
31
+ 'default' => 'default',
32
+ 'related_controls' => ['page_header_use_legacy'],
33
+ 'choices' => array(
34
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
35
+ 'yes' => __( 'Yes', 'auxin-elements' ),
36
+ 'no' => __( 'No', 'auxin-elements' ),
37
+ ),
38
+ ),
39
 
40
  array(
41
  'title' => __( 'Page Custom Menu', 'auxin-elements' ),
44
  'type' => 'select',
45
  'choices' => auxin_registered_nav_menus(),
46
  'default' => 'default',
47
+ 'dependency' => array(
48
+ array(
49
+ 'id' => 'page_header_section_use_legacy',
50
+ 'value' => array( 'yes' ),
51
+ 'operator'=> '!='
52
+ ),
53
+ ),
54
  ),
55
 
56
  array(
59
  'id' => 'display_page_header_cover',
60
  'type' => 'switch',
61
  'default' => '0',
62
+ 'dependency' => array(
63
+ array(
64
+ 'id' => 'page_header_section_use_legacy',
65
+ 'value' => array( 'yes' ),
66
+ 'operator'=> '!='
67
+ ),
68
+ ),
69
  ),
70
 
71
  array(
77
  array(
78
  'id' => 'display_page_header_cover',
79
  'value' => array('1'),
80
+ ),
81
+ array(
82
+ 'id' => 'page_header_section_use_legacy',
83
+ 'value' => array( 'yes' ),
84
+ 'operator'=> '!='
85
+ ),
86
  ),
87
  'default' => '',
88
  ),
96
  array(
97
  'id' => 'display_page_header_cover',
98
  'value' => array('1'),
99
+ ),
100
+ array(
101
+ 'id' => 'page_header_section_use_legacy',
102
+ 'value' => array( 'yes' ),
103
+ 'operator'=> '!='
104
+ ),
105
  ),
106
  'default' => '',
107
  ),
115
  array(
116
  'id' => 'display_page_header_cover',
117
  'value' => array('1'),
118
+ ),
119
+ array(
120
+ 'id' => 'page_header_section_use_legacy',
121
+ 'value' => array( 'yes' ),
122
+ 'operator'=> '!='
123
+ ),
124
  ),
125
  'default' => '',
126
  ),
129
  'title' => __( 'Header Menu Layout', 'auxin-elements' ),
130
  'description' => __( 'Specifies the header layout for this page. By choosing a layout, the corresponding options will appear below.', 'auxin-elements' ),
131
  'id' => 'page_header_navigation_layout',
132
+ 'dependency' => array(
133
+ array(
134
+ 'id' => 'page_header_section_use_legacy',
135
+ 'value' => array( 'yes' ),
136
+ 'operator'=> '!='
137
+ ),
138
+ ),
139
  'default' => 'default',
140
  'type' => 'select',
141
  'transport' => 'refresh',
211
  array(
212
  'id' => 'page_header_navigation_layout',
213
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
214
+ ),
215
+ array(
216
+ 'id' => 'page_header_section_use_legacy',
217
+ 'value' => array( 'yes' ),
218
+ 'operator'=> '!='
219
+ ),
220
  ),
221
  'default' => 'default'
222
  ),
230
  array(
231
  'id' => 'page_header_navigation_layout',
232
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
233
+ ),
234
+ array(
235
+ 'id' => 'page_header_section_use_legacy',
236
+ 'value' => array( 'yes' ),
237
+ 'operator'=> '!='
238
+ ),
239
  ),
240
  'style_callback' => function( $value = null ){
241
  $value = rtrim( $value, 'px' );
258
  array(
259
  'id' => 'page_header_navigation_layout',
260
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
261
+ ),
262
+ array(
263
+ 'id' => 'page_header_section_use_legacy',
264
+ 'value' => array( 'yes' ),
265
+ 'operator'=> '!='
266
+ ),
267
  ),
268
  'default' => 'default',
269
  'choices' => array(
282
  array(
283
  'id' => 'page_header_navigation_layout',
284
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
285
+ ),
286
+ array(
287
+ 'id' => 'page_header_section_use_legacy',
288
+ 'value' => array( 'yes' ),
289
+ 'operator'=> '!='
290
+ ),
291
  ),
292
  'default' => 'default',
293
  'choices' => array(
306
  array(
307
  'id' => 'page_header_navigation_layout',
308
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
309
+ ),
310
+ array(
311
+ 'id' => 'page_header_section_use_legacy',
312
+ 'value' => array( 'yes' ),
313
+ 'operator'=> '!='
314
+ ),
315
  ),
316
  'default' => 'default',
317
  'choices' => array(
335
  array(
336
  'id' => 'page_header_navigation_layout',
337
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
338
+ ),
339
+ array(
340
+ 'id' => 'page_header_section_use_legacy',
341
+ 'value' => array( 'yes' ),
342
+ 'operator'=> '!='
343
+ ),
344
  ),
345
  'style_callback' => function( $value = null ){
346
  return $value ? ".site-header-section.aux-add-border .aux-wrapper{border-color:$value;}" : '';
357
  array(
358
  'id' => 'page_header_navigation_layout',
359
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
360
+ ),
361
+ array(
362
+ 'id' => 'page_header_section_use_legacy',
363
+ 'value' => array( 'yes' ),
364
+ 'operator'=> '!='
365
+ ),
366
  ),
367
  'default' => 'default',
368
  'choices' => array(
385
  array(
386
  'id' => 'page_header_navigation_layout',
387
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
388
+ ),
 
 
 
 
 
 
 
 
 
 
389
  array(
390
+ 'id' => 'page_header_section_use_legacy',
391
+ 'value' => array( 'yes' ),
392
+ 'operator'=> '!='
393
+ ),
394
  ),
395
+ 'default' => ''
 
 
 
 
 
396
  ),
397
 
398
  array(
404
  array(
405
  'id' => 'page_header_navigation_layout',
406
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
407
+ ),
408
+ array(
409
+ 'id' => 'page_header_section_use_legacy',
410
+ 'value' => array( 'yes' ),
411
+ 'operator'=> '!='
412
+ ),
413
  ),
414
  'style_callback' => function( $value = null ){
415
+
416
+ if ( 'default' !== auxin_get_post_meta( $post, 'page_header_navigation_layout', 'default' ) ) {
417
+ return $value ? ".site-header-section { background-color:$value; }" : '';
418
+ } else {
419
+ return '';
420
+ }
421
+
422
  },
423
  'default' => ''
424
  ),
437
  array(
438
  'id' => 'page_header_navigation_layout',
439
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  ),
441
  array(
442
+ 'id' => 'page_header_section_use_legacy',
443
+ 'value' => array( 'yes' ),
444
+ 'operator'=> '!='
445
+ ),
446
  ),
447
+ 'default' => 'default'
448
  ),
449
 
450
  array(
461
  array(
462
  'id' => 'page_header_navigation_layout',
463
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
464
+ ),
465
+ array(
466
+ 'id' => 'page_header_section_use_legacy',
467
+ 'value' => array( 'yes' ),
468
+ 'operator'=> '!='
469
+ ),
470
  ),
471
  'style_callback' => function( $value = null ){
472
  return $value ? ".site-header-section.aux-sticky { background-color:$value; }" : '';
488
  array(
489
  'id' => 'page_header_navigation_layout',
490
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
491
+ ),
492
+ array(
493
+ 'id' => 'page_header_section_use_legacy',
494
+ 'value' => array( 'yes' ),
495
+ 'operator'=> '!='
496
+ ),
497
  ),
498
  'style_callback' => function( $value = null ){
499
  return $value ? ".aux-top-sticky .site-header-section.aux-sticky .aux-wrapper{border-bottom: 1px solid $value;}" : '';
515
  array(
516
  'id' => 'page_header_navigation_layout',
517
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
518
+ ),
519
+ array(
520
+ 'id' => 'page_header_section_use_legacy',
521
+ 'value' => array( 'yes' ),
522
+ 'operator'=> '!='
523
+ ),
524
  ),
525
  'choices' => array (
526
  'default' => __( 'Theme Default', 'auxin-elements' ),
544
  array(
545
  'id' => 'page_header_navigation_layout',
546
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
547
+ ),
548
+ array(
549
+ 'id' => 'page_header_section_use_legacy',
550
+ 'value' => array( 'yes' ),
551
+ 'operator'=> '!='
552
+ ),
553
  ),
554
  'default' => 'default',
555
  'choices' => array(
570
  'id' => 'page_header_navigation_layout',
571
  'value' => 'vertical',
572
  'operator' => '=='
573
+ ),
574
+ array(
575
+ 'id' => 'page_header_section_use_legacy',
576
+ 'value' => array( 'yes' ),
577
+ 'operator'=> '!='
578
+ ),
579
  ),
580
  ),
581
 
588
  'id' => 'page_header_navigation_layout',
589
  'value' => 'vertical',
590
  'operator' => '=='
591
+ ),
592
+ array(
593
+ 'id' => 'page_header_section_use_legacy',
594
+ 'value' => array( 'yes' ),
595
+ 'operator'=> '!='
596
+ ),
597
  ),
598
  'choices' => array (
599
  'default' => __( 'Theme Default', 'auxin-elements' ),
614
  'id' => 'page_header_navigation_layout',
615
  'value' => 'vertical',
616
  'operator' => '=='
617
+ ),
618
+ array(
619
+ 'id' => 'page_header_section_use_legacy',
620
+ 'value' => array( 'yes' ),
621
+ 'operator'=> '!='
622
+ ),
623
  ),
624
  'default' => 'default',
625
  'choices' => array(
639
  'id' => 'page_header_navigation_layout',
640
  'value' => 'vertical',
641
  'operator' => '=='
642
+ ),
643
+ array(
644
+ 'id' => 'page_header_section_use_legacy',
645
+ 'value' => array( 'yes' ),
646
+ 'operator'=> '!='
647
+ ),
648
  ),
649
  'default' => 'default',
650
  'choices' => array(
663
  array(
664
  'id' => 'page_header_navigation_layout',
665
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
666
+ ),
667
+ array(
668
+ 'id' => 'page_header_section_use_legacy',
669
+ 'value' => array( 'yes' ),
670
+ 'operator'=> '!='
671
+ ),
672
  ),
673
  'default' => 'default',
674
  'choices' => array(
692
  'id' => 'page_header_social_icons',
693
  'value' => 'yes',
694
  'operator' => '=='
695
+ ),
696
+ array(
697
+ 'id' => 'page_header_section_use_legacy',
698
+ 'value' => array( 'yes' ),
699
+ 'operator'=> '!='
700
+ ),
701
  ),
702
  'default' => 'default',
703
  'choices' => array(
722
  array(
723
  'id' => 'page_header_navigation_layout',
724
  'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
725
+ ),
726
+ array(
727
+ 'id' => 'page_header_section_use_legacy',
728
+ 'value' => array( 'yes' ),
729
+ 'operator'=> '!='
730
+ ),
731
  ),
732
  'starter' => '1',
733
  'default' => 'default',
737
  'no' => __( 'No', 'auxin-elements' ),
738
  )
739
  );
740
+ $model->fields[] = array(
741
+ 'title' => __( 'Cart Type', 'auxin-elements' ),
742
+ 'description' => '',
743
+ 'id' => 'page_header_cart_mode',
744
+ 'type' => 'select',
745
+ 'dependency' => array(
746
+ array(
747
+ 'id' => 'page_header_navigation_layout',
748
+ 'value' => array( 'horizontal-menu-right', 'burger-right', 'horizontal-menu-left', 'burger-left', 'horizontal-menu-center', 'logo-left-menu-bottom-left','logo-left-menu-middle' ),
749
+ ),
750
+ array(
751
+ 'id' => 'page_show_header_cart',
752
+ 'value' => 'yes',
753
+ ),
754
+ array(
755
+ 'id' => 'page_header_section_use_legacy',
756
+ 'value' => array( 'yes' ),
757
+ 'operator'=> '!='
758
+ ),
759
+ ),
760
+ 'choices' => array(
761
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
762
+ 'dropdown' => __( 'Drop Down', 'auxin-elements' ),
763
+ 'offcanvas' => __( 'Off Canvas', 'auxin-elements' )
764
+ ),
765
+ 'default' => 'default'
766
+ );
767
  $model->fields[] = array(
768
  'title' => __( 'Icon for Cart', 'auxin-elements' ),
769
  'description' => '',
777
  array(
778
  'id' => 'page_show_header_cart',
779
  'value' => 'yes',
780
+ ),
781
+ array(
782
+ 'id' => 'page_header_section_use_legacy',
783
+ 'value' => array( 'yes' ),
784
+ 'operator'=> '!='
785
+ ),
786
  ),
787
  'default' => 'default'
788
  );
800
  array(
801
  'id' => 'page_show_header_cart',
802
  'value' => 'yes',
803
+ ),
804
+ array(
805
+ 'id' => 'page_header_section_use_legacy',
806
+ 'value' => array( 'yes' ),
807
+ 'operator'=> '!='
808
+ ),
809
  ),
810
  'choices' => array(
811
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
812
  'light' => __( 'Light', 'auxin-elements' ),
813
  'dark' => __( 'Dark', 'auxin-elements' )
814
  ),
815
+ 'default' => 'default'
816
  );
817
 
818
  $model->fields[] = array(
828
  array(
829
  'id' => 'page_show_header_cart',
830
  'value' => 'yes',
831
+ ),
832
+ array(
833
+ 'id' => 'page_header_section_use_legacy',
834
+ 'value' => array( 'yes' ),
835
+ 'operator'=> '!='
836
+ ),
837
  ),
838
  'choices' => array(
839
  'default' => __( 'Default', 'auxin-elements' ),
852
  array(
853
  'id' => 'page_header_navigation_layout',
854
  'value' => array( 'logo-left-menu-middle' ),
855
+ ),
856
+ array(
857
+ 'id' => 'page_header_section_use_legacy',
858
+ 'value' => array( 'yes' ),
859
+ 'operator'=> '!='
860
+ ),
861
  ),
862
  'default' => 'default',
863
  'choices' => array(
876
  array(
877
  'id' => 'page_header_navigation_layout',
878
  'value' => array( 'logo-left-menu-middle' ),
879
+ ),
880
+ array(
881
+ 'id' => 'page_header_section_use_legacy',
882
+ 'value' => array( 'yes' ),
883
+ 'operator'=> '!='
884
+ ),
885
  ),
886
  'default' => 'default',
887
  'choices' => array(
893
 
894
  }
895
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
896
  return $model;
897
  }
admin/includes/metaboxes/metabox-fields-general-top-header.php CHANGED
@@ -16,11 +16,27 @@ if ( ! defined('ABSPATH') ) exit;
16
 
17
  function auxin_metabox_fields_general_top_header(){
18
 
19
- $model = new Auxin_Metabox_Model();
20
- $model->id = 'general-top-header';
21
- $model->title = __('Top Header Setting', 'auxin-elements');
 
22
  $model->fields = array(
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  array(
25
  'title' => __( 'Display Top Header bar', 'auxin-elements' ),
26
  'description' => __( 'Whether to display top header bar on this page or not.', 'auxin-elements' ),
@@ -31,6 +47,13 @@ function auxin_metabox_fields_general_top_header(){
31
  'yes' => __( 'Yes', 'auxin-elements' ),
32
  'no' => __( 'No', 'auxin-elements' ),
33
  ),
 
 
 
 
 
 
 
34
  'type' => 'select'
35
  ),
36
 
@@ -44,7 +67,12 @@ function auxin_metabox_fields_general_top_header(){
44
  'id' => 'aux_show_topheader',
45
  'value' => array('yes'),
46
  'operator'=> ''
47
- )
 
 
 
 
 
48
  ),
49
  'choices' => array(
50
  'default' => array(
@@ -100,7 +128,12 @@ function auxin_metabox_fields_general_top_header(){
100
  'id' => 'aux_show_topheader',
101
  'value' => array('yes'),
102
  'operator'=> ''
103
- )
 
 
 
 
 
104
  ),
105
  'transport' => 'postMessage',
106
  'style_callback' => function( $value = null ){
@@ -120,7 +153,12 @@ function auxin_metabox_fields_general_top_header(){
120
  'id' => 'aux_show_topheader',
121
  'value' => array('yes'),
122
  'operator'=> ''
123
- )
 
 
 
 
 
124
  ),
125
  'choices' => array(
126
  'default' => __( 'Theme Default', 'auxin-elements' ),
@@ -145,7 +183,12 @@ function auxin_metabox_fields_general_top_header(){
145
  'id' => 'aux_topheader_layout',
146
  'value' => array('topheader9'),
147
  'operator'=> ''
148
- )
 
 
 
 
 
149
  ),
150
  'choices' => array(
151
  'default' => __( 'Theme Default', 'auxin-elements' ),
@@ -170,7 +213,12 @@ function auxin_metabox_fields_general_top_header(){
170
  'id' => 'aux_show_topheader_message',
171
  'value' => array('yes'),
172
  'operator'=> ''
173
- )
 
 
 
 
 
174
  ),
175
  'default' => '',
176
  'type' => 'textarea'
@@ -195,7 +243,12 @@ function auxin_metabox_fields_general_top_header(){
195
  'id' => 'aux_topheader_layout',
196
  'value' => array('topheader9'),
197
  'operator'=> ''
198
- )
 
 
 
 
 
199
  ),
200
  'default' => '',
201
  'type' => 'textarea'
16
 
17
  function auxin_metabox_fields_general_top_header(){
18
 
19
+ $model = new Auxin_Metabox_Model();
20
+ $model->id = 'general-top-header';
21
+ $model->title = __('Top Header', 'auxin-elements');
22
+ $model->is_deprecated = true;
23
  $model->fields = array(
24
 
25
+ array(
26
+ 'title' => __( 'Use Legacy Header', THEME_DOMAIN ),
27
+ 'description' => __( 'Enable it to replace header section with an Elementor template', THEME_DOMAIN ),
28
+ 'id' => 'page_top_header_section_use_legacy',
29
+ 'type' => 'select',
30
+ 'transport' => 'postMessage',
31
+ 'default' => 'default',
32
+ 'related_controls' => ['page_header_use_legacy'],
33
+ 'choices' => array(
34
+ 'default' => __( 'Theme Default', 'auxin-elements' ),
35
+ 'yes' => __( 'Yes', 'auxin-elements' ),
36
+ 'no' => __( 'No', 'auxin-elements' ),
37
+ ),
38
+ ),
39
+
40
  array(
41
  'title' => __( 'Display Top Header bar', 'auxin-elements' ),
42
  'description' => __( 'Whether to display top header bar on this page or not.', 'auxin-elements' ),
47
  'yes' => __( 'Yes', 'auxin-elements' ),
48
  'no' => __( 'No', 'auxin-elements' ),
49
  ),
50
+ 'dependency' => array(
51
+ array(
52
+ 'id' => 'page_top_header_section_use_legacy',
53
+ 'value' => array( 'yes' ),
54
+ 'operator'=> '!='
55
+ ),
56
+ ),
57
  'type' => 'select'
58
  ),
59
 
67
  'id' => 'aux_show_topheader',
68
  'value' => array('yes'),
69
  'operator'=> ''
70
+ ),
71
+ array(
72
+ 'id' => 'page_top_header_section_use_legacy',
73
+ 'value' => array( 'yes' ),
74
+ 'operator'=> '!='
75
+ ),
76
  ),
77
  'choices' => array(
78
  'default' => array(
128
  'id' => 'aux_show_topheader',
129
  'value' => array('yes'),
130
  'operator'=> ''
131
+ ),
132
+ array(
133
+ 'id' => 'page_top_header_section_use_legacy',
134
+ 'value' => array( 'yes' ),
135
+ 'operator'=> '!='
136
+ ),
137
  ),
138
  'transport' => 'postMessage',
139
  'style_callback' => function( $value = null ){
153
  'id' => 'aux_show_topheader',
154
  'value' => array('yes'),
155
  'operator'=> ''
156
+ ),
157
+ array(
158
+ 'id' => 'page_top_header_section_use_legacy',
159
+ 'value' => array( 'yes' ),
160
+ 'operator'=> '!='
161
+ ),
162
  ),
163
  'choices' => array(
164
  'default' => __( 'Theme Default', 'auxin-elements' ),
183
  'id' => 'aux_topheader_layout',
184
  'value' => array('topheader9'),
185
  'operator'=> ''
186
+ ),
187
+ array(
188
+ 'id' => 'page_top_header_section_use_legacy',
189
+ 'value' => array( 'yes' ),
190
+ 'operator'=> '!='
191
+ ),
192
  ),
193
  'choices' => array(
194
  'default' => __( 'Theme Default', 'auxin-elements' ),
213
  'id' => 'aux_show_topheader_message',
214
  'value' => array('yes'),
215
  'operator'=> ''
216
+ ),
217
+ array(
218
+ 'id' => 'page_top_header_section_use_legacy',
219
+ 'value' => array( 'yes' ),
220
+ 'operator'=> '!='
221
+ ),
222
  ),
223
  'default' => '',
224
  'type' => 'textarea'
243
  'id' => 'aux_topheader_layout',
244
  'value' => array('topheader9'),
245
  'operator'=> ''
246
+ ),
247
+ array(
248
+ 'id' => 'page_top_header_section_use_legacy',
249
+ 'value' => array( 'yes' ),
250
+ 'operator'=> '!='
251
+ ),
252
  ),
253
  'default' => '',
254
  'type' => 'textarea'
auxin-elements.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Exclusive and comprehensive plugin that extends the functionality of Phlox theme by adding new Elements, widgets and options.
15
- * Version: 2.4.19
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Exclusive and comprehensive plugin that extends the functionality of Phlox theme by adding new Elements, widgets and options.
15
+ * Version: 2.5.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
includes/classes/class-auxels-search-post-type.php ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Search Post Type Class.
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author averta
9
+ * @link http://phlox.pro/
10
+ * @copyright (c) 2010-2020 averta
11
+ */
12
+
13
+ // no direct access allowed
14
+ if ( ! defined('ABSPATH') ) {
15
+ die();
16
+ }
17
+
18
+ /**
19
+ * Class to handle searching post types
20
+ */
21
+ class Auxels_Search_Post_Type {
22
+
23
+ /**
24
+ * Search Phrase
25
+ *
26
+ * @var string
27
+ */
28
+ public $s;
29
+
30
+ /**
31
+ * Search category
32
+ *
33
+ * @var string
34
+ */
35
+ public $cat;
36
+
37
+ /**
38
+ * Search Post Type
39
+ *
40
+ * @var string
41
+ */
42
+ public $post_type;
43
+
44
+ /**
45
+ * Number of serach Items per page
46
+ *
47
+ * @var string
48
+ */
49
+ public $per_page;
50
+
51
+ /**
52
+ * Search query args
53
+ *
54
+ * @var array
55
+ */
56
+ public $query_args = array();
57
+
58
+ public $search_item_wrapper_start = "<div class='aux-search-item %s'>";
59
+ public $search_item_container_start = "<a href='%s' class='aux-item-container'>";
60
+ public $search_item_description_start = "<span class='aux-item-desc'>";
61
+ public $search_item_title_start = "<span class='aux-item-title'>";
62
+ public $search_item_details_start = "<span class='aux-item-details'>";
63
+
64
+ public $search_item_details_end = "</span>";
65
+ public $search_item_title_end = "</span>";
66
+ public $search_item_description_end = "</span>";
67
+ public $search_item_container_end = "</a>";
68
+ public $search_item_wrapper_end = "</div>";
69
+
70
+ /**
71
+ * __construct
72
+ */
73
+ function __construct( $search_phrase = '', $search_category = '', $search_post_type = '', $number_per_page = '' ) {
74
+
75
+ $this->s = $search_phrase;
76
+ $this->cat = $search_category;
77
+ $this->post_type = $search_post_type;
78
+ $this->per_page = $number_per_page;
79
+
80
+ $query_args = array (
81
+ 's' => $this->s,
82
+ 'post_type' => $this->post_type,
83
+ 'no_found_rows' => 1,
84
+ 'posts_per_page' => $this->per_page
85
+ );
86
+
87
+ // Get category slug for each post type
88
+
89
+ $categories_slug = auxin_general_post_types_category_slug();
90
+ if ( !empty( $this->cat ) ) {
91
+ $query_args['tax_query'] = array(
92
+ array(
93
+ 'taxonomy' => $categories_slug[$this->post_type],
94
+ 'field' => 'slug',
95
+ 'terms' => array( $this->cat )
96
+ )
97
+ );
98
+ }
99
+ $this->set_query_args($query_args);
100
+ }
101
+
102
+ /**
103
+ * Change Query Args - append or modify query args parameter
104
+ *
105
+ * @return void
106
+ */
107
+ public function set_query_args ($args = array()) {
108
+ if ( !empty( $args ) ) {
109
+ foreach ( $args as $key => $value ) {
110
+ $this->query_args[$key] = $value;
111
+ }
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Search Products Post type
117
+ *
118
+ * @return string
119
+ */
120
+ public function search_products() {
121
+
122
+ if ( !class_exists( 'WooCommerce' ) )
123
+ return;
124
+
125
+ $product_args = array( 'post_type' => 'product' );
126
+ $product_variation_args = array( 'post_type' => 'product_variation' );
127
+
128
+ // search all products
129
+ $search_products_for_name = $this->search();
130
+
131
+ // search all product variations
132
+ $this->set_query_args($product_variation_args);
133
+ $search_variations_for_name = $this->search();
134
+
135
+ $this->set_query_args($product_args);
136
+ // Search all product for sku meta fields
137
+ $sku_args = array(
138
+ 's' => '',
139
+ 'meta_query' => array(
140
+ array(
141
+ 'key' => '_sku',
142
+ 'value' => $this->s,
143
+ 'compare' => 'like',
144
+ ),
145
+ ),
146
+ 'suppress_filters' => 0,
147
+ );
148
+
149
+ $this->set_query_args( $sku_args );
150
+ $search_products_for_sku = $this->search();
151
+
152
+ // Search All Variations for sku meta field
153
+ $this->set_query_args($product_variation_args);
154
+ $search_variations_for_sku = $this->search();
155
+
156
+ //set search phrase query argument after searching for sku without search phrase
157
+ $this->set_query_args( array( 's' => $this->s ) );
158
+
159
+ // Merge All search results and remove the same results
160
+ $all_search_results = array_merge(
161
+ $search_products_for_sku->posts,
162
+ $search_variations_for_sku->posts,
163
+ $search_products_for_name->posts,
164
+ $search_variations_for_name->posts
165
+ );
166
+
167
+ $products_id = array();
168
+ foreach ($all_search_results as $key => $product) {
169
+ $id = $product->ID;
170
+ if ( in_array( $id, $products_id) ) {
171
+ unset( $all_search_results[$key] );
172
+ } else {
173
+ $products_id[] = $id;
174
+ }
175
+ }
176
+
177
+ // Generate output dom
178
+ if ( !empty( $all_search_results ) ) {
179
+ global $post;
180
+ foreach ( $all_search_results as $post ) {
181
+ setup_postdata( $post );
182
+ $product = wc_get_product( get_the_ID() );
183
+ $categories = get_the_terms( $product->get_id(), 'product_cat' );
184
+ $cat = $categories[0]->name;
185
+ $results[] = sprintf(
186
+ $this->search_item_wrapper_start.
187
+ $this->search_item_container_start.
188
+ '%s'.
189
+ $this->search_item_description_start.
190
+ $this->search_item_title_start.
191
+ '%s'.
192
+ $this->search_item_title_end.
193
+ $this->search_item_details_start.
194
+ '%s'.
195
+ $this->search_item_details_end.
196
+ '%s'.
197
+ $this->search_item_description_end.
198
+ $this->search_item_container_end.
199
+ $this->search_item_wrapper_end,
200
+ 'product',
201
+ get_permalink(),
202
+ ( ( has_post_thumbnail() ) ? woocommerce_get_product_thumbnail( 'shop_thumbnail' ) : '' ),
203
+ $product->get_title(),
204
+ $cat,
205
+ "<span class='aux-price'>".$product->get_price_html()."</span>"
206
+ );
207
+ }
208
+ unset($this->query_args['meta_query']);
209
+ unset($this->query_args['suppress_filters']);
210
+ wp_reset_postdata();
211
+ return implode( $results );
212
+ } else {
213
+ unset($this->query_args['meta_query']);
214
+ unset($this->query_args['suppress_filters']);
215
+ return;
216
+ }
217
+ }
218
+
219
+ /**
220
+ * Search General Post types
221
+ *
222
+ * @return string
223
+ */
224
+ public function search_general_post_types() {
225
+ $search_result = $this->search();
226
+ if ($search_result->have_posts()) {
227
+ global $post;
228
+ while($search_result->have_posts()) {
229
+ $search_result->the_post();
230
+ $results[] = sprintf(
231
+ $this->search_item_wrapper_start.
232
+ $this->search_item_container_start.
233
+ '<img src="%s">'.
234
+ $this->search_item_description_start.
235
+ $this->search_item_title_start.
236
+ '%s'.
237
+ $this->search_item_title_end.
238
+ $this->search_item_details_start.
239
+ '%s'.
240
+ $this->search_item_details_end.
241
+ $this->search_item_description_end.
242
+ $this->search_item_container_end.
243
+ $this->search_item_wrapper_end,
244
+ 'blog',
245
+ get_permalink(),
246
+ get_the_post_thumbnail_url(),
247
+ get_the_title(),
248
+ get_the_date()
249
+ );
250
+ }
251
+ wp_reset_postdata();
252
+ return implode( $results );
253
+ } else {
254
+ return;
255
+ }
256
+ }
257
+
258
+ /**
259
+ * Search Portfolio Post type
260
+ *
261
+ * @return string
262
+ */
263
+ public function search_portfolio() {
264
+ $search_result = $this->search();
265
+
266
+ if ( $search_result->have_posts() ) {
267
+ global $post;
268
+ while ( $search_result->have_posts() ) {
269
+ $search_result->the_post();
270
+ $results[] = sprintf(
271
+ $this->search_item_wrapper_start.
272
+ $this->search_item_container_start.
273
+ '<img src="%s">'.
274
+ $this->search_item_container_end.
275
+ $this->search_item_wrapper_end,
276
+ 'portfolio',
277
+ get_permalink(),
278
+ get_the_post_thumbnail_url()
279
+ );
280
+ }
281
+ wp_reset_postdata();
282
+ return implode( $results );
283
+ } else {
284
+ return;
285
+ }
286
+ }
287
+
288
+ /**
289
+ * Main Query Method
290
+ */
291
+ public function search() {
292
+ $search_result = new WP_Query( $this->query_args );
293
+ return $search_result;
294
+ }
295
+
296
+ }
includes/classes/class-auxin-demo-importer.php CHANGED
@@ -58,15 +58,15 @@ class Auxin_Demo_Importer {
58
  $page_template = isset( $_POST['tmpl'] ) ? $_POST['tmpl'] : '';
59
  $template_title = isset( $_POST['title'] ) ? $_POST['title'] : 'PHLOX #' . $template_ID;
60
  $template_status = isset( $_POST['status'] ) ? $_POST['status'] : 'import';
61
- $sanitize_key = sanitize_key( 'aux-template-' . $template_type . $template_ID );
62
 
63
- if( $template_status === 'copy' && false !== ( $data = auxin_get_transient( $sanitize_key ) ) ) {
64
  wp_send_json_success( array( 'status' => 'copy', 'result' => json_decode( $data , true ), 'label' => esc_html__( 'Import content', 'auxin-elements' ) ) );
65
  }
66
 
67
  ob_start();
68
 
69
- if( ( $template_status === 'create_my_template' || $template_status === 'create_new_page' ) && false !== ( $data = auxin_get_transient( $sanitize_key ) ) ){
70
  $post_type = $template_status === 'create_my_template' ? 'elementor_library' : 'page';
71
  $args = array(
72
  'post_title' => wp_strip_all_tags( $template_title ),
@@ -75,10 +75,13 @@ class Auxin_Demo_Importer {
75
  );
76
  $post_id = wp_insert_post( $args );
77
  if( ! is_wp_error( $post_id ) ){
 
78
  $json_content = json_decode( $data , true );
 
 
79
  update_post_meta( $post_id, '_elementor_edit_mode', 'builder' );
80
  update_post_meta( $post_id, '_elementor_data', $json_content['content'] );
81
- update_post_meta( $post_id, '_elementor_version', '0.4' );
82
 
83
  if( ! empty( $page_template ) ){
84
  update_post_meta( $post_id, '_wp_page_template', $page_template );
@@ -111,13 +114,12 @@ class Auxin_Demo_Importer {
111
  $data = false;
112
  }
113
  } else {
114
- $data = $this->parse( 'http://library.phlox.pro/templates/?id=' . $template_ID, 'data' );
115
- $data = $this->update_elementor_data( $data, 'upload' );
116
  }
117
 
118
  if( $data ) {
119
  // Set transient for 48h
120
- auxin_set_transient( $sanitize_key, $data, 48 * HOUR_IN_SECONDS );
121
  ?>
122
  <div class="clearfix">
123
  <img src="<?php echo esc_url( AUXELS_ADMIN_URL . '/assets/images/welcome/success.svg' ); ?>" />
@@ -155,6 +157,11 @@ class Auxin_Demo_Importer {
155
  wp_send_json_error( $this->error_template( $template_ID, $template_type ) );
156
  }
157
 
 
 
 
 
 
158
  public function error_template( $template_ID = '', $template_type = '' ){
159
  ob_start();
160
  ?>
@@ -162,7 +169,7 @@ class Auxin_Demo_Importer {
162
  <img src="<?php echo esc_url( AUXELS_ADMIN_URL . '/assets/images/welcome/failed.svg' ); ?>" />
163
  <h3><?php esc_html_e( 'Process failed!.', 'auxin-elements' ); ?></h3>
164
  <div class="aux-template-actions">
165
- <a href="<?php esc_url( add_query_arg( array( 'action' => 'aux_ajax_lightbox', 'type' => 'progress' , 'nonce' => wp_create_nonce( 'aux-open-lightbox' ) ), admin_url( 'admin-ajax.php' ) ) ); ?>"
166
  class="aux-button aux-primary aux-medium aux-open-modal aux-import-template"
167
  data-template-id="<?php echo esc_attr( $template_ID ); ?>"
168
  data-template-type="<?php echo esc_attr( $template_type ); ?>"
@@ -294,6 +301,8 @@ class Auxin_Demo_Importer {
294
  }
295
 
296
  }
 
 
297
  wp_send_json_success( array( 'step' => 'content', 'message' => __( 'Importing Options', 'auxin-elements' ), 'next' => 'auxin_options' ) );
298
 
299
  case 'auxin_options':
@@ -357,7 +366,8 @@ class Auxin_Demo_Importer {
357
  } else {
358
  $getLicense = get_site_option( THEME_ID . '_license' );
359
  $getLicense = empty( $getLicense ) ? get_site_option( AUXELS_PURCHASE_KEY ) : $getLicense;
360
- $getToken = 'Bearer ' . base64_encode( $getLicense['token'] );
 
361
  $request = wp_remote_post(
362
  $url,
363
  array(
@@ -425,6 +435,15 @@ class Auxin_Demo_Importer {
425
  // This line is for changing the old attachment ID with new one.
426
  $auxin_value = $this->get_attachment_id( 'auxin_import_id', $auxin_value );
427
  }
 
 
 
 
 
 
 
 
 
428
  // Update exclusive auxin options
429
  auxin_update_option( $auxin_key , maybe_unserialize( $auxin_value ) );
430
  }
@@ -463,27 +482,27 @@ class Auxin_Demo_Importer {
463
  }
464
 
465
  // @deprecated A temporary fix for an issue with elementor typography scheme
466
- $elementor_typo_scheme = [
467
- '1' => [
468
- 'font_family' => 'Arial',
469
- 'font_weight' => ''
470
- ],
471
- '2' => [
472
- 'font_family' => 'Arial',
473
- 'font_weight' => ''
474
- ],
475
- '3' => [
476
- 'font_family' => 'Tahoma',
477
- 'font_weight' => ''
478
- ],
479
- '4' => [
480
- 'font_family' => 'Tahoma',
481
- 'font_weight' => ''
482
- ]
483
- ];
484
- update_option( 'elementor_scheme_typography', $elementor_typo_scheme );
485
-
486
- set_theme_mod( 'elementor_page_typography_scheme', 0 );
487
 
488
  // Stores css content in custom css file
489
  auxin_save_custom_css();
@@ -516,7 +535,7 @@ class Auxin_Demo_Importer {
516
  preg_match_all( '/\s*"nav_menu"\s*:\s*(\d*)\s*/', $widgets_data_str, $matchs, PREG_SET_ORDER );
517
 
518
  foreach ( $matchs as $match ) {
519
- $new_menu_id = get_option( '_auxin_demo_menu_old_id_' . $match[1] );
520
  $new_widgets_data = str_replace( $match[1], $new_menu_id, $match[0] );
521
  $widgets_data_str = str_replace( $match[0], $new_widgets_data, $widgets_data_str );
522
  }
@@ -572,7 +591,7 @@ class Auxin_Demo_Importer {
572
  foreach ( $args as $menu_name => $menu_data ) {
573
 
574
  $menu_exists = wp_get_nav_menu_object( $menu_name );
575
- update_option( '_auxin_demo_menu_old_id_' . $menu_data['id'], $menu_exists );
576
 
577
  // If it doesn't exist, let's create it.
578
  if( ! $menu_exists ) {
@@ -580,7 +599,7 @@ class Auxin_Demo_Importer {
580
  $menu_id = wp_create_nav_menu( $menu_name );
581
  if( is_wp_error( $menu_id ) ) continue;
582
 
583
- update_option( '_auxin_demo_menu_old_id_' . $menu_data['id'], $menu_id );
584
  // Create menu items
585
  foreach ( $menu_data['items'] as $item_key => $item_value ) {
586
  //Keep 'menu-meta' in a variable
@@ -682,7 +701,8 @@ class Auxin_Demo_Importer {
682
  *
683
  * @return String
684
  */
685
- private function maybe_flush_post( $post_id ){
 
686
  if( class_exists( '\Elementor\Core\Files\CSS\Post' ) && get_post_meta( $post_id, '_elementor_version', true ) ){
687
  $post_css_file = new \Elementor\Core\Files\CSS\Post( $post_id );
688
  $post_css_file->update();
@@ -720,6 +740,13 @@ class Auxin_Demo_Importer {
720
  continue;
721
  }
722
 
 
 
 
 
 
 
 
723
  $post_id = wp_insert_post(
724
  array(
725
  'post_title' => sanitize_text_field( $post['post_title'] ),
@@ -736,6 +763,36 @@ class Auxin_Demo_Importer {
736
 
737
  if ( ! is_wp_error( $post_id ) ) {
738
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
  //Check post terms existence
740
  if ( ! empty( $post['post_terms'] ) ){
741
  // Start adding post terms
@@ -751,38 +808,58 @@ class Auxin_Demo_Importer {
751
 
752
  // If taxonomy not exists, then continue loop...
753
  if( ! taxonomy_exists( $tax ) ){
754
- continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
755
  }
756
-
757
  $add_these_terms = array();
758
 
759
  foreach ($term as $key => $value) {
760
-
761
- $term = term_exists( $key, $tax );
762
- $add_these_terms[] = intval($term['term_id']);
763
-
764
  // If the taxonomy doesn't exist, then we create it
765
- if ( ! $term ) {
766
 
767
  // Get parent term
768
  // $parent_term = $value != "0" ? get_term_by( 'name', $value, $tax ) : (object) array( 'term_id' => "0" );
769
  // $parent_term_ID = isset( $parent_term->term_id ) ? (int) $parent_term->term_id : 0 ;
770
  // $term_args = $parent_term_ID ? array( 'parent' => $parent_term_ID ) : array();
771
 
772
- $term = wp_insert_term(
773
  $key,
774
  $tax,
775
  array()
776
  );
777
- if ( is_wp_error( $term ) ) {
778
  continue;
779
  }
780
 
781
- auxin_set_transient( 'auxin_category_new_id_of' . $value, $term['term_id'] );
782
 
783
- $add_these_terms[] = intval($term['term_id']);
784
- }
785
 
 
786
  }
787
 
788
  // Add post terms
@@ -1623,6 +1700,31 @@ class Auxin_Demo_Importer {
1623
  }
1624
  }
1625
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1626
  return $meta;
1627
  }
1628
 
58
  $page_template = isset( $_POST['tmpl'] ) ? $_POST['tmpl'] : '';
59
  $template_title = isset( $_POST['title'] ) ? $_POST['title'] : 'PHLOX #' . $template_ID;
60
  $template_status = isset( $_POST['status'] ) ? $_POST['status'] : 'import';
61
+ $template_data_key = sanitize_key( "auxin_template_kit_{$template_type}_data_for_origin_id_{$template_ID}" );
62
 
63
+ if( $template_status === 'copy' && false !== ( $data = auxin_get_transient( $template_data_key ) ) ) {
64
  wp_send_json_success( array( 'status' => 'copy', 'result' => json_decode( $data , true ), 'label' => esc_html__( 'Import content', 'auxin-elements' ) ) );
65
  }
66
 
67
  ob_start();
68
 
69
+ if( ( $template_status === 'create_my_template' || $template_status === 'create_new_page' ) && false !== ( $data = auxin_get_transient( $template_data_key ) ) ){
70
  $post_type = $template_status === 'create_my_template' ? 'elementor_library' : 'page';
71
  $args = array(
72
  'post_title' => wp_strip_all_tags( $template_title ),
75
  );
76
  $post_id = wp_insert_post( $args );
77
  if( ! is_wp_error( $post_id ) ){
78
+
79
  $json_content = json_decode( $data , true );
80
+ $elementor_version = defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : '2.9.0';
81
+
82
  update_post_meta( $post_id, '_elementor_edit_mode', 'builder' );
83
  update_post_meta( $post_id, '_elementor_data', $json_content['content'] );
84
+ update_post_meta( $post_id, '_elementor_version', $elementor_version );
85
 
86
  if( ! empty( $page_template ) ){
87
  update_post_meta( $post_id, '_wp_page_template', $page_template );
114
  $data = false;
115
  }
116
  } else {
117
+ $data = $this->fetch_template_data( $template_ID );
 
118
  }
119
 
120
  if( $data ) {
121
  // Set transient for 48h
122
+ auxin_set_transient( $template_data_key, $data, WEEK_IN_SECONDS );
123
  ?>
124
  <div class="clearfix">
125
  <img src="<?php echo esc_url( AUXELS_ADMIN_URL . '/assets/images/welcome/success.svg' ); ?>" />
157
  wp_send_json_error( $this->error_template( $template_ID, $template_type ) );
158
  }
159
 
160
+ public function fetch_template_data( $template_ID ){
161
+ $data = $this->parse( 'http://library.phlox.pro/templates/?id='. $template_ID, 'data' );
162
+ return $this->update_elementor_data( $data, 'upload' );
163
+ }
164
+
165
  public function error_template( $template_ID = '', $template_type = '' ){
166
  ob_start();
167
  ?>
169
  <img src="<?php echo esc_url( AUXELS_ADMIN_URL . '/assets/images/welcome/failed.svg' ); ?>" />
170
  <h3><?php esc_html_e( 'Process failed!.', 'auxin-elements' ); ?></h3>
171
  <div class="aux-template-actions">
172
+ <a href="<?php esc_url( add_query_arg( array( 'action' => 'aux_ajax_lightbox', 'type' => 'progress' , 'nonce' => wp_create_nonce( 'aux-open-lightbox' ) ), admin_url( 'admin-ajax.php' ) ) ); ?>"
173
  class="aux-button aux-primary aux-medium aux-open-modal aux-import-template"
174
  data-template-id="<?php echo esc_attr( $template_ID ); ?>"
175
  data-template-type="<?php echo esc_attr( $template_type ); ?>"
301
  }
302
 
303
  }
304
+
305
+ auxin_delete_transient( 'aux-old-products-id-transformation' );
306
  wp_send_json_success( array( 'step' => 'content', 'message' => __( 'Importing Options', 'auxin-elements' ), 'next' => 'auxin_options' ) );
307
 
308
  case 'auxin_options':
366
  } else {
367
  $getLicense = get_site_option( THEME_ID . '_license' );
368
  $getLicense = empty( $getLicense ) ? get_site_option( AUXELS_PURCHASE_KEY ) : $getLicense;
369
+ $bearer = ! empty( $getLicense['token'] ) ? $getLicense['token'] : '';
370
+ $getToken = 'Bearer ' . $bearer;
371
  $request = wp_remote_post(
372
  $url,
373
  array(
435
  // This line is for changing the old attachment ID with new one.
436
  $auxin_value = $this->get_attachment_id( 'auxin_import_id', $auxin_value );
437
  }
438
+ // set old header template value to new header template option
439
+ if( $auxin_key == 'site_header_template' && ! is_numeric( $auxin_value ) ) {
440
+ $template = get_page_by_path( $auxin_value, OBJECT, 'elementor_library' );
441
+ if( $template instanceof WP_Post ){
442
+ auxin_update_option( 'site_elementor_header_edit_template', $template->ID );
443
+ auxin_update_option( 'site_elementor_header_template', $template->ID );
444
+ }
445
+ continue;
446
+ }
447
  // Update exclusive auxin options
448
  auxin_update_option( $auxin_key , maybe_unserialize( $auxin_value ) );
449
  }
482
  }
483
 
484
  // @deprecated A temporary fix for an issue with elementor typography scheme
485
+ // $elementor_typo_scheme = [
486
+ // '1' => [
487
+ // 'font_family' => 'Arial',
488
+ // 'font_weight' => ''
489
+ // ],
490
+ // '2' => [
491
+ // 'font_family' => 'Arial',
492
+ // 'font_weight' => ''
493
+ // ],
494
+ // '3' => [
495
+ // 'font_family' => 'Tahoma',
496
+ // 'font_weight' => ''
497
+ // ],
498
+ // '4' => [
499
+ // 'font_family' => 'Tahoma',
500
+ // 'font_weight' => ''
501
+ // ]
502
+ // ];
503
+ // update_option( 'elementor_scheme_typography', $elementor_typo_scheme );
504
+
505
+ // set_theme_mod( 'elementor_page_typography_scheme', 0 );
506
 
507
  // Stores css content in custom css file
508
  auxin_save_custom_css();
535
  preg_match_all( '/\s*"nav_menu"\s*:\s*(\d*)\s*/', $widgets_data_str, $matchs, PREG_SET_ORDER );
536
 
537
  foreach ( $matchs as $match ) {
538
+ $new_menu_id = get_option( 'auxin_demo_importer_menu_origin_id_' . $match[1] );
539
  $new_widgets_data = str_replace( $match[1], $new_menu_id, $match[0] );
540
  $widgets_data_str = str_replace( $match[0], $new_widgets_data, $widgets_data_str );
541
  }
591
  foreach ( $args as $menu_name => $menu_data ) {
592
 
593
  $menu_exists = wp_get_nav_menu_object( $menu_name );
594
+ update_option( 'auxin_demo_importer_menu_origin_id_' . $menu_data['id'], $menu_exists );
595
 
596
  // If it doesn't exist, let's create it.
597
  if( ! $menu_exists ) {
599
  $menu_id = wp_create_nav_menu( $menu_name );
600
  if( is_wp_error( $menu_id ) ) continue;
601
 
602
+ update_option( 'auxin_demo_importer_menu_origin_id_' . $menu_data['id'], $menu_id );
603
  // Create menu items
604
  foreach ( $menu_data['items'] as $item_key => $item_value ) {
605
  //Keep 'menu-meta' in a variable
701
  *
702
  * @return String
703
  */
704
+ public function maybe_flush_post( $post_id ){
705
+
706
  if( class_exists( '\Elementor\Core\Files\CSS\Post' ) && get_post_meta( $post_id, '_elementor_version', true ) ){
707
  $post_css_file = new \Elementor\Core\Files\CSS\Post( $post_id );
708
  $post_css_file->update();
740
  continue;
741
  }
742
 
743
+ // If post type is product_vaiation check that if parent product imported or not
744
+ // If imported then change parent product id to the imported product id
745
+ if ( $post['post_type'] == 'product_variation' ) {
746
+ $stored_products_id = maybe_unserialize( auxin_get_transient( 'aux-old-products-id-transformation' ) );
747
+ $post['post_parent'] = ( ! $stored_products_id || ! array_key_exists( $post['post_parent'], $stored_products_id ) ) ? $post['post_parent'] : $stored_products_id[$post['post_parent']];
748
+ }
749
+
750
  $post_id = wp_insert_post(
751
  array(
752
  'post_title' => sanitize_text_field( $post['post_title'] ),
763
 
764
  if ( ! is_wp_error( $post_id ) ) {
765
 
766
+ // 1. If post type equals product Search all product variations with post parent id of this product id
767
+ // and change the parent id to this new $post_id
768
+ // 2. Save the new product id to database
769
+ if ( $post['post_type'] == 'product' ) {
770
+
771
+ $all_product_variations = get_posts(
772
+ array(
773
+ 'post_type' => 'product_variations',
774
+ 'posts_per_page'=> -1,
775
+ 'post_parent' => $post['ID']
776
+ )
777
+ );
778
+
779
+ if ($all_product_variations) {
780
+ foreach ($all_product_variations as $post ) {
781
+ wp_update_post(
782
+ array(
783
+ 'ID' => $post->ID,
784
+ 'post_parent' => $post_id
785
+ )
786
+ );
787
+ }
788
+ }
789
+
790
+ // Store product ids recieved from server and it's new id
791
+ $stored_products_id = maybe_unserialize( auxin_get_transient( 'aux-old-products-id-transformation' ) );
792
+ $stored_products_id[$post['ID']] = $post_id;
793
+ auxin_set_transient( 'aux-old-products-id-transformation', maybe_serialize($stored_products_id), 48 * HOUR_IN_SECONDS );
794
+ }
795
+
796
  //Check post terms existence
797
  if ( ! empty( $post['post_terms'] ) ){
798
  // Start adding post terms
808
 
809
  // If taxonomy not exists, then continue loop...
810
  if( ! taxonomy_exists( $tax ) ){
811
+ // check if post type is product and has product attribute import it otherwise continue the loop
812
+ if ( $post['post_type'] == 'product' || $post['post_type'] == 'product_variation' ) {
813
+ if ( strpos( $tax, 'pa_' ) == '0' && class_exists( 'WooCommerce' ) ) {
814
+ $tax_name = str_replace('pa_','',$tax);
815
+ $data = array(
816
+ 'name' => $tax_name,
817
+ 'slug' => $tax_name,
818
+ 'type' => 'select',
819
+ 'orderby' => 'menu_order',
820
+ 'has_archive' => 0, // Enable archives ==> true (or 1)
821
+ );
822
+ $term_id = wc_create_attribute($data);
823
+ if ( is_wp_error( $term_id ) ) {
824
+ error_log($term_id->get_error_message(),0);
825
+ }
826
+ register_taxonomy( $tax, 'product', array() );
827
+ } else {
828
+ continue;
829
+ }
830
+ } else {
831
+ continue;
832
+ }
833
  }
 
834
  $add_these_terms = array();
835
 
836
  foreach ($term as $key => $value) {
837
+
838
+ $key = is_numeric( $key ) ? (string) $key : $key;
839
+ $term_obj = term_exists( $key, $tax );
840
+
841
  // If the taxonomy doesn't exist, then we create it
842
+ if ( ! $term_obj ) {
843
 
844
  // Get parent term
845
  // $parent_term = $value != "0" ? get_term_by( 'name', $value, $tax ) : (object) array( 'term_id' => "0" );
846
  // $parent_term_ID = isset( $parent_term->term_id ) ? (int) $parent_term->term_id : 0 ;
847
  // $term_args = $parent_term_ID ? array( 'parent' => $parent_term_ID ) : array();
848
 
849
+ $term_obj = wp_insert_term(
850
  $key,
851
  $tax,
852
  array()
853
  );
854
+ if ( is_wp_error( $term_obj ) ) {
855
  continue;
856
  }
857
 
858
+ auxin_set_transient( 'auxin_category_new_id_of' . $value, $term_obj['term_id'] );
859
 
860
+ }
 
861
 
862
+ $add_these_terms[] = intval($term_obj['term_id']);
863
  }
864
 
865
  // Add post terms
1700
  }
1701
  }
1702
 
1703
+ // Change structure of urls included in custom css
1704
+ preg_match_all( '/"custom_css":".+?(?<!\\ )"/', $meta, $custom_css, PREG_SET_ORDER );
1705
+ if ( ! empty( $custom_css ) ) {
1706
+ foreach ( $custom_css as $key => $css ) {
1707
+ $new_css = preg_replace( "#[\\\/|\w|:]*\\\/wp-content#", '\/wp-content', $css[0] );
1708
+ $new_css = preg_replace( "#sites\\\/\d*\\\/#", '', $new_css );
1709
+ $meta = str_replace( $css[0], $new_css, $meta );
1710
+ }
1711
+ }
1712
+
1713
+ // Change absolute and relative urls to Site Url
1714
+ $site_url = str_replace( '/', '\/', trailingslashit( get_site_url() ) );
1715
+ preg_match_all( '#https:\\\\\/\\\\\/demo\.phlox\.pro\\\\.+?(?=(wp-content|\/))#', $meta, $phlox_urls, PREG_SET_ORDER );
1716
+ if ( ! empty( $phlox_urls ) ) {
1717
+ foreach( $phlox_urls as $key => $url ){
1718
+ $meta = str_replace( $url[0], $site_url, $meta);
1719
+ }
1720
+ }
1721
+
1722
+ preg_match_all( '#\\"url\\":\\"\\\\\/.[a-z,0-9]*\\\\\/#', $meta, $relative_urls, PREG_SET_ORDER );
1723
+ if ( ! empty( $relative_urls ) ) {
1724
+ foreach($relative_urls as $key => $url) {
1725
+ $meta = str_replace( $url[0], '"url":"'.$site_url, $meta );
1726
+ }
1727
+ }
1728
  return $meta;
1729
  }
1730
 
includes/classes/class-auxin-welcome-sections.php CHANGED
@@ -488,8 +488,10 @@ class Auxin_Welcome_Sections {
488
  // sanitize the theme id
489
  $theme_id = sanitize_key( THEME_ID );
490
 
 
 
491
  // get remote changelog
492
- if( ( false === $changelog_info = get_transient( "auxin_{$theme_id}__remote_changelog" ) ) || isset( $_GET['flush_transient'] ) ){
493
 
494
  $changelog_remote = $this->get_remote_changelog( $theme_id );
495
 
@@ -498,7 +500,7 @@ class Auxin_Welcome_Sections {
498
  return;
499
  } else {
500
  $changelog_info = $changelog_remote;
501
- set_transient( "auxin_{$theme_id}__remote_changelog", $changelog_remote, 2 * HOUR_IN_SECONDS );
502
  }
503
 
504
  }
488
  // sanitize the theme id
489
  $theme_id = sanitize_key( THEME_ID );
490
 
491
+ $changelog_cache_id = "auxin_cache_remote_changelog__{$theme_id}";
492
+
493
  // get remote changelog
494
+ if( ( false === $changelog_info = get_transient( $changelog_cache_id ) ) || isset( $_GET['flush_transient'] ) ){
495
 
496
  $changelog_remote = $this->get_remote_changelog( $theme_id );
497
 
500
  return;
501
  } else {
502
  $changelog_info = $changelog_remote;
503
+ set_transient( $changelog_cache_id, $changelog_remote, 2 * HOUR_IN_SECONDS );
504
  }
505
 
506
  }
includes/classes/class-auxin-welcome.php CHANGED
@@ -827,7 +827,7 @@ class Auxin_Welcome extends Auxin_Welcome_Base {
827
  }
828
  }
829
 
830
- if( false !== auxin_get_transient( sanitize_key( 'aux-template-' . $args['type'] . $args['id'] ) ) ) {
831
  $template_status = 'copy';
832
  $btn_label = esc_html__( 'Copy to clipboard', 'auxin-elements' );
833
  $color_class = " aux-copy-template aux-iconic-action aux-orange";
@@ -986,13 +986,13 @@ class Auxin_Welcome extends Auxin_Welcome_Base {
986
  /**
987
  * Parse the demos list API
988
  */
989
- public function get_demo_list( $type = 'demos', $url = 'http://demo.phlox.pro/api/v2/info/', $sanitize_key = 'auxin_available_demos_info' ) {
990
 
991
  // $url = 'http://demo.phlox.pro/api/?demo_list&demo=beta&key=averta_avtdph';
992
 
993
  if( $type === 'templates' ){
994
  $url = 'http://library.phlox.pro/info-api/';
995
- $sanitize_key = 'auxin_available_templates';
996
  }
997
 
998
  $key = sanitize_key( $sanitize_key );
@@ -1192,7 +1192,7 @@ class Auxin_Welcome extends Auxin_Welcome_Base {
1192
  }
1193
 
1194
  // Remove Menus
1195
- $menus = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_name LIKE '%_auxin_demo_menu_old_id_%'", OBJECT );
1196
  foreach ($menus as $key => $menu) {
1197
  if( is_numeric( $menu->option_value ) ) {
1198
  wp_delete_nav_menu( $menu->option_value );
827
  }
828
  }
829
 
830
+ if( false !== auxin_get_transient( sanitize_key( "auxin_template_kit_{$args['type']}_data_for_origin_id_{$args['id']}" ) ) ) {
831
  $template_status = 'copy';
832
  $btn_label = esc_html__( 'Copy to clipboard', 'auxin-elements' );
833
  $color_class = " aux-copy-template aux-iconic-action aux-orange";
986
  /**
987
  * Parse the demos list API
988
  */
989
+ public function get_demo_list( $type = 'demos', $url = 'http://demo.phlox.pro/api/v2/info/', $sanitize_key = 'auxin_cache_demo_library_items' ) {
990
 
991
  // $url = 'http://demo.phlox.pro/api/?demo_list&demo=beta&key=averta_avtdph';
992
 
993
  if( $type === 'templates' ){
994
  $url = 'http://library.phlox.pro/info-api/';
995
+ $sanitize_key = 'auxin_cache_template_library_items';
996
  }
997
 
998
  $key = sanitize_key( $sanitize_key );
1192
  }
1193
 
1194
  // Remove Menus
1195
+ $menus = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_name LIKE '%auxin_demo_importer_menu_origin_id_%'", OBJECT );
1196
  foreach ($menus as $key => $menu) {
1197
  if( is_numeric( $menu->option_value ) ) {
1198
  wp_delete_nav_menu( $menu->option_value );
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '2.4.19' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '2.5.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elementor/class-auxin-elementor-core-elements.php CHANGED
@@ -171,22 +171,24 @@ final class Elements {
171
  public function hooks() {
172
 
173
  // Register controls, widgets, and categories
174
- add_action( 'elementor/elements/categories_registered' , array( $this, 'register_categories' ) );
175
- add_action( 'elementor/widgets/widgets_registered' , array( $this, 'register_widgets' ) );
176
- add_action( 'elementor/controls/controls_registered' , array( $this, 'register_controls' ) );
177
 
178
  // Register Widget Styles
179
- add_action( 'elementor/frontend/after_enqueue_styles' , array( $this, 'widget_styles' ) );
180
 
181
  // Register Widget Scripts
182
- add_action( 'elementor/frontend/after_register_scripts', array( $this, 'widget_scripts' ) );
183
 
184
  // Register Admin Scripts
185
- add_action( 'elementor/editor/before_enqueue_scripts' , array( $this, 'editor_scripts' ) );
186
 
187
- // Register Custom Schemes
188
- add_action( 'auxin_admin_loaded' , array( $this, 'register_schemes' ) );
189
 
 
 
190
  }
191
 
192
  /**
@@ -198,157 +200,175 @@ final class Elements {
198
  */
199
  public function register_widgets( $widgets_manager ) {
200
 
201
- $widgets = array(
202
 
203
  /* Dynamic Elements
204
  /*-------------------------------------*/
205
- '10' => array(
206
  'file' => $this->dir_path . '/widgets/recent-posts-grid-carousel.php',
207
  'class' => 'Elements\RecentPostsGridCarousel'
208
- ),
209
- '20' => array(
210
  'file' => $this->dir_path . '/widgets/recent-posts-masonry.php',
211
  'class' => 'Elements\RecentPostsMasonry'
212
- ),
213
- '30' => array(
214
  'file' => $this->dir_path . '/widgets/recent-posts-land-style.php',
215
  'class' => 'Elements\RecentPostsLand'
216
- ),
217
- '40' => array(
218
  'file' => $this->dir_path . '/widgets/recent-posts-timeline.php',
219
  'class' => 'Elements\RecentPostsTimeline'
220
- ),
221
- '50' => array(
222
  'file' => $this->dir_path . '/widgets/recent-posts-tiles.php',
223
  'class' => 'Elements\RecentPostsTiles'
224
- ),
225
- '60' => array(
226
  'file' => $this->dir_path . '/widgets/recent-posts-tiles-carousel.php',
227
  'class' => 'Elements\RecentPostsTilesCarousel'
228
- ),
229
- '70' => array(
230
  'file' => $this->dir_path . '/widgets/recent-products.php',
231
  'class' => 'Elements\RecentProducts'
232
- ),
233
 
234
- '80' => array(
235
  'file' => $this->dir_path . '/widgets/recent-comments.php',
236
  'class' => 'Elements\RecentComments'
237
- ),
238
 
239
  /* General Elements
240
  /*-------------------------------------*/
241
- '88' => array(
242
  'file' => $this->dir_path . '/widgets/heading-modern.php',
243
  'class' => 'Elements\ModernHeading'
244
- ),
245
- '89' => array(
246
  'file' => $this->dir_path . '/widgets/icon.php',
247
  'class' => 'Elements\Icon'
248
- ),
249
- '90' => array(
250
  'file' => $this->dir_path . '/widgets/image.php',
251
  'class' => 'Elements\Image'
252
- ),
253
- '100' => array(
254
  'file' => $this->dir_path . '/widgets/gallery.php',
255
  'class' => 'Elements\Gallery'
256
- ),
257
- '105' => array(
258
  'file' => $this->dir_path . '/widgets/text.php',
259
  'class' => 'Elements\Text'
260
- ),
261
- '110' => array(
262
  'file' => $this->dir_path . '/widgets/divider.php',
263
  'class' => 'Elements\Divider'
264
- ),
265
- '115' => array(
266
  'file' => $this->dir_path . '/widgets/button.php',
267
  'class' => 'Elements\Button'
268
- ),
269
- '120' => array(
270
  'file' => $this->dir_path . '/widgets/accordion.php',
271
  'class' => 'Elements\Accordion'
272
- ),
273
- '125' => array(
274
  'file' => $this->dir_path . '/widgets/tabs.php',
275
  'class' => 'Elements\Tabs'
276
- ),
277
- '130' => array(
278
  'file' => $this->dir_path . '/widgets/audio.php',
279
  'class' => 'Elements\Audio'
280
- ),
281
- '140' => array(
282
  'file' => $this->dir_path . '/widgets/video.php',
283
  'class' => 'Elements\Video'
284
- ),
285
- '145' => array(
286
  'file' => $this->dir_path . '/widgets/quote.php',
287
  'class' => 'Elements\Quote'
288
- ),
289
- '150' => array(
290
  'file' => $this->dir_path . '/widgets/testimonial.php',
291
  'class' => 'Elements\Testimonial'
292
- ),
293
- '155' => array(
294
  'file' => $this->dir_path . '/widgets/contact-form.php',
295
  'class' => 'Elements\ContactForm'
296
- ),
297
- '160' => array(
298
  'file' => $this->dir_path . '/widgets/contact-box.php',
299
  'class' => 'Elements\ContactBox'
300
- ),
301
- '165' => array(
302
  'file' => $this->dir_path . '/widgets/touch-slider.php',
303
  'class' => 'Elements\TouchSlider'
304
- ),
305
- '170' => array(
306
  'file' => $this->dir_path . '/widgets/before-after.php',
307
  'class' => 'Elements\BeforeAfter'
308
- ),
309
- '175' => array(
310
  'file' => $this->dir_path . '/widgets/staff.php',
311
  'class' => 'Elements\Staff'
312
- ),
313
- '180' => array(
314
  'file' => $this->dir_path . '/widgets/gmap.php',
315
  'class' => 'Elements\Gmap'
316
- ),
317
- '185' => array(
318
  'file' => $this->dir_path . '/widgets/custom-list.php',
319
  'class' => 'Elements\CustomList'
320
- ),
321
- '190' => array(
322
  'file' => $this->dir_path . '/widgets/mailchimp.php',
323
  'class' => 'Elements\MailChimp'
324
- ),
325
-
326
- '195' => array(
327
- 'file' => $this->dir_path . '/widgets/theme-elements/shopping-cart.php',
328
- 'class' => 'Elements\Theme_Elements\Shopping_Cart'
329
- ),
330
- '200' => array(
331
  'file' => $this->dir_path . '/widgets/theme-elements/current-time.php',
332
  'class' => 'Elements\Theme_Elements\Current_Time'
333
- ),
334
- '205' => array(
335
  'file' => $this->dir_path . '/widgets/theme-elements/search.php',
336
  'class' => 'Elements\Theme_Elements\SearchBox'
337
- ),
338
- '210' => array(
339
  'file' => $this->dir_path . '/widgets/theme-elements/site-title.php',
340
  'class' => 'Elements\Theme_Elements\SiteTitle'
341
- ),
342
- '215' => array(
343
  'file' => $this->dir_path . '/widgets/theme-elements/menu.php',
344
  'class' => 'Elements\Theme_Elements\MenuBox'
345
- ),
346
- '220' => array(
347
  'file' => $this->dir_path . '/widgets/theme-elements/logo.php',
348
  'class' => 'Elements\Theme_Elements\Logo'
349
- )
350
-
351
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
 
353
  // sort the widgets by priority number
354
  ksort( $widgets );
@@ -659,43 +679,58 @@ final class Elements {
659
  }
660
 
661
  /**
662
- * Register Default Schemes
663
  *
664
- * Change The Default Schemes of Elementor. for now just typography
665
  *
666
  * @since 1.0.0
667
  *
668
  * @access public
669
  */
670
- public function register_schemes() {
671
-
672
- // Elementor Default Typo Schemes on first run
673
- if( ! get_theme_mod( 'elementor_page_typography_scheme' ) ){
674
- $schemes_manager = new \Elementor\Schemes_Manager();
675
-
676
- $scheme_obj = $schemes_manager->get_scheme('typography');
677
- $scheme_obj->save_scheme([
678
- '1' => [
679
- 'font_family' => 'Arial',
680
- 'font_weight' => ''
681
- ],
682
- '2' => [
683
- 'font_family' => 'Arial',
684
- 'font_weight' => ''
685
- ],
686
- '3' => [
687
- 'font_family' => 'Tahoma',
688
- 'font_weight' => ''
689
- ],
690
- '4' => [
691
- 'font_family' => 'Tahoma',
692
- 'font_weight' => ''
693
- ]
694
- ]);
695
-
696
- set_theme_mod( 'elementor_page_typography_scheme', 1 );
 
 
697
  }
698
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
  }
700
 
701
  }
171
  public function hooks() {
172
 
173
  // Register controls, widgets, and categories
174
+ add_action( 'elementor/elements/categories_registered' , [ $this, 'register_categories' ] );
175
+ add_action( 'elementor/widgets/widgets_registered' , [ $this, 'register_widgets' ] );
176
+ add_action( 'elementor/controls/controls_registered' , [ $this, 'register_controls' ] );
177
 
178
  // Register Widget Styles
179
+ add_action( 'elementor/frontend/after_enqueue_styles' , [ $this, 'widget_styles' ] );
180
 
181
  // Register Widget Scripts
182
+ add_action( 'elementor/frontend/after_register_scripts', [ $this, 'widget_scripts' ] );
183
 
184
  // Register Admin Scripts
185
+ add_action( 'elementor/editor/before_enqueue_scripts' , [ $this, 'editor_scripts' ] );
186
 
187
+ // Register additional font icons
188
+ add_filter('elementor/icons_manager/additional_tabs' , [ $this, 'add_auxin_font_icons' ] );
189
 
190
+ // Change options on auxin load
191
+ add_action( 'auxin_admin_loaded' , [ $this, 'auxin_admin_loaded' ] );
192
  }
193
 
194
  /**
200
  */
201
  public function register_widgets( $widgets_manager ) {
202
 
203
+ $widgets = [
204
 
205
  /* Dynamic Elements
206
  /*-------------------------------------*/
207
+ '10' => [
208
  'file' => $this->dir_path . '/widgets/recent-posts-grid-carousel.php',
209
  'class' => 'Elements\RecentPostsGridCarousel'
210
+ ],
211
+ '20' => [
212
  'file' => $this->dir_path . '/widgets/recent-posts-masonry.php',
213
  'class' => 'Elements\RecentPostsMasonry'
214
+ ],
215
+ '30' => [
216
  'file' => $this->dir_path . '/widgets/recent-posts-land-style.php',
217
  'class' => 'Elements\RecentPostsLand'
218
+ ],
219
+ '40' => [
220
  'file' => $this->dir_path . '/widgets/recent-posts-timeline.php',
221
  'class' => 'Elements\RecentPostsTimeline'
222
+ ],
223
+ '50' => [
224
  'file' => $this->dir_path . '/widgets/recent-posts-tiles.php',
225
  'class' => 'Elements\RecentPostsTiles'
226
+ ],
227
+ '60' => [
228
  'file' => $this->dir_path . '/widgets/recent-posts-tiles-carousel.php',
229
  'class' => 'Elements\RecentPostsTilesCarousel'
230
+ ],
231
+ '70' => [
232
  'file' => $this->dir_path . '/widgets/recent-products.php',
233
  'class' => 'Elements\RecentProducts'
234
+ ],
235
 
236
+ '80' => [
237
  'file' => $this->dir_path . '/widgets/recent-comments.php',
238
  'class' => 'Elements\RecentComments'
239
+ ],
240
 
241
  /* General Elements
242
  /*-------------------------------------*/
243
+ '88' => [
244
  'file' => $this->dir_path . '/widgets/heading-modern.php',
245
  'class' => 'Elements\ModernHeading'
246
+ ],
247
+ '89' => [
248
  'file' => $this->dir_path . '/widgets/icon.php',
249
  'class' => 'Elements\Icon'
250
+ ],
251
+ '90' => [
252
  'file' => $this->dir_path . '/widgets/image.php',
253
  'class' => 'Elements\Image'
254
+ ],
255
+ '100' => [
256
  'file' => $this->dir_path . '/widgets/gallery.php',
257
  'class' => 'Elements\Gallery'
258
+ ],
259
+ '105' => [
260
  'file' => $this->dir_path . '/widgets/text.php',
261
  'class' => 'Elements\Text'
262
+ ],
263
+ '110' => [
264
  'file' => $this->dir_path . '/widgets/divider.php',
265
  'class' => 'Elements\Divider'
266
+ ],
267
+ '115' => [
268
  'file' => $this->dir_path . '/widgets/button.php',
269
  'class' => 'Elements\Button'
270
+ ],
271
+ '120' => [
272
  'file' => $this->dir_path . '/widgets/accordion.php',
273
  'class' => 'Elements\Accordion'
274
+ ],
275
+ '125' => [
276
  'file' => $this->dir_path . '/widgets/tabs.php',
277
  'class' => 'Elements\Tabs'
278
+ ],
279
+ '130' => [
280
  'file' => $this->dir_path . '/widgets/audio.php',
281
  'class' => 'Elements\Audio'
282
+ ],
283
+ '140' => [
284
  'file' => $this->dir_path . '/widgets/video.php',
285
  'class' => 'Elements\Video'
286
+ ],
287
+ '145' => [
288
  'file' => $this->dir_path . '/widgets/quote.php',
289
  'class' => 'Elements\Quote'
290
+ ],
291
+ '150' => [
292
  'file' => $this->dir_path . '/widgets/testimonial.php',
293
  'class' => 'Elements\Testimonial'
294
+ ],
295
+ '155' => [
296
  'file' => $this->dir_path . '/widgets/contact-form.php',
297
  'class' => 'Elements\ContactForm'
298
+ ],
299
+ '160' => [
300
  'file' => $this->dir_path . '/widgets/contact-box.php',
301
  'class' => 'Elements\ContactBox'
302
+ ],
303
+ '165' => [
304
  'file' => $this->dir_path . '/widgets/touch-slider.php',
305
  'class' => 'Elements\TouchSlider'
306
+ ],
307
+ '170' => [
308
  'file' => $this->dir_path . '/widgets/before-after.php',
309
  'class' => 'Elements\BeforeAfter'
310
+ ],
311
+ '175' => [
312
  'file' => $this->dir_path . '/widgets/staff.php',
313
  'class' => 'Elements\Staff'
314
+ ],
315
+ '180' => [
316
  'file' => $this->dir_path . '/widgets/gmap.php',
317
  'class' => 'Elements\Gmap'
318
+ ],
319
+ '185' => [
320
  'file' => $this->dir_path . '/widgets/custom-list.php',
321
  'class' => 'Elements\CustomList'
322
+ ],
323
+ '190' => [
324
  'file' => $this->dir_path . '/widgets/mailchimp.php',
325
  'class' => 'Elements\MailChimp'
326
+ ],
327
+ '200' => [
 
 
 
 
 
328
  'file' => $this->dir_path . '/widgets/theme-elements/current-time.php',
329
  'class' => 'Elements\Theme_Elements\Current_Time'
330
+ ],
331
+ '205' => [
332
  'file' => $this->dir_path . '/widgets/theme-elements/search.php',
333
  'class' => 'Elements\Theme_Elements\SearchBox'
334
+ ],
335
+ '210' => [
336
  'file' => $this->dir_path . '/widgets/theme-elements/site-title.php',
337
  'class' => 'Elements\Theme_Elements\SiteTitle'
338
+ ],
339
+ '215' => [
340
  'file' => $this->dir_path . '/widgets/theme-elements/menu.php',
341
  'class' => 'Elements\Theme_Elements\MenuBox'
342
+ ],
343
+ '220' => [
344
  'file' => $this->dir_path . '/widgets/theme-elements/logo.php',
345
  'class' => 'Elements\Theme_Elements\Logo'
346
+ ],
347
+ '225' => [
348
+ 'file' => $this->dir_path . '/widgets/carousel-navigation.php',
349
+ 'class' => 'Elements\CarouselNavigation'
350
+ ],
351
+ '230' => [
352
+ 'file' => $this->dir_path . '/widgets/theme-elements/copyright.php',
353
+ 'class' => 'Elements\Theme_Elements\Copyright'
354
+ ],
355
+ '235' => [
356
+ 'file' => $this->dir_path . '/widgets/svg.php',
357
+ 'class' => 'Elements\Simple__SVG'
358
+ ],
359
+ '240' => [
360
+ 'file' => $this->dir_path . '/widgets/theme-elements/modern-search.php',
361
+ 'class' => 'Elements\Theme_Elements\ModernSearch'
362
+ ],
363
+
364
+ ];
365
+
366
+ if ( class_exists('WooCommerce') ) {
367
+ $widgets['195'] = [
368
+ 'file' => $this->dir_path . '/widgets/theme-elements/shopping-cart.php',
369
+ 'class' => 'Elements\Theme_Elements\Shopping_Cart'
370
+ ];
371
+ }
372
 
373
  // sort the widgets by priority number
374
  ksort( $widgets );
679
  }
680
 
681
  /**
682
+ * Set options on auxin load
683
  *
684
+ * Change The Default Settings of Elementor.
685
  *
686
  * @since 1.0.0
687
  *
688
  * @access public
689
  */
690
+ public function auxin_admin_loaded() {
691
+
692
+ if( false !== auxin_get_transient( 'auxin_has_checked_to_disable_default_elementor_colors_fonts' ) ){
693
+ return;
694
+ }
695
+
696
+ // If it's a fresh installation
697
+ if( ! auxin_get_options() ){
698
+ update_option( 'elementor_disable_color_schemes', 'yes' );
699
+ update_option( 'elementor_disable_typography_schemes', 'yes' );
700
+ update_option( 'elementor_page_title_selector', '.page-title' );
701
+ update_option( 'elementor_allow_svg', '1' );
702
+ }
703
+
704
+ auxin_set_transient( 'auxin_has_checked_to_disable_default_elementor_colors_fonts', THEME_VERSION, 3 * YEAR_IN_SECONDS );
705
+ }
706
+
707
+ /**
708
+ * Add Auxin Icons to elementor icons pack
709
+ *
710
+ * @param array $tabs Icon library tabs
711
+ * @return void
712
+ */
713
+ public function add_auxin_font_icons( $tabs = [] ) {
714
+
715
+ $icons = Auxin()->Font_Icons->get_icons_list( 'fontastic' );
716
+
717
+ foreach ( $icons as $icon ) {
718
+ $icons_list[] = str_replace( '.auxicon-', '', $icon->classname );
719
  }
720
 
721
+ $tabs['auxicon'] = [
722
+ 'name' => 'auxicon',
723
+ 'label' => __( 'Phlox Icons', 'auxin-elements' ),
724
+ 'url' => THEME_URL . 'css/auxin-icon.css',
725
+ 'enqueue' => [ THEME_URL . 'css/auxin-icon.css' ],
726
+ 'prefix' => 'auxicon-',
727
+ 'displayPrefix' => 'auxicon',
728
+ 'labelIcon' => 'auxicon-sun',
729
+ 'ver' => '1.0.0',
730
+ 'icons' => $icons_list
731
+ ];
732
+
733
+ return $tabs;
734
  }
735
 
736
  }
includes/elementor/modules/documents/footer.php CHANGED
@@ -42,7 +42,7 @@ class Footer extends Library_Document {
42
  // Move to top as active.
43
  $categories = [
44
  'auxin-theme-elements' => [
45
- 'title' => __( 'Site', 'auxin-elements' ),
46
  'active' => true,
47
  ],
48
  ];
42
  // Move to top as active.
43
  $categories = [
44
  'auxin-theme-elements' => [
45
+ 'title' => __( 'Footer', 'auxin-elements' ),
46
  'active' => true,
47
  ],
48
  ];
includes/elementor/widgets/accordion.php CHANGED
@@ -4,12 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Box_Shadow;
15
  use Elementor\Group_Control_Background;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
10
  use Elementor\Group_Control_Box_Shadow;
11
  use Elementor\Group_Control_Background;
includes/elementor/widgets/audio.php CHANGED
@@ -4,13 +4,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
7
 
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/before-after.php CHANGED
@@ -5,12 +5,6 @@ use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
 
 
 
 
 
 
8
 
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/button.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
16
  use Elementor\Group_Control_Text_Shadow;
@@ -124,8 +119,8 @@ class Button extends Widget_Base {
124
  'placeholder' => 'https://your-link.com',
125
  'show_external' => true,
126
  'dynamic' => array(
127
- 'active' => true,
128
- ),
129
  )
130
  );
131
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
  use Elementor\Group_Control_Background;
10
  use Elementor\Group_Control_Box_Shadow;
11
  use Elementor\Group_Control_Text_Shadow;
119
  'placeholder' => 'https://your-link.com',
120
  'show_external' => true,
121
  'dynamic' => array(
122
+ 'active' => true
123
+ )
124
  )
125
  );
126
 
includes/elementor/widgets/carousel-navigation.php ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
+
4
+ use Elementor\Plugin;
5
+ use Elementor\Widget_Base;
6
+ use Elementor\Controls_Manager;
7
+ use Elementor\Group_Control_Background;
8
+ use Elementor\Group_Control_Box_Shadow;
9
+
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit; // Exit if accessed directly.
13
+ }
14
+
15
+ /**
16
+ * Elementor 'CarouselNavigation' widget.
17
+ *
18
+ * Elementor widget that displays an 'CarouselNavigation' with lightbox.
19
+ *
20
+ * @since 1.0.0
21
+ */
22
+ class CarouselNavigation extends Widget_Base {
23
+
24
+ /**
25
+ * Get widget name.
26
+ *
27
+ * Retrieve 'CarouselNavigation' widget name.
28
+ *
29
+ * @since 1.0.0
30
+ * @access public
31
+ *
32
+ * @return string Widget name.
33
+ */
34
+ public function get_name() {
35
+ return 'aux_carousel_navigation';
36
+ }
37
+
38
+ /**
39
+ * Get widget title.
40
+ *
41
+ * Retrieve 'CarouselNavigation' widget title.
42
+ *
43
+ * @since 1.0.0
44
+ * @access public
45
+ *
46
+ * @return string Widget title.
47
+ */
48
+ public function get_title() {
49
+ return __('Carousel Navigation', 'auxin-elements' );
50
+ }
51
+
52
+ /**
53
+ * Get widget icon.
54
+ *
55
+ * Retrieve 'CarouselNavigation' widget icon.
56
+ *
57
+ * @since 1.0.0
58
+ * @access public
59
+ *
60
+ * @return string Widget icon.
61
+ */
62
+ public function get_icon() {
63
+ return 'eicon-post-navigation auxin-badge';
64
+ }
65
+
66
+ /**
67
+ * Get widget categories.
68
+ *
69
+ * Retrieve 'CarouselNavigation' widget icon.
70
+ *
71
+ * @since 1.0.0
72
+ * @access public
73
+ *
74
+ * @return string Widget icon.
75
+ */
76
+ public function get_categories() {
77
+ return ['auxin-core'];
78
+ }
79
+
80
+ /**
81
+ * Register 'CarouselNavigation' widget controls.
82
+ *
83
+ * Adds different input fields to allow the user to change and customize the widget settings.
84
+ *
85
+ * @since 1.0.0
86
+ * @access protected
87
+ */
88
+ protected function _register_controls() {
89
+
90
+ $this->start_controls_section(
91
+ 'navigation',
92
+ [
93
+ 'label' => __('Navigation', 'auxin-elements' ),
94
+ ]
95
+ );
96
+
97
+ $this->add_control(
98
+ 'nav_type',
99
+ [
100
+ 'label' => __( 'Navigation Type', 'auxin-elements'),
101
+ 'type' => Controls_Manager::SELECT,
102
+ 'default' => 'boxed-arrow',
103
+ 'options' => [
104
+ 'boxed-arrow' => __('Boxed Arrow', 'auxin-elements' ),
105
+ 'long-arrow' => __('Long Arrow', 'auxin-elements' ),
106
+ 'custom' => __('Custom', 'auxin-elements' ),
107
+ ],
108
+ ]
109
+ );
110
+
111
+ $this->add_control(
112
+ 'prev_icon',
113
+ [
114
+ 'label' => __('Previous Button','auxin-elements' ),
115
+ 'type' => 'aux-icon',
116
+ 'default' => 'auxicon-chevron-left-2',
117
+ 'condition' => [
118
+ 'nav_type' => ['custom']
119
+ ]
120
+ ]
121
+ );
122
+
123
+ $this->add_control(
124
+ 'next_icon',
125
+ [
126
+ 'label' => __('Next Button','auxin-elements' ),
127
+ 'type' => 'aux-icon',
128
+ 'default' => 'auxicon-chevron-right-2',
129
+ 'condition' => [
130
+ 'nav_type' => ['custom']
131
+ ]
132
+ ]
133
+ );
134
+
135
+ $this->add_control(
136
+ 'nav_target',
137
+ [
138
+ 'label' => __('Carousel Target','auxin-elements' ),
139
+ 'type' => Controls_Manager::TEXT,
140
+ 'default' => '',
141
+ 'placeholder' => '.carousel-classname'
142
+ ]
143
+ );
144
+
145
+ $this->end_controls_section();
146
+
147
+ $this->start_controls_section(
148
+ 'navigation_style',
149
+ [
150
+ 'label' => __( 'Navigation', 'auxin-elements' ),
151
+ 'tab' => Controls_Manager::TAB_STYLE,
152
+ ]
153
+ );
154
+
155
+ $this->add_responsive_control(
156
+ 'navigation_align',
157
+ [
158
+ 'label' => __( 'Align', 'auxin-elements' ),
159
+ 'type' => Controls_Manager::SELECT,
160
+ 'default' => 'center',
161
+ 'options' => [
162
+ '' => __( 'Default', 'auxin-elements' ),
163
+ 'flex-start' => __( 'Start', 'auxin-elements' ),
164
+ 'center' => __( 'Center', 'auxin-elements' ),
165
+ 'flex-end' => __( 'End', 'auxin-elements' ),
166
+ 'space-between' => __( 'Space Between', 'auxin-elements' ),
167
+ 'space-around' => __( 'Space Around', 'auxin-elements' ),
168
+ 'space-evenly' => __( 'Space Evenly', 'auxin-elements' ),
169
+ ],
170
+ 'selectors' => [
171
+ '{{WRAPPER}} .aux-carousel-navigation' => 'justify-content: {{VALUE}}',
172
+ ],
173
+ ]
174
+ );
175
+
176
+ $this->add_responsive_control(
177
+ 'navigation_gap',
178
+ [
179
+ 'label' => __('Space Between Buttons','auxin-elements' ),
180
+ 'type' => Controls_Manager::SLIDER,
181
+ 'size_units' => ['px', 'em'],
182
+ 'range' => [
183
+ 'px' => [
184
+ 'max' => 100
185
+ ],
186
+ 'em' => [
187
+ 'max' => 10
188
+ ]
189
+ ],
190
+ 'default' => [
191
+ 'unit' => 'px',
192
+ 'size' => 10,
193
+ ],
194
+ 'condition' => [
195
+ 'navigation_align!' => ['space-between', 'space-around', 'space-evenly']
196
+ ],
197
+ 'selectors' => [
198
+ '{{WRAPPER}} .aux-carousel-navigation .aux-prev' => 'margin-right: {{SIZE}}{{UNIT}};',
199
+ ],
200
+ ]
201
+ );
202
+
203
+ $this->end_controls_section();
204
+
205
+
206
+ // Icon Tab Style
207
+ $this->start_controls_section(
208
+ 'icon_style',
209
+ [
210
+ 'label' => __( 'Icon', 'auxin-elements' ),
211
+ 'tab' => Controls_Manager::TAB_STYLE,
212
+ ]
213
+ );
214
+
215
+
216
+ $this->add_responsive_control(
217
+ 'icon_width',
218
+ [
219
+ 'label' => __('Width','auxin-elements' ),
220
+ 'type' => Controls_Manager::SLIDER,
221
+ 'size_units' => ['px', 'em','%'],
222
+ 'range' => [
223
+ '%' => [
224
+ 'min' => 1,
225
+ 'max' => 100,
226
+ 'step' => 1
227
+ ],
228
+ 'em' => [
229
+ 'min' => 1,
230
+ 'max' => 100,
231
+ 'step' => 1
232
+ ],
233
+ 'px' => [
234
+ 'min' => 1,
235
+ 'max' => 1600,
236
+ 'step' => 1
237
+ ]
238
+ ],
239
+ 'selectors' => [
240
+ '{{WRAPPER}} .aux-custom-nav' => 'width:{{SIZE}}{{UNIT}};'
241
+ ]
242
+ ]
243
+ );
244
+
245
+ $this->add_responsive_control(
246
+ 'icon_height',
247
+ [
248
+ 'label' => __('Height','auxin-elements' ),
249
+ 'type' => Controls_Manager::SLIDER,
250
+ 'size_units' => ['px', 'em','%'],
251
+ 'range' => [
252
+ '%' => [
253
+ 'min' => 1,
254
+ 'max' => 100,
255
+ 'step' => 1
256
+ ],
257
+ 'em' => [
258
+ 'min' => 1,
259
+ 'max' => 100,
260
+ 'step' => 1
261
+ ],
262
+ 'px' => [
263
+ 'min' => 1,
264
+ 'max' => 1600,
265
+ 'step' => 1
266
+ ]
267
+ ],
268
+ 'selectors' => [
269
+ '{{WRAPPER}} .aux-custom-nav' => 'height:{{SIZE}}{{UNIT}};'
270
+ ]
271
+ ]
272
+ );
273
+ $this->start_controls_tabs( 'icon_tabs' );
274
+
275
+ $this->start_controls_tab(
276
+ 'icon_normal_tab',
277
+ [
278
+ 'label' => __( 'Normal' , 'auxin-elements' )
279
+ ]
280
+ );
281
+
282
+ $this->add_group_control(
283
+ Group_Control_Background::get_type(),
284
+ [
285
+ 'name' => 'icon_bg',
286
+ 'label' => __( 'Background', 'auxin-elements' ),
287
+ 'types' => [ 'classic', 'gradient' ],
288
+ 'selector' => '{{WRAPPER}} .aux-custom-nav'
289
+ ]
290
+ );
291
+
292
+ $this->add_group_control(
293
+ Group_Control_Box_Shadow::get_type(),
294
+ [
295
+ 'name' => 'icon_box_shadow',
296
+ 'selector' => '{{WRAPPER}} .aux-custom-nav'
297
+ ]
298
+ );
299
+
300
+ $this->add_responsive_control(
301
+ 'icon_color',
302
+ [
303
+ 'label' => __( 'Color', 'auxin-elements' ),
304
+ 'type' => Controls_Manager::COLOR,
305
+ 'default' => '#3d3d3d',
306
+ 'selectors' => [
307
+ '{{WRAPPER}} .aux-custom-nav' => 'color: {{VALUE}};'
308
+ ]
309
+ ]
310
+ );
311
+
312
+ $this->add_responsive_control(
313
+ 'icon_size',
314
+ [
315
+ 'label' => __( 'Size', 'auxin-elements' ),
316
+ 'type' => Controls_Manager::SLIDER,
317
+ 'size_units' => [ 'px', 'em' ],
318
+ 'range' => [
319
+ 'px' => [
320
+ 'max' => 100
321
+ ],
322
+ 'em' => [
323
+ 'max' => 10
324
+ ]
325
+ ],
326
+ 'selectors' => [
327
+ '{{WRAPPER}} .aux-custom-nav' => 'font-size: {{SIZE}}{{UNIT}};',
328
+ ],
329
+ 'default' => [
330
+ 'unit' => 'px',
331
+ 'size' => 25,
332
+ ],
333
+ ]
334
+ );
335
+
336
+ $this->add_responsive_control(
337
+ 'icon_border_radius',
338
+ [
339
+ 'label' => __( 'Border Radius', 'auxin-elements' ),
340
+ 'type' => Controls_Manager::DIMENSIONS,
341
+ 'size_units' => [ 'px', 'em', '%' ],
342
+ 'selectors' => [
343
+ '{{WRAPPER}} .aux-custom-nav' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
344
+ ],
345
+ 'allowed_dimensions' => 'all'
346
+ ]
347
+ );
348
+
349
+ $this->add_responsive_control(
350
+ 'icon_padding',
351
+ [
352
+ 'label' => __( 'Padding', 'auxin-elements' ),
353
+ 'type' => Controls_Manager::DIMENSIONS,
354
+ 'size_units' => [ 'px', 'em' ],
355
+ 'allowed_dimensions' => 'all',
356
+ 'selectors' => [
357
+ '{{WRAPPER}} .aux-custom-nav' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
358
+ ]
359
+ ]
360
+ );
361
+
362
+ $this->end_controls_tab();
363
+
364
+ $this->start_controls_tab(
365
+ 'icon_hover_tab',
366
+ [
367
+ 'label' => __( 'Hover' , 'auxin-elements' )
368
+ ]
369
+ );
370
+
371
+ $this->add_group_control(
372
+ Group_Control_Background::get_type(),
373
+ [
374
+ 'name' => 'icon_hover_bg',
375
+ 'label' => __( 'Background', 'auxin-elements' ),
376
+ 'types' => [ 'classic', 'gradient' ],
377
+ 'selector' => '{{WRAPPER}} .aux-custom-nav:hover'
378
+ ]
379
+ );
380
+
381
+ $this->add_group_control(
382
+ Group_Control_Box_Shadow::get_type(),
383
+ [
384
+ 'name' => 'icon_hover_box_shadow',
385
+ 'selector' => '{{WRAPPER}} .aux-custom-nav:hover'
386
+ ]
387
+ );
388
+
389
+ $this->add_responsive_control(
390
+ 'icon_hover_color',
391
+ [
392
+ 'label' => __( 'Hover Color', 'auxin-elements' ),
393
+ 'type' => Controls_Manager::COLOR,
394
+ 'selectors' => [
395
+ '{{WRAPPER}} .aux-custom-nav:hover' => 'color: {{VALUE}};',
396
+ ]
397
+ ]
398
+ );
399
+
400
+ $this->add_responsive_control(
401
+ 'icon_hover_size',
402
+ [
403
+ 'label' => __( 'Size', 'auxin-elements' ),
404
+ 'type' => Controls_Manager::SLIDER,
405
+ 'size_units' => [ 'px', 'em' ],
406
+ 'range' => [
407
+ 'px' => [
408
+ 'max' => 100
409
+ ],
410
+ 'em' => [
411
+ 'max' => 10
412
+ ]
413
+ ],
414
+ 'selectors' => [
415
+ '{{WRAPPER}} .aux-custom-nav:hover' => 'font-size: {{SIZE}}{{UNIT}};',
416
+ ],
417
+ 'default' => [
418
+ 'unit' => 'px',
419
+ 'size' => 25,
420
+ ],
421
+ ]
422
+ );
423
+
424
+ $this->add_responsive_control(
425
+ 'icon_hover_border_radius',
426
+ [
427
+ 'label' => __( 'Border Radius', 'auxin-elements' ),
428
+ 'type' => Controls_Manager::DIMENSIONS,
429
+ 'size_units' => [ 'px', 'em', '%' ],
430
+ 'selectors' => [
431
+ '{{WRAPPER}} .aux-custom-nav:hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
432
+ ],
433
+ 'allowed_dimensions' => 'all'
434
+ ]
435
+ );
436
+
437
+ $this->add_responsive_control(
438
+ 'icon_hover_padding',
439
+ [
440
+ 'label' => __( 'Padding', 'auxin-elements' ),
441
+ 'type' => Controls_Manager::DIMENSIONS,
442
+ 'size_units' => [ 'px', 'em' ],
443
+ 'allowed_dimensions' => 'all',
444
+ 'selectors' => [
445
+ '{{WRAPPER}} .aux-custom-nav:hover' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
446
+ ]
447
+ ]
448
+ );
449
+
450
+ $this->end_controls_tab();
451
+
452
+ $this->end_controls_tabs();
453
+
454
+ $this->end_controls_section();
455
+ }
456
+
457
+ /**
458
+ * Render 'CarouselNavigation' widget output on the frontend.
459
+ *
460
+ * @access protected
461
+ */
462
+ protected function get_arrow_output( $type, $settings ) {
463
+ ob_start();
464
+
465
+ switch( $type ) {
466
+ case 'boxed-arrow':
467
+ ;?>
468
+ <div class="aux-prev aux-prev-arrow aux-arrow-nav aux-outline aux-hover-fill">
469
+ <span class="aux-svg-arrow aux-small-left"></span>
470
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-left"></span>
471
+ </div>
472
+ <div class="aux-next aux-next-arrow aux-arrow-nav aux-outline aux-hover-fill">
473
+ <span class="aux-svg-arrow aux-small-right"></span>
474
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-right"></span>
475
+ </div>
476
+ <?php
477
+ break;
478
+ case 'long-arrow':
479
+ ;?>
480
+ <div class="aux-prev aux-prev-arrow">
481
+ <span class="aux-svg-arrow aux-l-left"></span>
482
+ </div>
483
+ <div class="aux-next aux-next-arrow">
484
+ <span class="aux-svg-arrow aux-l-right"></span>
485
+ </div>
486
+ <?php
487
+ break;
488
+ case 'custom':
489
+ ;?>
490
+ <div class="aux-prev aux-prev-custom aux-custom-nav">
491
+ <span class="<?php echo $settings['prev_icon'];?>"></span>
492
+ </div>
493
+ <div class="aux-next aux-next-custom aux-custom-nav">
494
+ <span class="<?php echo $settings['next_icon'];?>"></span>
495
+ </div>
496
+ <?php
497
+ break;
498
+ default:
499
+ break;
500
+
501
+ }
502
+
503
+ return ob_get_clean();
504
+ }
505
+
506
+
507
+ /**
508
+ * Render 'CarouselNavigation' widget output on the frontend.
509
+ *
510
+ * @access protected
511
+ */
512
+ protected function render() {
513
+ $settings = $this->get_settings_for_display(); ?>
514
+
515
+ <div class="aux-carousel-navigation" data-target="<?php echo $settings['nav_target'];?>">
516
+ <?php echo $this->get_arrow_output( $settings['nav_type'] , $settings );?>
517
+ </div>
518
+
519
+ <?php
520
+ }
521
+
522
+ }
includes/elementor/widgets/contact-box.php CHANGED
@@ -4,13 +4,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
7
 
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/contact-form.php CHANGED
@@ -4,13 +4,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
7
 
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/custom-list.php CHANGED
@@ -4,12 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Box_Shadow;
15
  use Elementor\Group_Control_Background;
@@ -145,7 +141,10 @@ class CustomList extends Widget_Base {
145
  'type' => Controls_Manager::URL,
146
  'placeholder' => '',
147
  'show_external' => true,
148
- 'label_block' => true
 
 
 
149
  )
150
  );
151
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
10
  use Elementor\Group_Control_Box_Shadow;
11
  use Elementor\Group_Control_Background;
141
  'type' => Controls_Manager::URL,
142
  'placeholder' => '',
143
  'show_external' => true,
144
+ 'label_block' => true,
145
+ 'dynamic' => [
146
+ 'active' => true
147
+ ]
148
  )
149
  );
150
 
includes/elementor/widgets/divider.php CHANGED
@@ -4,13 +4,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
7
 
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/gallery.php CHANGED
@@ -3,12 +3,9 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
 
4
  use Elementor\Widget_Base;
5
  use Elementor\Controls_Manager;
6
- use Elementor\Group_Control_Image_Size;
7
  use Elementor\Group_Control_Typography;
8
  use Elementor\Scheme_Color;
9
  use Elementor\Scheme_Typography;
10
- use Elementor\Utils;
11
- use Elementor\Control_Media;
12
  use Elementor\Group_Control_Border;
13
 
14
 
@@ -110,15 +107,6 @@ class Gallery extends Widget_Base {
110
  )
111
  );
112
 
113
- /*$this->add_group_control(
114
- Group_Control_Image_Size::get_type(),
115
- array(
116
- 'name' => 'medium', // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `thumbnail_size` and `thumbnail_custom_dimension`.
117
- 'exclude' => array( 'custom' ),
118
- 'separator' => 'none',
119
- )
120
- );*/
121
-
122
  $this->add_control(
123
  'layout',
124
  array(
3
 
4
  use Elementor\Widget_Base;
5
  use Elementor\Controls_Manager;
 
6
  use Elementor\Group_Control_Typography;
7
  use Elementor\Scheme_Color;
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
10
 
11
 
107
  )
108
  );
109
 
 
 
 
 
 
 
 
 
 
110
  $this->add_control(
111
  'layout',
112
  array(
includes/elementor/widgets/gmap.php CHANGED
@@ -3,13 +3,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
 
4
  use Elementor\Widget_Base;
5
  use Elementor\Controls_Manager;
6
- use Elementor\Group_Control_Image_Size;
7
- use Elementor\Group_Control_Typography;
8
- use Elementor\Scheme_Color;
9
- use Elementor\Scheme_Typography;
10
- use Elementor\Utils;
11
- use Elementor\Control_Media;
12
- use Elementor\Group_Control_Border;
13
 
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
@@ -267,7 +260,7 @@ class Gmap extends Widget_Base {
267
  </div>
268
  <?php
269
  echo ob_get_clean();
270
- return;
271
  }
272
 
273
  // get the shortcode base blog page
3
 
4
  use Elementor\Widget_Base;
5
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
6
 
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
260
  </div>
261
  <?php
262
  echo ob_get_clean();
263
+ return;
264
  }
265
 
266
  // get the shortcode base blog page
includes/elementor/widgets/icon.php CHANGED
@@ -4,16 +4,7 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
  use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
- use Elementor\Group_Control_Box_Shadow;
15
- use Elementor\Group_Control_Text_Shadow;
16
- use Elementor\Group_Control_Background;
17
 
18
 
19
  if ( ! defined( 'ABSPATH' ) ) {
@@ -164,7 +155,7 @@ class Icon extends Widget_Base {
164
  'label' => __( 'Link', 'elementor' ),
165
  'type' => Controls_Manager::URL,
166
  'dynamic' => array(
167
- 'active' => true,
168
  ),
169
  'placeholder' => __( 'https://your-link.com', 'elementor' ),
170
  )
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
7
  use Elementor\Scheme_Color;
 
 
 
 
 
 
 
8
 
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
155
  'label' => __( 'Link', 'elementor' ),
156
  'type' => Controls_Manager::URL,
157
  'dynamic' => array(
158
+ 'active' => true
159
  ),
160
  'placeholder' => __( 'https://your-link.com', 'elementor' ),
161
  )
includes/elementor/widgets/image.php CHANGED
@@ -6,10 +6,8 @@ use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
  use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Box_Shadow;
15
  use Elementor\Group_Control_Text_Shadow;
@@ -133,7 +131,10 @@ class Image extends Widget_Base {
133
  'label' => __('Image Link','auxin-elements' ),
134
  'type' => Controls_Manager::URL,
135
  'placeholder' => 'http://phlox.pro',
136
- 'show_external' => true
 
 
 
137
  )
138
  );
139
 
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
 
9
  use Elementor\Scheme_Typography;
10
  use Elementor\Utils;
 
11
  use Elementor\Group_Control_Border;
12
  use Elementor\Group_Control_Box_Shadow;
13
  use Elementor\Group_Control_Text_Shadow;
131
  'label' => __('Image Link','auxin-elements' ),
132
  'type' => Controls_Manager::URL,
133
  'placeholder' => 'http://phlox.pro',
134
+ 'show_external' => true,
135
+ 'dynamic' => [
136
+ 'active' => true
137
+ ]
138
  )
139
  );
140
 
includes/elementor/widgets/mailchimp.php CHANGED
@@ -4,14 +4,10 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
  use Elementor\Group_Control_Background;
10
  use Elementor\Group_Control_Box_Shadow;
11
- use Elementor\Scheme_Color;
12
  use Elementor\Scheme_Typography;
13
- use Elementor\Utils;
14
- use Elementor\Control_Media;
15
  use Elementor\Group_Control_Border;
16
 
17
 
@@ -281,7 +277,7 @@ class MailChimp extends Widget_Base {
281
  ]
282
  ],
283
  'selectors' => [
284
- '{{WRAPPER}} .mc4wp-form input[type="text"],{{WRAPPER}} .mc4wp-form input[type="email"]' => 'height: {{VALUE}}{{UNIT}};',
285
  ],
286
  'separator' => 'after'
287
  ]
@@ -528,7 +524,7 @@ class MailChimp extends Widget_Base {
528
  ]
529
  ],
530
  'selectors' => [
531
- '{{WRAPPER}} .mc4wp-form input[type="submit"]' => 'height: {{VALUE}}{{UNIT}};'
532
  ],
533
  'separator' => 'after'
534
  ]
@@ -756,7 +752,7 @@ class MailChimp extends Widget_Base {
756
  ]
757
  ],
758
  'selectors' => [
759
- '{{WRAPPER}} .mc4wp-form-fields' => 'height: {{VALUE}}{{UNIT}};'
760
  ]
761
  ]
762
  );
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
8
  use Elementor\Group_Control_Background;
9
  use Elementor\Group_Control_Box_Shadow;
 
10
  use Elementor\Scheme_Typography;
 
 
11
  use Elementor\Group_Control_Border;
12
 
13
 
277
  ]
278
  ],
279
  'selectors' => [
280
+ '{{WRAPPER}} .mc4wp-form input[type="text"],{{WRAPPER}} .mc4wp-form input[type="email"]' => 'height: {{SIZE}}{{UNIT}};',
281
  ],
282
  'separator' => 'after'
283
  ]
524
  ]
525
  ],
526
  'selectors' => [
527
+ '{{WRAPPER}} .mc4wp-form input[type="submit"]' => 'height: {{SIZE}}{{UNIT}};'
528
  ],
529
  'separator' => 'after'
530
  ]
752
  ]
753
  ],
754
  'selectors' => [
755
+ '{{WRAPPER}} .mc4wp-form-fields' => 'height: {{SIZE}}{{UNIT}};'
756
  ]
757
  ]
758
  );
includes/elementor/widgets/quote.php CHANGED
@@ -4,12 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
 
15
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
10
 
11
 
includes/elementor/widgets/recent-comments.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
@@ -162,7 +157,7 @@ class RecentComments extends Widget_Base {
162
  'return_value' => 'yes',
163
  'default' => 'yes'
164
  )
165
- );
166
 
167
  $this->end_controls_section();
168
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
 
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
157
  'return_value' => 'yes',
158
  'default' => 'yes'
159
  )
160
+ );
161
 
162
  $this->end_controls_section();
163
 
includes/elementor/widgets/recent-posts-grid-carousel.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
16
  use Elementor\Group_Control_Text_Shadow;
@@ -169,7 +164,7 @@ class RecentPostsGridCarousel extends Widget_Base {
169
  'carousel_space',
170
  array(
171
  'label' => __( 'Column space', 'auxin-elements' ),
172
- 'description' => __( 'Specifies space between carousel columns in pixels.', 'auxin-elements' ),
173
  'type' => Controls_Manager::NUMBER,
174
  'default' => '25',
175
  'condition' => array(
@@ -1878,7 +1873,7 @@ class RecentPostsGridCarousel extends Widget_Base {
1878
  'label' => __( 'Color', 'auxin-elements' ),
1879
  'type' => Controls_Manager::COLOR,
1880
  'selectors' => array(
1881
- '{{WRAPPER}} .entry-meta .aux-read-more' => 'color: {{VALUE}};',
1882
  )
1883
  )
1884
  );
@@ -1888,7 +1883,7 @@ class RecentPostsGridCarousel extends Widget_Base {
1888
  array(
1889
  'name' => 'btn_text_shadow_hover',
1890
  'label' => __( 'Text Shadow', 'auxin-elements' ),
1891
- 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more',
1892
  )
1893
  );
1894
 
@@ -1897,7 +1892,7 @@ class RecentPostsGridCarousel extends Widget_Base {
1897
  array(
1898
  'name' => 'btn_text_typography_hover',
1899
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1900
- 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more'
1901
  )
1902
  );
1903
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
  use Elementor\Group_Control_Background;
10
  use Elementor\Group_Control_Box_Shadow;
11
  use Elementor\Group_Control_Text_Shadow;
164
  'carousel_space',
165
  array(
166
  'label' => __( 'Column space', 'auxin-elements' ),
167
+ 'description' => __( 'Specifies horizontal space between items (pixel).', 'auxin-elements' ),
168
  'type' => Controls_Manager::NUMBER,
169
  'default' => '25',
170
  'condition' => array(
1873
  'label' => __( 'Color', 'auxin-elements' ),
1874
  'type' => Controls_Manager::COLOR,
1875
  'selectors' => array(
1876
+ '{{WRAPPER}} .entry-meta .aux-read-more:hover' => 'color: {{VALUE}};',
1877
  )
1878
  )
1879
  );
1883
  array(
1884
  'name' => 'btn_text_shadow_hover',
1885
  'label' => __( 'Text Shadow', 'auxin-elements' ),
1886
+ 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover',
1887
  )
1888
  );
1889
 
1892
  array(
1893
  'name' => 'btn_text_typography_hover',
1894
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1895
+ 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover'
1896
  )
1897
  );
1898
 
includes/elementor/widgets/recent-posts-land-style.php CHANGED
@@ -4,14 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
-
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
17
  exit; // Exit if accessed directly.
@@ -312,7 +306,7 @@ class RecentPostsLand extends Widget_Base {
312
  'default' => 'yes',
313
  'condition' => array(
314
  'author_or_readmore' => 'author',
315
- )
316
  )
317
  );
318
 
@@ -328,7 +322,7 @@ class RecentPostsLand extends Widget_Base {
328
  'default' => 'no',
329
  'condition' => array(
330
  'author_or_readmore' => 'author',
331
- )
332
  )
333
  );
334
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
 
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly.
306
  'default' => 'yes',
307
  'condition' => array(
308
  'author_or_readmore' => 'author',
309
+ )
310
  )
311
  );
312
 
322
  'default' => 'no',
323
  'condition' => array(
324
  'author_or_readmore' => 'author',
325
+ )
326
  )
327
  );
328
 
includes/elementor/widgets/recent-posts-masonry.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
16
  use Elementor\Group_Control_Text_Shadow;
@@ -203,7 +198,7 @@ class RecentPostsMasonry extends Widget_Base {
203
  )
204
  )
205
  );
206
-
207
  $this->add_control(
208
  'preloadable',
209
  array(
@@ -407,7 +402,7 @@ class RecentPostsMasonry extends Widget_Base {
407
  'default' => 'yes',
408
  'condition' => array(
409
  'author_or_readmore' => 'author',
410
- )
411
  )
412
  );
413
 
@@ -423,7 +418,7 @@ class RecentPostsMasonry extends Widget_Base {
423
  'default' => 'no',
424
  'condition' => array(
425
  'author_or_readmore' => 'author',
426
- )
427
  )
428
  );
429
 
@@ -1230,7 +1225,7 @@ class RecentPostsMasonry extends Widget_Base {
1230
  'name' => 'btn',
1231
  'label' => __( 'Background', 'auxin-elements' ),
1232
  'types' => array( 'classic', 'gradient' ),
1233
- 'selector' => '{{WRAPPER}} .aux-read-more',
1234
  )
1235
  );
1236
 
@@ -1380,7 +1375,7 @@ class RecentPostsMasonry extends Widget_Base {
1380
  'display_author_footer' => $settings['display_author_footer'],
1381
  'display_comments' => $settings['display_comments'],
1382
  'content_layout' => $settings['content_layout'],
1383
-
1384
  // Layout Section
1385
  'desktop_cnum' => $settings['columns'],
1386
  'tablet_cnum' => $settings['columns_tablet'],
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
  use Elementor\Group_Control_Background;
10
  use Elementor\Group_Control_Box_Shadow;
11
  use Elementor\Group_Control_Text_Shadow;
198
  )
199
  )
200
  );
201
+
202
  $this->add_control(
203
  'preloadable',
204
  array(
402
  'default' => 'yes',
403
  'condition' => array(
404
  'author_or_readmore' => 'author',
405
+ )
406
  )
407
  );
408
 
418
  'default' => 'no',
419
  'condition' => array(
420
  'author_or_readmore' => 'author',
421
+ )
422
  )
423
  );
424
 
1225
  'name' => 'btn',
1226
  'label' => __( 'Background', 'auxin-elements' ),
1227
  'types' => array( 'classic', 'gradient' ),
1228
+ 'selector' => '{{WRAPPER}} .aux-read-more',
1229
  )
1230
  );
1231
 
1375
  'display_author_footer' => $settings['display_author_footer'],
1376
  'display_comments' => $settings['display_comments'],
1377
  'content_layout' => $settings['content_layout'],
1378
+
1379
  // Layout Section
1380
  'desktop_cnum' => $settings['columns'],
1381
  'tablet_cnum' => $settings['columns_tablet'],
includes/elementor/widgets/recent-posts-tiles-carousel.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
 
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/recent-posts-tiles.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
 
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/recent-posts-timeline.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
@@ -336,7 +331,7 @@ class RecentPostsTimeline extends Widget_Base {
336
  'default' => 'yes',
337
  'condition' => array(
338
  'author_or_readmore' => 'author',
339
- )
340
  )
341
  );
342
 
@@ -352,7 +347,7 @@ class RecentPostsTimeline extends Widget_Base {
352
  'default' => 'no',
353
  'condition' => array(
354
  'author_or_readmore' => 'author',
355
- )
356
  )
357
  );
358
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
 
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
331
  'default' => 'yes',
332
  'condition' => array(
333
  'author_or_readmore' => 'author',
334
+ )
335
  )
336
  );
337
 
347
  'default' => 'no',
348
  'condition' => array(
349
  'author_or_readmore' => 'author',
350
+ )
351
  )
352
  );
353
 
includes/elementor/widgets/recent-products.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
 
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/search.php CHANGED
@@ -4,13 +4,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
7
 
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/staff.php CHANGED
@@ -6,10 +6,8 @@ use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
  use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
 
15
 
@@ -128,7 +126,10 @@ class Staff extends Widget_Base {
128
  'label' => __('Staff Page Link','auxin-elements' ),
129
  'type' => Controls_Manager::URL,
130
  'placeholder' => 'https://your-link.com',
131
- 'show_external' => false
 
 
 
132
  )
133
  );
134
 
@@ -286,9 +287,12 @@ class Staff extends Widget_Base {
286
  'type' => Controls_Manager::URL,
287
  'placeholder' => 'https://your-link.com',
288
  'show_external' => false,
289
- 'condition' => array(
290
  'socials' => 'yes'
291
- )
 
 
 
292
  )
293
  );
294
 
@@ -299,9 +303,12 @@ class Staff extends Widget_Base {
299
  'type' => Controls_Manager::URL,
300
  'placeholder' => 'https://your-link.com',
301
  'show_external' => false,
302
- 'condition' => array(
303
  'socials' => 'yes'
304
- )
 
 
 
305
  )
306
  );
307
 
@@ -312,9 +319,12 @@ class Staff extends Widget_Base {
312
  'type' => Controls_Manager::URL,
313
  'placeholder' => 'https://your-link.com',
314
  'show_external' => false,
315
- 'condition' => array(
316
  'socials' => 'yes'
317
- )
 
 
 
318
  )
319
  );
320
 
@@ -325,9 +335,12 @@ class Staff extends Widget_Base {
325
  'type' => Controls_Manager::URL,
326
  'placeholder' => 'https://your-link.com',
327
  'show_external' => false,
328
- 'condition' => array(
329
  'socials' => 'yes'
330
- )
 
 
 
331
  )
332
  );
333
 
@@ -338,9 +351,12 @@ class Staff extends Widget_Base {
338
  'type' => Controls_Manager::URL,
339
  'placeholder' => 'https://your-link.com',
340
  'show_external' => false,
341
- 'condition' => array(
342
  'socials' => 'yes'
343
- )
 
 
 
344
  )
345
  );
346
 
@@ -351,9 +367,12 @@ class Staff extends Widget_Base {
351
  'type' => Controls_Manager::URL,
352
  'placeholder' => 'https://your-link.com',
353
  'show_external' => false,
354
- 'condition' => array(
355
  'socials' => 'yes'
356
- )
 
 
 
357
  )
358
  );
359
 
@@ -364,9 +383,28 @@ class Staff extends Widget_Base {
364
  'type' => Controls_Manager::URL,
365
  'placeholder' => 'https://your-link.com',
366
  'show_external' => false,
367
- 'condition' => array(
368
  'socials' => 'yes'
369
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  )
371
  );
372
 
@@ -881,6 +919,7 @@ class Staff extends Widget_Base {
881
  'social_delicious' => $settings['social_delicious']['url'],
882
  'social_pinterest' => $settings['social_pinterest']['url'],
883
  'social_github' => $settings['social_github']['url'],
 
884
 
885
  'icon_size' => $settings['icon_size'],
886
  'icon_align' => $settings['icon_align'],
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
 
9
  use Elementor\Scheme_Typography;
10
  use Elementor\Utils;
 
11
  use Elementor\Group_Control_Border;
12
 
13
 
126
  'label' => __('Staff Page Link','auxin-elements' ),
127
  'type' => Controls_Manager::URL,
128
  'placeholder' => 'https://your-link.com',
129
+ 'show_external' => false,
130
+ 'dynamic' => [
131
+ 'active' => true
132
+ ]
133
  )
134
  );
135
 
287
  'type' => Controls_Manager::URL,
288
  'placeholder' => 'https://your-link.com',
289
  'show_external' => false,
290
+ 'condition' => [
291
  'socials' => 'yes'
292
+ ],
293
+ 'dynamic' => [
294
+ 'active' => true
295
+ ]
296
  )
297
  );
298
 
303
  'type' => Controls_Manager::URL,
304
  'placeholder' => 'https://your-link.com',
305
  'show_external' => false,
306
+ 'condition' => [
307
  'socials' => 'yes'
308
+ ],
309
+ 'dynamic' => [
310
+ 'active' => true
311
+ ]
312
  )
313
  );
314
 
319
  'type' => Controls_Manager::URL,
320
  'placeholder' => 'https://your-link.com',
321
  'show_external' => false,
322
+ 'condition' => [
323
  'socials' => 'yes'
324
+ ],
325
+ 'dynamic' => [
326
+ 'active' => true
327
+ ]
328
  )
329
  );
330
 
335
  'type' => Controls_Manager::URL,
336
  'placeholder' => 'https://your-link.com',
337
  'show_external' => false,
338
+ 'condition' => [
339
  'socials' => 'yes'
340
+ ],
341
+ 'dynamic' => [
342
+ 'active' => true
343
+ ]
344
  )
345
  );
346
 
351
  'type' => Controls_Manager::URL,
352
  'placeholder' => 'https://your-link.com',
353
  'show_external' => false,
354
+ 'condition' => [
355
  'socials' => 'yes'
356
+ ],
357
+ 'dynamic' => [
358
+ 'active' => true
359
+ ]
360
  )
361
  );
362
 
367
  'type' => Controls_Manager::URL,
368
  'placeholder' => 'https://your-link.com',
369
  'show_external' => false,
370
+ 'condition' => [
371
  'socials' => 'yes'
372
+ ],
373
+ 'dynamic' => [
374
+ 'active' => true
375
+ ]
376
  )
377
  );
378
 
383
  'type' => Controls_Manager::URL,
384
  'placeholder' => 'https://your-link.com',
385
  'show_external' => false,
386
+ 'condition' => [
387
  'socials' => 'yes'
388
+ ],
389
+ 'dynamic' => [
390
+ 'active' => true
391
+ ]
392
+ )
393
+ );
394
+
395
+ $this->add_control(
396
+ 'social_instagram',
397
+ array(
398
+ 'label' => __('Instagram Address','auxin-elements' ),
399
+ 'type' => Controls_Manager::URL,
400
+ 'placeholder' => 'https://your-link.com',
401
+ 'show_external' => false,
402
+ 'condition' => [
403
+ 'socials' => 'yes'
404
+ ],
405
+ 'dynamic' => [
406
+ 'active' => true
407
+ ]
408
  )
409
  );
410
 
919
  'social_delicious' => $settings['social_delicious']['url'],
920
  'social_pinterest' => $settings['social_pinterest']['url'],
921
  'social_github' => $settings['social_github']['url'],
922
+ 'social_instagram' => $settings['social_instagram']['url'],
923
 
924
  'icon_size' => $settings['icon_size'],
925
  'icon_align' => $settings['icon_align'],
includes/elementor/widgets/svg.php ADDED
@@ -0,0 +1,447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
+
4
+ use Elementor\Plugin;
5
+ use Elementor\Widget_Base;
6
+ use Elementor\Controls_Manager;
7
+ use Elementor\Group_Control_Image_Size;
8
+ use Elementor\Utils;
9
+ use Elementor\Group_Control_Border;
10
+ use Elementor\Group_Control_Background;
11
+ use Elementor\Group_Control_Box_Shadow;
12
+
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit; // Exit if accessed directly.
16
+ }
17
+
18
+ /**
19
+ * Elementor 'Simple_SVG' widget.
20
+ *
21
+ * Elementor widget that displays an 'Simple_SVG' with lightbox.
22
+ *
23
+ * @since 1.0.0
24
+ */
25
+ class Simple__SVG extends Widget_Base {
26
+
27
+ /**
28
+ * Get widget name.
29
+ *
30
+ * Retrieve 'Simple_SVG' widget name.
31
+ *
32
+ * @since 1.0.0
33
+ * @access public
34
+ *
35
+ * @return string Widget name.
36
+ */
37
+ public function get_name() {
38
+ return 'aux_simple_svg';
39
+ }
40
+
41
+ /**
42
+ * Get widget title.
43
+ *
44
+ * Retrieve 'Simple_SVG' widget title.
45
+ *
46
+ * @since 1.0.0
47
+ * @access public
48
+ *
49
+ * @return string Widget title.
50
+ */
51
+ public function get_title() {
52
+ return __('Simple SVG', 'auxin-elements' );
53
+ }
54
+
55
+ /**
56
+ * Get widget icon.
57
+ *
58
+ * Retrieve 'Simple_SVG' widget icon.
59
+ *
60
+ * @since 1.0.0
61
+ * @access public
62
+ *
63
+ * @return string Widget icon.
64
+ */
65
+ public function get_icon() {
66
+ return 'eicon-integration auxin-badge-pro';
67
+ }
68
+
69
+ /**
70
+ * Get widget categories.
71
+ *
72
+ * Retrieve 'Simple_SVG' widget icon.
73
+ *
74
+ * @since 1.0.0
75
+ * @access public
76
+ *
77
+ * @return string Widget icon.
78
+ */
79
+ public function get_categories() {
80
+ return array( 'auxin-pro' );
81
+ }
82
+
83
+ /**
84
+ * Register 'Simple_SVG' widget controls.
85
+ *
86
+ * Adds different input fields to allow the user to change and customize the widget settings.
87
+ *
88
+ * @since 1.0.0
89
+ * @access protected
90
+ */
91
+ protected function _register_controls() {
92
+
93
+ /*-----------------------------------------------------------------------------------*/
94
+ /* Content Tab
95
+ /*-----------------------------------------------------------------------------------*/
96
+
97
+ $this->start_controls_section(
98
+ 'svg_image_section',
99
+ array(
100
+ 'label' => __( 'SVG', 'auxin-elements' )
101
+ )
102
+ );
103
+
104
+ $this->add_control(
105
+ 'type',
106
+ array(
107
+ 'label' => __( 'Type', 'auxin-elements' ),
108
+ 'type' => Controls_Manager::SELECT,
109
+ 'options' => array(
110
+ 'image' => __( 'Image', 'auxin-elements' ),
111
+ 'inline' => __( 'Inline', 'auxin-elements' )
112
+ ),
113
+ 'default' => 'image'
114
+ )
115
+ );
116
+
117
+ $this->add_control(
118
+ 'image',
119
+ array(
120
+ 'label' => __( 'Choose Image', 'elementor' ),
121
+ 'type' => Controls_Manager::MEDIA,
122
+ 'default' => array(
123
+ 'url' => Utils::get_placeholder_image_src(),
124
+ ),
125
+ 'condition' => array(
126
+ 'type' => 'image'
127
+ )
128
+ )
129
+ );
130
+
131
+ $this->add_control(
132
+ 'inline',
133
+ array(
134
+ 'label' => '',
135
+ 'type' => Controls_Manager::CODE,
136
+ 'default' => '',
137
+ 'placeholder' => __( 'Enter inline SVG content here', 'elementor' ),
138
+ 'show_label' => false,
139
+ 'condition' => array(
140
+ 'type' => 'inline'
141
+ )
142
+ )
143
+ );
144
+
145
+ $this->end_controls_section();
146
+
147
+ /*-----------------------------------------------------------------------------------*/
148
+ /* Style Tab
149
+ /*-----------------------------------------------------------------------------------*/
150
+
151
+ $this->start_controls_section(
152
+ 'svg_style_section',
153
+ array(
154
+ 'label' => __( 'Style', 'auxin-elements' ),
155
+ 'tab' => Controls_Manager::TAB_STYLE
156
+ )
157
+ );
158
+
159
+ $this->add_responsive_control(
160
+ '_width',
161
+ array(
162
+ 'label' => __('Width','auxin-elements' ),
163
+ 'type' => Controls_Manager::SLIDER,
164
+ 'size_units' => array('px', 'em', '%'),
165
+ 'range' => array(
166
+ '%' => array(
167
+ 'min' => 1,
168
+ 'max' => 100,
169
+ 'step' => 1
170
+ ),
171
+ 'px' => array(
172
+ 'min' => 0,
173
+ 'max' => 1600,
174
+ 'step' => 1
175
+ ),
176
+ 'em' => array(
177
+ 'min' => 0,
178
+ 'step' => 1
179
+ )
180
+ ),
181
+ 'desktop_default' => array(
182
+ 'size' => 300,
183
+ 'unit' => 'px'
184
+ ),
185
+ 'selectors' => array(
186
+ '{{WRAPPER}} .aux-the-svg' => 'width:{{SIZE}}{{UNIT}};'
187
+ )
188
+ )
189
+ );
190
+
191
+ $this->add_responsive_control(
192
+ '_height',
193
+ array(
194
+ 'label' => __( 'Height','auxin-elements' ),
195
+ 'type' => Controls_Manager::SLIDER,
196
+ 'size_units' => array('px', 'em', '%'),
197
+ 'range' => array(
198
+ '%' => array(
199
+ 'min' => 1,
200
+ 'max' => 100,
201
+ 'step' => 1
202
+ ),
203
+ 'px' => array(
204
+ 'min' => 0,
205
+ 'max' => 1600,
206
+ 'step' => 1
207
+ ),
208
+ 'em' => array(
209
+ 'min' => 0,
210
+ 'step' => 1
211
+ )
212
+ ),
213
+ 'selectors' => array(
214
+ '{{WRAPPER}} .aux-the-svg' => 'height:{{SIZE}}{{UNIT}};'
215
+ )
216
+ )
217
+ );
218
+
219
+ $this->add_responsive_control(
220
+ '_max_width',
221
+ array(
222
+ 'label' => __('Max Width','auxin-elements' ),
223
+ 'type' => Controls_Manager::SLIDER,
224
+ 'size_units' => array('px', 'em', '%'),
225
+ 'range' => array(
226
+ '%' => array(
227
+ 'min' => 1,
228
+ 'max' => 100,
229
+ 'step' => 1
230
+ ),
231
+ 'px' => array(
232
+ 'min' => 0,
233
+ 'max' => 1600,
234
+ 'step' => 1
235
+ ),
236
+ 'em' => array(
237
+ 'min' => 0,
238
+ 'step' => 1
239
+ )
240
+ ),
241
+ 'selectors' => array(
242
+ '{{WRAPPER}} .aux-widget-container-inner' => 'max-width:{{SIZE}}{{UNIT}};'
243
+ )
244
+ )
245
+ );
246
+
247
+ $this->add_responsive_control(
248
+ '_max_height',
249
+ array(
250
+ 'label' => __('Max Height','auxin-elements' ),
251
+ 'type' => Controls_Manager::SLIDER,
252
+ 'size_units' => array('px', 'em','%'),
253
+ 'range' => array(
254
+ '%' => array(
255
+ 'min' => 1,
256
+ 'max' => 100,
257
+ 'step' => 1
258
+ ),
259
+ 'px' => array(
260
+ 'min' => 0,
261
+ 'max' => 2000,
262
+ 'step' => 10
263
+ ),
264
+ 'em' => array(
265
+ 'min' => 0,
266
+ 'step' => 1
267
+ )
268
+ ),
269
+ 'selectors' => array(
270
+ '{{WRAPPER}} .aux-widget-container-inner' => 'max-height:{{SIZE}}{{UNIT}};'
271
+ ),
272
+ 'separator' => 'after'
273
+ )
274
+ );
275
+
276
+ $this->add_responsive_control(
277
+ 'alignment',
278
+ array(
279
+ 'label' => __('Alignment', 'auxin-elements'),
280
+ 'type' => Controls_Manager::CHOOSE,
281
+ 'default' => 'center',
282
+ 'options' => array(
283
+ 'left' => array(
284
+ 'title' => __( 'Left', 'auxin-elements' ),
285
+ 'icon' => 'fa fa-align-left',
286
+ ),
287
+ 'center' => array(
288
+ 'title' => __( 'Center', 'auxin-elements' ),
289
+ 'icon' => 'fa fa-align-center',
290
+ ),
291
+ 'right' => array(
292
+ 'title' => __( 'Right', 'auxin-elements' ),
293
+ 'icon' => 'fa fa-align-right',
294
+ )
295
+ ),
296
+ 'selectors' => array(
297
+ '{{WRAPPER}} .aux-widget-container' => 'text-align: {{VALUE}};'
298
+ )
299
+ )
300
+ );
301
+
302
+ $this->add_responsive_control(
303
+ 'svg_border_radius',
304
+ array(
305
+ 'label' => __( 'Border radius', 'auxin-elements' ),
306
+ 'type' => Controls_Manager::DIMENSIONS,
307
+ 'size_units' => array( 'px', 'em', '%' ),
308
+ 'selectors' => array(
309
+ '{{WRAPPER}} .aux-the-svg > *' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
310
+ ),
311
+ 'separator' => 'after'
312
+ )
313
+ );
314
+
315
+ $this->start_controls_tabs( 'svg_style_tabs' );
316
+
317
+ $this->start_controls_tab(
318
+ 'svg_status_normal',
319
+ array(
320
+ 'label' => __( 'Normal' , 'auxin-elements' )
321
+ )
322
+ );
323
+
324
+ $this->add_group_control(
325
+ Group_Control_Box_Shadow::get_type(),
326
+ array(
327
+ 'name' => 'svg_box_shadow',
328
+ 'selector' => '{{WRAPPER}} .aux-the-svg > *',
329
+ 'separator' => 'none'
330
+ )
331
+ );
332
+
333
+ $this->add_group_control(
334
+ Group_Control_Border::get_type(),
335
+ array(
336
+ 'name' => 'svg_border',
337
+ 'selector' => '{{WRAPPER}} .aux-the-svg > *',
338
+ 'separator' => 'none'
339
+ )
340
+ );
341
+
342
+ $this->add_group_control(
343
+ Group_Control_Background::get_type(),
344
+ array(
345
+ 'name' => 'svg_background',
346
+ 'selector' => '{{WRAPPER}} .aux-the-svg > *',
347
+ 'separator' => 'none'
348
+ )
349
+ );
350
+
351
+ $this->end_controls_tab();
352
+
353
+
354
+ $this->start_controls_tab(
355
+ 'svg_status_hover',
356
+ array(
357
+ 'label' => __( 'Hover' , 'auxin-elements' )
358
+ )
359
+ );
360
+
361
+ $this->add_group_control(
362
+ Group_Control_Box_Shadow::get_type(),
363
+ array(
364
+ 'name' => 'svg_box_shadow_hover',
365
+ 'selector' => '{{WRAPPER}} .aux-the-svg:hover > *',
366
+ 'separator' => 'none'
367
+ )
368
+ );
369
+
370
+ $this->add_group_control(
371
+ Group_Control_Border::get_type(),
372
+ array(
373
+ 'name' => 'svg_border_hover',
374
+ 'selector' => '{{WRAPPER}} .aux-the-svg:hover > *',
375
+ 'separator' => 'none'
376
+ )
377
+ );
378
+
379
+ $this->add_group_control(
380
+ Group_Control_Background::get_type(),
381
+ array(
382
+ 'name' => 'svg_background_hover',
383
+ 'selector' => '{{WRAPPER}} .aux-the-svg:hover > *',
384
+ 'separator' => 'none'
385
+ )
386
+ );
387
+
388
+ $this->end_controls_tab();
389
+
390
+ $this->end_controls_tabs();
391
+
392
+ $this->end_controls_section();
393
+
394
+ }
395
+
396
+
397
+ /**
398
+ * Render the widget output on the frontend.
399
+ *
400
+ * Written in PHP and used to generate the final HTML.
401
+ *
402
+ */
403
+ protected function render() {
404
+ $settings = $this->get_settings_for_display();
405
+
406
+ if( 'image' == $settings['type'] ){
407
+ $content = Group_Control_Image_Size::get_attachment_image_html( $settings );
408
+ } else {
409
+ $content = $this->get_settings_for_display( 'inline' );
410
+ }
411
+ ?>
412
+ <div class="aux-widget-container aux-simple-svg-container">
413
+ <div class="aux-widget-container-inner">
414
+ <div class="aux-the-svg"><?php echo $content; ?></div>
415
+ </div>
416
+ </div>
417
+ <?php
418
+ }
419
+
420
+
421
+ /**
422
+ * Render the widget output in the editor.
423
+ *
424
+ * Written as a Backbone JavaScript template and used to generate the live preview.
425
+ *
426
+ */
427
+ protected function _content_template() {
428
+ ?>
429
+ <div class="aux-widget-container aux-simple-svg-container">
430
+ <div class="aux-widget-container-inner">
431
+ <div class="aux-the-svg">
432
+ <# if( settings.type == 'image' ){
433
+
434
+ if ( settings.image.url ) {
435
+ #><img src="{{ settings.image.url }}" /><#
436
+ }
437
+
438
+ } else { #>
439
+ {{{ settings.inline }}}
440
+ <# } #>
441
+ </div>
442
+ </div>
443
+ </div>
444
+ <?php
445
+ }
446
+
447
+ }
includes/elementor/widgets/tabs.php CHANGED
@@ -4,12 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Box_Shadow;
15
  use Elementor\Group_Control_Background;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
10
  use Elementor\Group_Control_Box_Shadow;
11
  use Elementor\Group_Control_Background;
includes/elementor/widgets/testimonial.php CHANGED
@@ -6,10 +6,8 @@ use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
  use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Box_Shadow;
15
  use Elementor\Group_Control_Background;
@@ -222,7 +220,10 @@ class Testimonial extends Widget_Base {
222
  'label' => __('Customer Link','auxin-elements'),
223
  'type' => Controls_Manager::URL,
224
  'show_external' => false,
225
- 'placeholder' => 'http://phlox.pro'
 
 
 
226
  )
227
  );
228
 
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
 
9
  use Elementor\Scheme_Typography;
10
  use Elementor\Utils;
 
11
  use Elementor\Group_Control_Border;
12
  use Elementor\Group_Control_Box_Shadow;
13
  use Elementor\Group_Control_Background;
220
  'label' => __('Customer Link','auxin-elements'),
221
  'type' => Controls_Manager::URL,
222
  'show_external' => false,
223
+ 'placeholder' => 'http://phlox.pro',
224
+ 'dynamic' => [
225
+ 'active' => true
226
+ ]
227
  )
228
  );
229
 
includes/elementor/widgets/text.php CHANGED
@@ -6,10 +6,7 @@ use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Box_Shadow;
15
  use Elementor\Group_Control_Text_Shadow;
@@ -117,7 +114,7 @@ class Text extends Widget_Base {
117
  'options' => array(
118
  'none' => __( 'None' , 'auxin-elements' ),
119
  'icon' => __( 'Icon' , 'auxin-elements' ),
120
- 'image' => __( 'Image' , 'auxin-elements' )
121
  )
122
  )
123
  );
@@ -202,6 +199,20 @@ class Text extends Widget_Base {
202
  )
203
  );
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  $this->end_controls_section();
206
 
207
  /* content_section
@@ -238,7 +249,10 @@ class Text extends Widget_Base {
238
  'label' => __('Title Link','auxin-elements' ),
239
  'type' => Controls_Manager::URL,
240
  'placeholder' => 'http://phlox.pro',
241
- 'show_external' => false
 
 
 
242
  )
243
  );
244
 
@@ -308,9 +322,12 @@ class Text extends Widget_Base {
308
  'type' => Controls_Manager::URL,
309
  'placeholder' => 'http://phlox.pro',
310
  'show_external' => true,
311
- 'condition' => array(
312
  'display_button' => 'yes',
313
- )
 
 
 
314
  )
315
  );
316
 
@@ -329,7 +346,7 @@ class Text extends Widget_Base {
329
  'label' => __('Header', 'auxin-elements' ),
330
  'tab' => Controls_Manager::TAB_STYLE,
331
  'condition' => array(
332
- 'icon_or_image' => array( 'icon', 'image' )
333
  )
334
  )
335
  );
@@ -391,7 +408,7 @@ class Text extends Widget_Base {
391
  'label' => __('Icon/Image', 'auxin-elements' ),
392
  'tab' => Controls_Manager::TAB_STYLE,
393
  'condition' => array(
394
- 'icon_or_image' => array( 'icon', 'image' )
395
  )
396
  )
397
  );
@@ -1523,6 +1540,7 @@ class Text extends Widget_Base {
1523
  'img_shape' => $settings['img_shape'],
1524
  'icon_border_width' => '',
1525
  'image_position' => $settings['image_position'],
 
1526
 
1527
  'text_align' => $settings['text_align'],
1528
  'text_align_resp' => $settings['text_align_mobile'],
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
 
9
  use Elementor\Scheme_Typography;
 
 
10
  use Elementor\Group_Control_Border;
11
  use Elementor\Group_Control_Box_Shadow;
12
  use Elementor\Group_Control_Text_Shadow;
114
  'options' => array(
115
  'none' => __( 'None' , 'auxin-elements' ),
116
  'icon' => __( 'Icon' , 'auxin-elements' ),
117
+ 'inline-svg' => __( 'Inline SVG' , 'auxin-elements' )
118
  )
119
  )
120
  );
199
  )
200
  );
201
 
202
+ $this->add_control(
203
+ 'svg_inline',
204
+ array(
205
+ 'label' => '',
206
+ 'type' => Controls_Manager::CODE,
207
+ 'default' => '',
208
+ 'placeholder' => __( 'Enter inline SVG content here', 'auxin-elements' ),
209
+ 'show_label' => false,
210
+ 'condition' => array(
211
+ 'icon_or_image' => 'inline-svg'
212
+ )
213
+ )
214
+ );
215
+
216
  $this->end_controls_section();
217
 
218
  /* content_section
249
  'label' => __('Title Link','auxin-elements' ),
250
  'type' => Controls_Manager::URL,
251
  'placeholder' => 'http://phlox.pro',
252
+ 'show_external' => false,
253
+ 'dynamic' => [
254
+ 'active' => true
255
+ ]
256
  )
257
  );
258
 
322
  'type' => Controls_Manager::URL,
323
  'placeholder' => 'http://phlox.pro',
324
  'show_external' => true,
325
+ 'condition' => [
326
  'display_button' => 'yes',
327
+ ],
328
+ 'dynamic' => [
329
+ 'active' => true
330
+ ]
331
  )
332
  );
333
 
346
  'label' => __('Header', 'auxin-elements' ),
347
  'tab' => Controls_Manager::TAB_STYLE,
348
  'condition' => array(
349
+ 'icon_or_image' => array( 'icon', 'image', 'inline-svg' )
350
  )
351
  )
352
  );
408
  'label' => __('Icon/Image', 'auxin-elements' ),
409
  'tab' => Controls_Manager::TAB_STYLE,
410
  'condition' => array(
411
+ 'icon_or_image' => array( 'icon', 'image', 'inline-svg' )
412
  )
413
  )
414
  );
1540
  'img_shape' => $settings['img_shape'],
1541
  'icon_border_width' => '',
1542
  'image_position' => $settings['image_position'],
1543
+ 'icon_svg_inline' => $settings['svg_inline'],
1544
 
1545
  'text_align' => $settings['text_align'],
1546
  'text_align_resp' => $settings['text_align_mobile'],
includes/elementor/widgets/theme-elements/copyright.php ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_Elements;
3
+
4
+ use Elementor\Plugin;
5
+ use Elementor\Widget_Base;
6
+ use Elementor\Controls_Manager;
7
+ use Elementor\Group_Control_Typography;
8
+ use Elementor\Scheme_Typography;
9
+ use Elementor\Group_Control_Text_Shadow;
10
+
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit; // Exit if accessed directly.
14
+ }
15
+
16
+ /**
17
+ * Elementor 'Copyright' widget.
18
+ *
19
+ * Elementor widget that displays an 'Copyright'.
20
+ *
21
+ * @since 1.0.0
22
+ */
23
+ class Copyright extends Widget_Base {
24
+
25
+ /**
26
+ * Get widget name.
27
+ *
28
+ * Retrieve 'Copyright' widget name.
29
+ *
30
+ * @since 1.0.0
31
+ * @access public
32
+ *
33
+ * @return string Widget name.
34
+ */
35
+ public function get_name() {
36
+ return 'aux_copyright';
37
+ }
38
+
39
+ /**
40
+ * Get widget title.
41
+ *
42
+ * Retrieve 'Copyright' widget title.
43
+ *
44
+ * @since 1.0.0
45
+ * @access public
46
+ *
47
+ * @return string Widget title.
48
+ */
49
+ public function get_title() {
50
+ return __('Copyright', 'auxin-elements' );
51
+ }
52
+
53
+ /**
54
+ * Get widget icon.
55
+ *
56
+ * Retrieve 'Copyright' widget icon.
57
+ *
58
+ * @since 1.0.0
59
+ * @access public
60
+ *
61
+ * @return string Widget icon.
62
+ */
63
+ public function get_icon() {
64
+ return 'eicon-t-letter auxin-badge';
65
+ }
66
+
67
+ /**
68
+ * Get widget categories.
69
+ *
70
+ * Retrieve 'Copyright' widget icon.
71
+ *
72
+ * @since 1.0.0
73
+ * @access public
74
+ *
75
+ * @return string Widget icon.
76
+ */
77
+ public function get_categories() {
78
+ return array( 'auxin-core', 'auxin-theme-elements' );
79
+ }
80
+
81
+ /**
82
+ * Register 'Copyright' widget controls.
83
+ *
84
+ * Adds different input fields to allow the user to change and customize the widget settings.
85
+ *
86
+ * @since 1.0.0
87
+ * @access protected
88
+ */
89
+ protected function _register_controls() {
90
+
91
+ $this->start_controls_section(
92
+ 'general',
93
+ array(
94
+ 'label' => __('General', 'auxin-elements' ),
95
+ )
96
+ );
97
+
98
+ $this->add_control(
99
+ 'copyright_notice',
100
+ array(
101
+ 'type' => Controls_Manager::RAW_HTML,
102
+ 'raw' => sprintf( __( '<strong>Your copyright text is set it from customizer</strong><br>Go to the <a href="%s" target="_blank">Customizer</a> to change it.', 'auxin-elements' ), admin_url( 'customize.php' ) ),
103
+ 'separator' => 'after',
104
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
105
+ )
106
+ );
107
+
108
+ $this->add_responsive_control(
109
+ 'align',
110
+ array(
111
+ 'label' => __( 'Alignment', 'auxin-elements' ),
112
+ 'type' => Controls_Manager::CHOOSE,
113
+ 'options' => array(
114
+ 'left' => array(
115
+ 'title' => __( 'Left', 'auxin-elements' ),
116
+ 'icon' => 'eicon-text-align-left',
117
+ ),
118
+ 'center' => array(
119
+ 'title' => __( 'Center', 'auxin-elements' ),
120
+ 'icon' => 'eicon-text-align-center',
121
+ ),
122
+ 'right' => array(
123
+ 'title' => __( 'Right', 'auxin-elements' ),
124
+ 'icon' => 'eicon-text-align-right',
125
+ ),
126
+ ),
127
+ 'selectors' => array(
128
+ '{{WRAPPER}}' => 'text-align: {{VALUE}};',
129
+ ),
130
+ )
131
+ );
132
+
133
+ $this->end_controls_section();
134
+
135
+ $this->start_controls_section(
136
+ 'section_style_copyright',
137
+ array(
138
+ 'label' => __( 'Copyright', 'auxin-elements' ),
139
+ 'tab' => Controls_Manager::TAB_STYLE,
140
+ )
141
+ );
142
+
143
+ $this->start_controls_tabs( 'copyright_colors' );
144
+
145
+ $this->start_controls_tab(
146
+ 'copyright_color_normal',
147
+ array(
148
+ 'label' => __( 'Normal' , 'auxin-elements' )
149
+ )
150
+ );
151
+
152
+ $this->add_control(
153
+ 'copyright_color',
154
+ array(
155
+ 'label' => __( 'Color', 'auxin-elements' ),
156
+ 'type' => Controls_Manager::COLOR,
157
+ 'selectors' => array(
158
+ '{{WRAPPER}} small' => 'color: {{VALUE}};'
159
+ )
160
+ )
161
+ );
162
+
163
+ $this->add_group_control(
164
+ Group_Control_Typography::get_type(),
165
+ array(
166
+ 'name' => 'copyright_typo',
167
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
168
+ 'selector' => '{{WRAPPER}} small'
169
+ )
170
+ );
171
+
172
+ $this->add_group_control(
173
+ Group_Control_Text_Shadow::get_type(),
174
+ [
175
+ 'name' => 'copyright_text_shadow',
176
+ 'selector' => '{{WRAPPER}} small'
177
+ ]
178
+ );
179
+
180
+ $this->end_controls_tab();
181
+
182
+ $this->start_controls_tab(
183
+ 'copyright_color_hover',
184
+ array(
185
+ 'label' => __( 'Hover' , 'auxin-elements' )
186
+ )
187
+ );
188
+
189
+ $this->add_control(
190
+ 'copyright_hover_color',
191
+ array(
192
+ 'label' => __( 'Color', 'auxin-elements' ),
193
+ 'type' => Controls_Manager::COLOR,
194
+ 'selectors' => array(
195
+ '{{WRAPPER}} small:hover' => 'color: {{VALUE}} !important;'
196
+ )
197
+ )
198
+ );
199
+
200
+ $this->add_group_control(
201
+ Group_Control_Typography::get_type(),
202
+ array(
203
+ 'name' => 'copyright_typo_hover',
204
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
205
+ 'selector' => '{{WRAPPER}} small:hover',
206
+ )
207
+ );
208
+
209
+ $this->add_group_control(
210
+ Group_Control_Text_Shadow::get_type(),
211
+ [
212
+ 'name' => 'copyright_text_shadow_hover',
213
+ 'selector' => '{{WRAPPER}} small:hover'
214
+ ]
215
+ );
216
+
217
+ $this->end_controls_tab();
218
+
219
+ $this->end_controls_tabs();
220
+
221
+ $this->end_controls_section();
222
+
223
+
224
+ }
225
+
226
+ /**
227
+ * Render image box widget output on the frontend.
228
+ *
229
+ * Written in PHP and used to generate the final HTML.
230
+ *
231
+ * @since 1.0.0
232
+ * @access protected
233
+ */
234
+ protected function render() {
235
+ $settings = $this->get_settings_for_display();
236
+
237
+ auxin_footer_copyright_markup( true );
238
+ }
239
+
240
+ }
includes/elementor/widgets/theme-elements/current-time.php CHANGED
@@ -4,15 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
- use Elementor\Group_Control_Background;
15
- use Elementor\Group_Control_Box_Shadow;
16
  use Elementor\Group_Control_Text_Shadow;
17
 
18
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
 
 
9
  use Elementor\Group_Control_Text_Shadow;
10
 
11
 
includes/elementor/widgets/theme-elements/logo.php CHANGED
@@ -6,12 +6,8 @@ use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
- use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
16
  use Elementor\Group_Control_Text_Shadow;
17
  use Elementor\Group_Control_Css_Filter;
@@ -109,7 +105,7 @@ class Logo extends Widget_Base {
109
 
110
  $custom_logo_id = get_theme_mod( 'custom_logo' );
111
 
112
-
113
  if ( empty( $custom_logo_id ) ) {
114
  $this->add_control(
115
  'custom_logo_page',
@@ -124,14 +120,28 @@ class Logo extends Widget_Base {
124
  $this->add_control(
125
  'custom_logo_page',
126
  array(
127
- 'type' => Controls_Manager::RAW_HTML,
128
- 'raw' => sprintf( __( '<strong>Your site logo is set it from customizer</strong><br>Go to the <a href="%s" target="_blank">Customizer</a> to change it.', 'auxin-elements' ), admin_url( 'customize.php' ) ),
 
129
  'separator' => 'after',
130
  'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
131
  )
132
- );
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  $this->add_group_control(
136
  Group_Control_Image_Size::get_type(),
137
  array(
@@ -140,7 +150,7 @@ class Logo extends Widget_Base {
140
  'separator' => 'none',
141
  )
142
  );
143
-
144
  $this->add_responsive_control(
145
  'align',
146
  array(
@@ -165,7 +175,7 @@ class Logo extends Widget_Base {
165
  ),
166
  )
167
  );
168
-
169
  $this->add_control(
170
  'link_to',
171
  array(
@@ -184,8 +194,11 @@ class Logo extends Widget_Base {
184
  'link',
185
  array(
186
  'label' => __( 'Link', 'auxin-elements' ),
187
- 'type' => Controls_Manager::URL,
188
- 'placeholder' => __( 'https://your-link.com', 'auxin-elements' ),
 
 
 
189
  'condition' => array(
190
  'link_to' => 'custom',
191
  ),
@@ -395,7 +408,7 @@ class Logo extends Widget_Base {
395
  );
396
 
397
  $this->end_controls_section();
398
-
399
  $this->start_controls_section(
400
  'section_style_title',
401
  array(
@@ -595,6 +608,7 @@ class Logo extends Widget_Base {
595
  $settings = $this->get_settings_for_display();
596
  $logo_desc = get_bloginfo( 'description' );
597
  $custom_logo_id = get_theme_mod( 'custom_logo' );
 
598
  $blog_display_name = get_bloginfo( 'name', 'display' );
599
  $blog_name = get_bloginfo( 'name' );
600
  $home_url = home_url( '/' );
@@ -612,36 +626,39 @@ class Logo extends Widget_Base {
612
  $link_attr['href'] = esc_url ( wp_get_attachment_url( $custom_logo_id ) ) ;
613
  } else {
614
  $link_attr['href'] = esc_url ( $settings['link']['url'] ) ;
615
-
616
  if ( auxin_is_true( $settings['link']['is_external'] ) ) {
617
  $link_attr['target'] = '_blank';
618
  }
619
-
620
  if ( auxin_is_true( $settings['link']['nofollow'] ) ) {
621
  $link_attr['rel'] = 'nofollow';
622
  }
623
  }
624
-
625
  $link_attr = auxin_make_html_attributes( $link_attr );
626
-
627
  if ( $custom_logo_id ) {
628
-
 
 
 
629
  if ( $settings['image_custom_dimension'] ) {
630
  $image_size = $settings['image_custom_dimension'];
631
  } else {
632
  $image_size = $settings['image_size'];
633
  }
634
 
635
- $logo_image_markup = auxin_get_the_responsive_attachment( $custom_logo_id,
636
  array(
637
  'quality' => 100,
638
  'size' => $image_size,
639
  'crop' => true,
640
  'add_hw' => true,
641
- 'upscale' => false
642
  )
643
  );
644
-
645
  $logo_markup = '<a ' . $link_attr . ' >' . $logo_image_markup . '</a>';
646
  }
647
 
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
 
9
  use Elementor\Scheme_Typography;
 
 
10
  use Elementor\Group_Control_Border;
 
11
  use Elementor\Group_Control_Box_Shadow;
12
  use Elementor\Group_Control_Text_Shadow;
13
  use Elementor\Group_Control_Css_Filter;
105
 
106
  $custom_logo_id = get_theme_mod( 'custom_logo' );
107
 
108
+
109
  if ( empty( $custom_logo_id ) ) {
110
  $this->add_control(
111
  'custom_logo_page',
120
  $this->add_control(
121
  'custom_logo_page',
122
  array(
123
+ 'type'=> Controls_Manager::RAW_HTML,
124
+ 'raw' => '<strong>'. __( 'Your site logo is set in customizer.', 'auxin-elements' ). '</strong><br>'.
125
+ sprintf( __( 'Go to %s Customizer %s to change it.', 'auxin-elements' ), '<a href="'. admin_url( 'customize.php' ) .' target="_blank">', "</a>" ),
126
  'separator' => 'after',
127
  'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
128
  )
129
+ );
130
  }
131
 
132
+ $this->add_control(
133
+ 'logo_type',
134
+ array(
135
+ 'label' => __( 'Type', 'auxin-elements' ),
136
+ 'type' => Controls_Manager::SELECT,
137
+ 'default' => 'primary',
138
+ 'options' => array(
139
+ 'primary' => __( 'Primary', 'auxin-elements' ),
140
+ 'secondary' => __( 'Secondary', 'auxin-elements' ),
141
+ ),
142
+ )
143
+ );
144
+
145
  $this->add_group_control(
146
  Group_Control_Image_Size::get_type(),
147
  array(
150
  'separator' => 'none',
151
  )
152
  );
153
+
154
  $this->add_responsive_control(
155
  'align',
156
  array(
175
  ),
176
  )
177
  );
178
+
179
  $this->add_control(
180
  'link_to',
181
  array(
194
  'link',
195
  array(
196
  'label' => __( 'Link', 'auxin-elements' ),
197
+ 'type' => Controls_Manager::URL,
198
+ 'placeholder' => __( 'https://your-link.com', 'auxin-elements' ),
199
+ 'dynamic' => [
200
+ 'active' => true
201
+ ],
202
  'condition' => array(
203
  'link_to' => 'custom',
204
  ),
408
  );
409
 
410
  $this->end_controls_section();
411
+
412
  $this->start_controls_section(
413
  'section_style_title',
414
  array(
608
  $settings = $this->get_settings_for_display();
609
  $logo_desc = get_bloginfo( 'description' );
610
  $custom_logo_id = get_theme_mod( 'custom_logo' );
611
+ $secondary_logo_id = auxin_get_option('custom_logo2');
612
  $blog_display_name = get_bloginfo( 'name', 'display' );
613
  $blog_name = get_bloginfo( 'name' );
614
  $home_url = home_url( '/' );
626
  $link_attr['href'] = esc_url ( wp_get_attachment_url( $custom_logo_id ) ) ;
627
  } else {
628
  $link_attr['href'] = esc_url ( $settings['link']['url'] ) ;
629
+
630
  if ( auxin_is_true( $settings['link']['is_external'] ) ) {
631
  $link_attr['target'] = '_blank';
632
  }
633
+
634
  if ( auxin_is_true( $settings['link']['nofollow'] ) ) {
635
  $link_attr['rel'] = 'nofollow';
636
  }
637
  }
638
+
639
  $link_attr = auxin_make_html_attributes( $link_attr );
640
+
641
  if ( $custom_logo_id ) {
642
+
643
+ $logo_image_markup = '';
644
+ $logo_id = 'primary' === $settings['logo_type'] ? $custom_logo_id : $secondary_logo_id;
645
+
646
  if ( $settings['image_custom_dimension'] ) {
647
  $image_size = $settings['image_custom_dimension'];
648
  } else {
649
  $image_size = $settings['image_size'];
650
  }
651
 
652
+ $logo_image_markup = auxin_get_the_responsive_attachment( $logo_id,
653
  array(
654
  'quality' => 100,
655
  'size' => $image_size,
656
  'crop' => true,
657
  'add_hw' => true,
658
+ 'upscale' => false
659
  )
660
  );
661
+
662
  $logo_markup = '<a ' . $link_attr . ' >' . $logo_image_markup . '</a>';
663
  }
664
 
includes/elementor/widgets/theme-elements/menu.php CHANGED
@@ -4,12 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
@@ -131,13 +127,16 @@ class MenuBox extends Widget_Base {
131
  $this->add_control(
132
  'menu_slug',
133
  array(
134
- 'label' => __( 'Menu', 'auxin-elements' ),
135
- 'type' => Controls_Manager::SELECT,
136
- 'options' => $menus,
137
- 'default' => array_keys( $menus )[0],
138
  'save_default' => true,
139
- 'separator' => 'after',
140
- 'description' => sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus.', 'auxin-elements' ), admin_url( 'nav-menus.php' ) ),
 
 
 
141
  )
142
  );
143
  } else {
@@ -145,8 +144,7 @@ class MenuBox extends Widget_Base {
145
  'menu_slug',
146
  array(
147
  'type' => Controls_Manager::RAW_HTML,
148
- 'raw' => sprintf( __( '<strong>There are no menus in your site.</strong><br>Go to the <a href="%s" target="_blank">Menus screen</a> to create one.', 'auxin-elements' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
149
- 'separator' => 'after',
150
  'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
151
  )
152
  );
@@ -163,7 +161,7 @@ class MenuBox extends Widget_Base {
163
  'vertical' => __('Vertical' , 'auxin-elements' ),
164
  'burger' => __('Burger' , 'auxin-elements' )
165
  ),
166
- 'condition' => array(
167
  'menu_slug!' => ''
168
  )
169
  )
@@ -178,7 +176,6 @@ class MenuBox extends Widget_Base {
178
  'label_off' => __( 'Off', 'auxin-elements' ),
179
  'return_value' => 'yes',
180
  'default' => 'yes',
181
- 'separator' => 'before',
182
  'condition' => array(
183
  'type' => 'horizontal'
184
  )
@@ -197,16 +194,26 @@ class MenuBox extends Widget_Base {
197
  )
198
  );
199
 
 
 
 
 
 
 
 
 
 
200
  $this->add_control(
201
  'display_burger',
202
  array(
203
- 'label' => __('Display Burger Toggle on', 'auxin-elements'),
 
204
  'type' => Controls_Manager::SELECT,
205
  'default' => '768',
206
  'options' => array(
207
- '1024' => __('Tablet' , 'auxin-elements' ),
208
- '768' => __('Mobile' , 'auxin-elements' ),
209
- 'custom' => __('Custom' , 'auxin-elements' )
210
  ),
211
  'condition' => array(
212
  'menu_slug!' => ''
@@ -217,7 +224,7 @@ class MenuBox extends Widget_Base {
217
  $this->add_control(
218
  'breakpoint',
219
  array(
220
- 'label' => __('BreakPoint','auxin-elements' ),
221
  'type' => Controls_Manager::SLIDER,
222
  'size_units' => array('px'),
223
  'range' => array(
@@ -229,7 +236,7 @@ class MenuBox extends Widget_Base {
229
  ),
230
  'default' => array(
231
  'unit' => 'px',
232
- 'size' => 768,
233
  ),
234
  'separator' => 'before',
235
  'condition' => array(
@@ -242,9 +249,9 @@ class MenuBox extends Widget_Base {
242
  $this->add_control(
243
  'burger_menu_location',
244
  array(
245
- 'label' => __('Burger Menu Location','auxin-elements' ),
246
  'type' => 'aux-visual-select',
247
- 'style_items' => 'max-width:45%;',
248
  'options' => array(
249
  'toggle-bar' => array(
250
  'label' => __( 'Expandable under top header', 'auxin-elements' ),
@@ -267,7 +274,7 @@ class MenuBox extends Widget_Base {
267
  $this->add_control(
268
  'offcanvas_align',
269
  array(
270
- 'label' => __('Offcanvas Alignment', 'auxin-elements'),
271
  'type' => Controls_Manager::SELECT,
272
  'default' => 'left',
273
  'options' => array(
@@ -283,13 +290,14 @@ class MenuBox extends Widget_Base {
283
  $this->add_control(
284
  'burger_toggle_type',
285
  array(
286
- 'label' => __('Burger Menu Toggle Type', 'auxin-elements'),
 
287
  'type' => Controls_Manager::SELECT,
288
  'default' => 'toggle',
289
  'options' => array(
290
  'toggle' => __('Toggle' , 'auxin-elements' ),
291
  'accordion' => __('Accordion' , 'auxin-elements' )
292
- ),
293
  )
294
  );
295
 
@@ -310,6 +318,34 @@ class MenuBox extends Widget_Base {
310
  )
311
  );
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  $this->start_controls_tabs( 'item_colors' );
314
 
315
  $this->start_controls_tab(
@@ -325,17 +361,33 @@ class MenuBox extends Widget_Base {
325
  'label' => __( 'Color', 'auxin-elements' ),
326
  'type' => Controls_Manager::COLOR,
327
  'selectors' => array(
328
- '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content' => 'color: {{VALUE}} !important;',
329
- ),
330
  )
331
  );
332
-
333
  $this->add_group_control(
334
  Group_Control_Typography::get_type(),
335
  array(
336
  'name' => 'menu_item_typo',
337
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
338
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  )
340
  );
341
 
@@ -350,10 +402,11 @@ class MenuBox extends Widget_Base {
350
  );
351
 
352
  $this->add_group_control(
353
- Group_Control_Box_Shadow::get_type(),
354
  array(
355
- 'name' => 'item_box_shadow',
356
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0'
 
357
  )
358
  );
359
 
@@ -366,16 +419,7 @@ class MenuBox extends Widget_Base {
366
  'selectors' => array(
367
  '{{WRAPPER}} .aux-menu-depth-0' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
368
  ),
369
- 'allowed_dimensions' => 'all',
370
- )
371
- );
372
-
373
- $this->add_group_control(
374
- Group_Control_Border::get_type(),
375
- array(
376
- 'name' => 'item_border',
377
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0',
378
- 'separator' => 'none'
379
  )
380
  );
381
 
@@ -395,7 +439,7 @@ class MenuBox extends Widget_Base {
395
  'type' => Controls_Manager::COLOR,
396
  'selectors' => array(
397
  '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content ' => 'color: {{VALUE}} !important;'
398
- ),
399
  )
400
  );
401
 
@@ -404,7 +448,23 @@ class MenuBox extends Widget_Base {
404
  array(
405
  'name' => 'menu_item_typo_hover',
406
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
407
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover> .aux-item-content',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  )
409
  );
410
 
@@ -419,10 +479,11 @@ class MenuBox extends Widget_Base {
419
  );
420
 
421
  $this->add_group_control(
422
- Group_Control_Box_Shadow::get_type(),
423
  array(
424
- 'name' => 'hover_item_box_shadow',
425
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover'
 
426
  )
427
  );
428
 
@@ -439,14 +500,6 @@ class MenuBox extends Widget_Base {
439
  )
440
  );
441
 
442
- $this->add_group_control(
443
- Group_Control_Border::get_type(),
444
- array(
445
- 'name' => 'item_hover_border',
446
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover',
447
- 'separator' => 'none'
448
- )
449
- );
450
 
451
  $this->end_controls_tab();
452
 
@@ -479,38 +532,69 @@ class MenuBox extends Widget_Base {
479
  )
480
  );
481
 
482
- $this->add_responsive_control(
483
- 'align',
 
 
 
 
 
484
  array(
485
- 'label' => __('Text Align','auxin-elements'),
486
- 'type' => Controls_Manager::CHOOSE,
487
- 'devices' => array( 'desktop', 'mobile' ),
488
- 'options' => array(
489
- 'left' => array(
490
- 'title' => __( 'Left', 'auxin-elements' ),
491
- 'icon' => 'fa fa-align-left',
492
- ),
493
- 'center' => array(
494
- 'title' => __( 'Center', 'auxin-elements' ),
495
- 'icon' => 'fa fa-align-center',
496
- ),
497
- 'right' => array(
498
- 'title' => __( 'Right', 'auxin-elements' ),
499
- 'icon' => 'fa fa-align-right',
500
- ),
501
  ),
502
- 'default' => 'left',
503
- 'toggle' => true,
504
- 'selectors' => array(
505
- '{{WRAPPER}}' => 'text-align: {{VALUE}}',
506
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  )
508
  );
509
 
510
  $this->end_controls_section();
511
 
512
 
513
- /* submenu Section
514
  /*-------------------------------------*/
515
 
516
  $this->start_controls_section(
@@ -524,7 +608,7 @@ class MenuBox extends Widget_Base {
524
  $this->add_control(
525
  'submenu_skin',
526
  array(
527
- 'label' => __('Submenu Skin','auxin-elements' ),
528
  'type' => 'aux-visual-select',
529
  'style_items' => 'max-width:45%;',
530
  'options' => array(
@@ -561,9 +645,9 @@ class MenuBox extends Widget_Base {
561
  $this->add_control(
562
  'submenu_anim',
563
  array(
564
- 'label' => __('Submenu Animation Effect','auxin-elements' ),
565
  'type' => 'aux-visual-select',
566
- 'style_items' => 'max-width:45%;',
567
  'options' => array(
568
  'none' => array(
569
  'label' => __( 'None', 'auxin-elements' ),
@@ -586,7 +670,7 @@ class MenuBox extends Widget_Base {
586
  $this->start_controls_tabs( 'sub_background_tab' );
587
 
588
  $this->start_controls_tab(
589
- 'sub_bg_normal',
590
  array(
591
  'label' => __( 'Normal' , 'auxin-elements' )
592
  )
@@ -635,7 +719,7 @@ class MenuBox extends Widget_Base {
635
  $this->end_controls_tab();
636
 
637
  $this->start_controls_tab(
638
- 'sub_bg_hover',
639
  array(
640
  'label' => __( 'Hover' , 'auxin-elements' )
641
  )
@@ -694,7 +778,7 @@ class MenuBox extends Widget_Base {
694
  $this->start_controls_section(
695
  'submenu_item_section',
696
  array(
697
- 'label' => __( 'SubMenu Item', 'auxin-elements' ),
698
  'tab' => Controls_Manager::TAB_STYLE
699
  )
700
  );
@@ -730,13 +814,11 @@ class MenuBox extends Widget_Base {
730
  );
731
 
732
  $this->add_group_control(
733
- Group_Control_Background::get_type(),
734
- array(
735
- 'name' => 'sub_item_background',
736
- 'label' => __( 'Background', 'auxin-elements' ),
737
- 'types' => array( 'classic', 'gradient' ),
738
- 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
739
- )
740
  );
741
 
742
  $this->add_group_control(
@@ -747,6 +829,17 @@ class MenuBox extends Widget_Base {
747
  )
748
  );
749
 
 
 
 
 
 
 
 
 
 
 
 
750
  $this->add_responsive_control(
751
  'sub_item_border_radius',
752
  array(
@@ -800,13 +893,11 @@ class MenuBox extends Widget_Base {
800
  );
801
 
802
  $this->add_group_control(
803
- Group_Control_Background::get_type(),
804
- array(
805
- 'name' => 'hover_sub_item_background',
806
- 'label' => __( 'Background', 'auxin-elements' ),
807
- 'types' => array( 'classic', 'gradient' ),
808
- 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
809
- )
810
  );
811
 
812
  $this->add_group_control(
@@ -817,6 +908,16 @@ class MenuBox extends Widget_Base {
817
  )
818
  );
819
 
 
 
 
 
 
 
 
 
 
 
820
  $this->add_responsive_control(
821
  'sub_item_hover_border_radius',
822
  array(
@@ -895,8 +996,8 @@ class MenuBox extends Widget_Base {
895
  ),
896
  )
897
  );
898
-
899
- $this->start_controls_tabs(
900
  'burger_color',
901
  array(
902
  'condition' => array(
@@ -1056,7 +1157,7 @@ class MenuBox extends Widget_Base {
1056
  'label' => __( 'Color', 'auxin-elements' ),
1057
  'type' => Controls_Manager::COLOR,
1058
  'selectors' => array(
1059
- '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'color: {{VALUE}} !important;',
1060
  ),
1061
  'seperartor' => 'after'
1062
  )
@@ -1072,13 +1173,11 @@ class MenuBox extends Widget_Base {
1072
  );
1073
 
1074
  $this->add_group_control(
1075
- Group_Control_Background::get_type(),
1076
- array(
1077
- 'name' => 'fullscr_item_background',
1078
- 'label' => __( 'Background', 'auxin-elements' ),
1079
- 'types' => array( 'classic', 'gradient' ),
1080
- 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item '
1081
- )
1082
  );
1083
 
1084
  $this->add_group_control(
@@ -1089,6 +1188,16 @@ class MenuBox extends Widget_Base {
1089
  )
1090
  );
1091
 
 
 
 
 
 
 
 
 
 
 
1092
  $this->add_responsive_control(
1093
  'fullscr_item_border_radius',
1094
  array(
@@ -1126,7 +1235,7 @@ class MenuBox extends Widget_Base {
1126
  'label' => __( 'Color', 'auxin-elements' ),
1127
  'type' => Controls_Manager::COLOR,
1128
  'selectors' => array(
1129
- '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content' => 'color: {{VALUE}} !important;'
1130
  ),
1131
  'seperartor' => 'after'
1132
  )
@@ -1137,25 +1246,33 @@ class MenuBox extends Widget_Base {
1137
  array(
1138
  'name' => 'fullscr_menu_item_typo_hover',
1139
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1140
- 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content',
1141
  )
1142
  );
1143
 
1144
  $this->add_group_control(
1145
- Group_Control_Background::get_type(),
1146
- array(
1147
- 'name' => 'fullscr_hover_item_background',
1148
- 'label' => __( 'Background', 'auxin-elements' ),
1149
- 'types' => array( 'classic', 'gradient' ),
1150
- 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1151
- )
1152
  );
1153
 
1154
  $this->add_group_control(
1155
  Group_Control_Box_Shadow::get_type(),
1156
  array(
1157
  'name' => 'fullscr_hover_item_box_shadow',
1158
- 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
 
 
 
 
 
 
 
 
 
 
1159
  )
1160
  );
1161
 
@@ -1236,10 +1353,39 @@ class MenuBox extends Widget_Base {
1236
  'toggle' => true,
1237
  'selectors' => array(
1238
  '{{WRAPPER}} .aux-fs-menu .aux-master-menu' => 'text-align: {{VALUE}}',
 
 
 
 
 
 
 
 
 
 
 
 
1239
  )
1240
  )
1241
  );
1242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1243
  $this->end_controls_section();
1244
 
1245
  }
@@ -1306,9 +1452,9 @@ class MenuBox extends Widget_Base {
1306
  }
1307
 
1308
  printf( '<div class="aux-elementor-header aux-nav-menu-element aux-nav-menu-element-%s">', $this->get_id() );
1309
-
1310
  if ( 'default' === $settings['burger_type'] ) {
1311
- $burger_content = '<div class="aux-burger ' . $settings['burger_btn_style'] . '"><span class="mid-line"></span></div>';
1312
  } else {
1313
  $burger_content = '<div class="aux-burger aux-custom-burger">' . $settings['burger_custom'] . '</div>';
1314
  }
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
10
  use Elementor\Group_Control_Background;
11
  use Elementor\Group_Control_Box_Shadow;
127
  $this->add_control(
128
  'menu_slug',
129
  array(
130
+ 'label' => __( 'Menu', 'auxin-elements' ),
131
+ 'type' => Controls_Manager::SELECT,
132
+ 'options' => $menus,
133
+ 'default' => array_keys( $menus )[0],
134
  'save_default' => true,
135
+ 'description' => sprintf(
136
+ __( 'Go to the %s Menus screen %s to manage your menus.', 'auxin-elements' ),
137
+ '<a href="'. self_admin_url( 'nav-menus.php' ) .'" target="_blank">',
138
+ '</a>'
139
+ )
140
  )
141
  );
142
  } else {
144
  'menu_slug',
145
  array(
146
  'type' => Controls_Manager::RAW_HTML,
147
+ 'raw' => sprintf( __( '<strong>There are no menus in your site.</strong><br>Go to the <a href="%s" target="_blank">Menus screen</a> to create one.', 'auxin-elements' ), self_admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
 
148
  'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
149
  )
150
  );
161
  'vertical' => __('Vertical' , 'auxin-elements' ),
162
  'burger' => __('Burger' , 'auxin-elements' )
163
  ),
164
+ 'condition' => array(
165
  'menu_slug!' => ''
166
  )
167
  )
176
  'label_off' => __( 'Off', 'auxin-elements' ),
177
  'return_value' => 'yes',
178
  'default' => 'yes',
 
179
  'condition' => array(
180
  'type' => 'horizontal'
181
  )
194
  )
195
  );
196
 
197
+ $this->end_controls_section();
198
+
199
+ $this->start_controls_section(
200
+ 'mobile_menu_section',
201
+ array(
202
+ 'label' => __('Mobile Menu', 'auxin-elements' ),
203
+ )
204
+ );
205
+
206
  $this->add_control(
207
  'display_burger',
208
  array(
209
+ 'label' => __('Display Mobile Menu on', 'auxin-elements'),
210
+ 'label_block' => true,
211
  'type' => Controls_Manager::SELECT,
212
  'default' => '768',
213
  'options' => array(
214
+ '1024' => __('Tablet (1024px and lower)' , 'auxin-elements' ),
215
+ '768' => __('Mobile (768px and lower)' , 'auxin-elements' ),
216
+ 'custom' => __('Custom Breakpoint', 'auxin-elements' )
217
  ),
218
  'condition' => array(
219
  'menu_slug!' => ''
224
  $this->add_control(
225
  'breakpoint',
226
  array(
227
+ 'label' => __('BreakPoint (pixel)', 'auxin-elements' ),
228
  'type' => Controls_Manager::SLIDER,
229
  'size_units' => array('px'),
230
  'range' => array(
236
  ),
237
  'default' => array(
238
  'unit' => 'px',
239
+ 'size' => 768
240
  ),
241
  'separator' => 'before',
242
  'condition' => array(
249
  $this->add_control(
250
  'burger_menu_location',
251
  array(
252
+ 'label' => __('Mobile Menu Type', 'auxin-elements' ),
253
  'type' => 'aux-visual-select',
254
+ 'style_items' => '',
255
  'options' => array(
256
  'toggle-bar' => array(
257
  'label' => __( 'Expandable under top header', 'auxin-elements' ),
274
  $this->add_control(
275
  'offcanvas_align',
276
  array(
277
+ 'label' => __( 'Position', 'auxin-elements' ),
278
  'type' => Controls_Manager::SELECT,
279
  'default' => 'left',
280
  'options' => array(
290
  $this->add_control(
291
  'burger_toggle_type',
292
  array(
293
+ 'label' => __('Mobile Menu Opening Type', 'auxin-elements'),
294
+ 'label_block' => true,
295
  'type' => Controls_Manager::SELECT,
296
  'default' => 'toggle',
297
  'options' => array(
298
  'toggle' => __('Toggle' , 'auxin-elements' ),
299
  'accordion' => __('Accordion' , 'auxin-elements' )
300
+ )
301
  )
302
  );
303
 
318
  )
319
  );
320
 
321
+ $this->add_responsive_control(
322
+ 'align',
323
+ array(
324
+ 'label' => __('Text Align', 'auxin-elements'),
325
+ 'type' => Controls_Manager::CHOOSE,
326
+ 'devices' => array( 'desktop', 'mobile' ),
327
+ 'options' => array(
328
+ 'left' => array(
329
+ 'title' => __( 'Left', 'auxin-elements' ),
330
+ 'icon' => 'fa fa-align-left'
331
+ ),
332
+ 'center' => array(
333
+ 'title' => __( 'Center', 'auxin-elements' ),
334
+ 'icon' => 'fa fa-align-center'
335
+ ),
336
+ 'right' => array(
337
+ 'title' => __( 'Right', 'auxin-elements' ),
338
+ 'icon' => 'fa fa-align-right'
339
+ )
340
+ ),
341
+ 'default' => 'left',
342
+ 'toggle' => true,
343
+ 'selectors' => array(
344
+ '{{WRAPPER}}' => 'text-align: {{VALUE}}'
345
+ )
346
+ )
347
+ );
348
+
349
  $this->start_controls_tabs( 'item_colors' );
350
 
351
  $this->start_controls_tab(
361
  'label' => __( 'Color', 'auxin-elements' ),
362
  'type' => Controls_Manager::COLOR,
363
  'selectors' => array(
364
+ '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content' => 'color: {{VALUE}};'
365
+ )
366
  )
367
  );
368
+
369
  $this->add_group_control(
370
  Group_Control_Typography::get_type(),
371
  array(
372
  'name' => 'menu_item_typo',
373
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
374
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content'
375
+ )
376
+ );
377
+
378
+ $this->add_group_control(
379
+ Group_Control_Text_Shadow::get_type(),
380
+ [
381
+ 'name' => 'menu_item_text_shadow',
382
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content'
383
+ ]
384
+ );
385
+
386
+ $this->add_group_control(
387
+ Group_Control_Box_Shadow::get_type(),
388
+ array(
389
+ 'name' => 'item_box_shadow',
390
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0'
391
  )
392
  );
393
 
402
  );
403
 
404
  $this->add_group_control(
405
+ Group_Control_Border::get_type(),
406
  array(
407
+ 'name' => 'item_border',
408
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0',
409
+ 'separator' => 'none'
410
  )
411
  );
412
 
419
  'selectors' => array(
420
  '{{WRAPPER}} .aux-menu-depth-0' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
421
  ),
422
+ 'allowed_dimensions' => 'all'
 
 
 
 
 
 
 
 
 
423
  )
424
  );
425
 
439
  'type' => Controls_Manager::COLOR,
440
  'selectors' => array(
441
  '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content ' => 'color: {{VALUE}} !important;'
442
+ )
443
  )
444
  );
445
 
448
  array(
449
  'name' => 'menu_item_typo_hover',
450
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
451
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content',
452
+ )
453
+ );
454
+
455
+ $this->add_group_control(
456
+ Group_Control_Text_Shadow::get_type(),
457
+ [
458
+ 'name' => 'menu_item_text_shadow_hover',
459
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content'
460
+ ]
461
+ );
462
+
463
+ $this->add_group_control(
464
+ Group_Control_Box_Shadow::get_type(),
465
+ array(
466
+ 'name' => 'hover_item_box_shadow',
467
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover'
468
  )
469
  );
470
 
479
  );
480
 
481
  $this->add_group_control(
482
+ Group_Control_Border::get_type(),
483
  array(
484
+ 'name' => 'item_hover_border',
485
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover',
486
+ 'separator' => 'none'
487
  )
488
  );
489
 
500
  )
501
  );
502
 
 
 
 
 
 
 
 
 
503
 
504
  $this->end_controls_tab();
505
 
532
  )
533
  );
534
 
535
+ $this->end_controls_section();
536
+
537
+ /* Menu item - Current Section
538
+ /*-------------------------------------*/
539
+
540
+ $this->start_controls_section(
541
+ 'menu_item_current_section',
542
  array(
543
+ 'label' => __( 'Menu Item - Selected', 'auxin-elements' ),
544
+ 'tab' => Controls_Manager::TAB_STYLE
545
+ )
546
+ );
547
+
548
+ $this->add_control(
549
+ 'menu_item_current_color',
550
+ array(
551
+ 'label' => __( 'Color', 'auxin-elements' ),
552
+ 'type' => Controls_Manager::COLOR,
553
+ 'selectors' => array(
554
+ '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};',
 
 
 
 
555
  ),
556
+ )
557
+ );
558
+
559
+ $this->add_group_control(
560
+ Group_Control_Typography::get_type(),
561
+ array(
562
+ 'name' => 'menu_item_current_typography',
563
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
564
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
565
+ )
566
+ );
567
+
568
+ $this->add_group_control(
569
+ Group_Control_Text_Shadow::get_type(),
570
+ [
571
+ 'name' => 'menu_item_current_text_shadow',
572
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
573
+ ]
574
+ );
575
+
576
+ $this->add_group_control(
577
+ Group_Control_Box_Shadow::get_type(),
578
+ array(
579
+ 'name' => 'menu_item_current_box_shadow',
580
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
581
+ )
582
+ );
583
+
584
+ $this->add_group_control(
585
+ Group_Control_Background::get_type(),
586
+ array(
587
+ 'name' => 'menu_item_current_background',
588
+ 'label' => __( 'Background', 'auxin-elements' ),
589
+ 'types' => array( 'classic', 'gradient' ),
590
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a '
591
  )
592
  );
593
 
594
  $this->end_controls_section();
595
 
596
 
597
+ /* Submenu Section
598
  /*-------------------------------------*/
599
 
600
  $this->start_controls_section(
608
  $this->add_control(
609
  'submenu_skin',
610
  array(
611
+ 'label' => __('Skin','auxin-elements' ),
612
  'type' => 'aux-visual-select',
613
  'style_items' => 'max-width:45%;',
614
  'options' => array(
645
  $this->add_control(
646
  'submenu_anim',
647
  array(
648
+ 'label' => __('Animation Effect','auxin-elements' ),
649
  'type' => 'aux-visual-select',
650
+ 'style_items' => 'max-width:100%;',
651
  'options' => array(
652
  'none' => array(
653
  'label' => __( 'None', 'auxin-elements' ),
670
  $this->start_controls_tabs( 'sub_background_tab' );
671
 
672
  $this->start_controls_tab(
673
+ 'submenu_style_normal',
674
  array(
675
  'label' => __( 'Normal' , 'auxin-elements' )
676
  )
719
  $this->end_controls_tab();
720
 
721
  $this->start_controls_tab(
722
+ 'submenu_style_hover',
723
  array(
724
  'label' => __( 'Hover' , 'auxin-elements' )
725
  )
778
  $this->start_controls_section(
779
  'submenu_item_section',
780
  array(
781
+ 'label' => __( 'Submenu Item', 'auxin-elements' ),
782
  'tab' => Controls_Manager::TAB_STYLE
783
  )
784
  );
814
  );
815
 
816
  $this->add_group_control(
817
+ Group_Control_Text_Shadow::get_type(),
818
+ [
819
+ 'name' => 'sub_item_text_shadow',
820
+ 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
821
+ ]
 
 
822
  );
823
 
824
  $this->add_group_control(
829
  )
830
  );
831
 
832
+ $this->add_group_control(
833
+ Group_Control_Background::get_type(),
834
+ array(
835
+ 'name' => 'sub_item_background',
836
+ 'label' => __( 'Background', 'auxin-elements' ),
837
+ 'types' => array( 'classic', 'gradient' ),
838
+ 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
839
+ )
840
+ );
841
+
842
+
843
  $this->add_responsive_control(
844
  'sub_item_border_radius',
845
  array(
893
  );
894
 
895
  $this->add_group_control(
896
+ Group_Control_Text_Shadow::get_type(),
897
+ [
898
+ 'name' => 'hover_sub_item_text_shadow',
899
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
900
+ ]
 
 
901
  );
902
 
903
  $this->add_group_control(
908
  )
909
  );
910
 
911
+ $this->add_group_control(
912
+ Group_Control_Background::get_type(),
913
+ array(
914
+ 'name' => 'hover_sub_item_background',
915
+ 'label' => __( 'Background', 'auxin-elements' ),
916
+ 'types' => array( 'classic', 'gradient' ),
917
+ 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
918
+ )
919
+ );
920
+
921
  $this->add_responsive_control(
922
  'sub_item_hover_border_radius',
923
  array(
996
  ),
997
  )
998
  );
999
+
1000
+ $this->start_controls_tabs(
1001
  'burger_color',
1002
  array(
1003
  'condition' => array(
1157
  'label' => __( 'Color', 'auxin-elements' ),
1158
  'type' => Controls_Manager::COLOR,
1159
  'selectors' => array(
1160
+ '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'color: {{VALUE}};',
1161
  ),
1162
  'seperartor' => 'after'
1163
  )
1173
  );
1174
 
1175
  $this->add_group_control(
1176
+ Group_Control_Text_Shadow::get_type(),
1177
+ [
1178
+ 'name' => 'fullscr_item_text_shadow',
1179
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content'
1180
+ ]
 
 
1181
  );
1182
 
1183
  $this->add_group_control(
1188
  )
1189
  );
1190
 
1191
+ $this->add_group_control(
1192
+ Group_Control_Background::get_type(),
1193
+ array(
1194
+ 'name' => 'fullscr_item_background',
1195
+ 'label' => __( 'Background', 'auxin-elements' ),
1196
+ 'types' => array( 'classic', 'gradient' ),
1197
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item '
1198
+ )
1199
+ );
1200
+
1201
  $this->add_responsive_control(
1202
  'fullscr_item_border_radius',
1203
  array(
1235
  'label' => __( 'Color', 'auxin-elements' ),
1236
  'type' => Controls_Manager::COLOR,
1237
  'selectors' => array(
1238
+ '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content' => 'color: {{VALUE}};'
1239
  ),
1240
  'seperartor' => 'after'
1241
  )
1246
  array(
1247
  'name' => 'fullscr_menu_item_typo_hover',
1248
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1249
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content',
1250
  )
1251
  );
1252
 
1253
  $this->add_group_control(
1254
+ Group_Control_Text_Shadow::get_type(),
1255
+ [
1256
+ 'name' => 'fullscr_hover_item_text_shadow',
1257
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content'
1258
+ ]
 
 
1259
  );
1260
 
1261
  $this->add_group_control(
1262
  Group_Control_Box_Shadow::get_type(),
1263
  array(
1264
  'name' => 'fullscr_hover_item_box_shadow',
1265
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1266
+ )
1267
+ );
1268
+
1269
+ $this->add_group_control(
1270
+ Group_Control_Background::get_type(),
1271
+ array(
1272
+ 'name' => 'fullscr_hover_item_background',
1273
+ 'label' => __( 'Background', 'auxin-elements' ),
1274
+ 'types' => array( 'classic', 'gradient' ),
1275
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1276
  )
1277
  );
1278
 
1353
  'toggle' => true,
1354
  'selectors' => array(
1355
  '{{WRAPPER}} .aux-fs-menu .aux-master-menu' => 'text-align: {{VALUE}}',
1356
+ ),
1357
+ 'separator' => 'after'
1358
+ )
1359
+ );
1360
+
1361
+ $this->add_control(
1362
+ 'fullscr_current_item_color',
1363
+ array(
1364
+ 'label' => __( 'Color', 'auxin-elements' ),
1365
+ 'type' => Controls_Manager::COLOR,
1366
+ 'selectors' => array(
1367
+ '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};'
1368
  )
1369
  )
1370
  );
1371
 
1372
+ $this->add_group_control(
1373
+ Group_Control_Typography::get_type(),
1374
+ array(
1375
+ 'name' => 'fullscr_current_item_typography',
1376
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1377
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1378
+ )
1379
+ );
1380
+
1381
+ $this->add_group_control(
1382
+ Group_Control_Text_Shadow::get_type(),
1383
+ [
1384
+ 'name' => 'fullscr_current_item_text_shadow',
1385
+ 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1386
+ ]
1387
+ );
1388
+
1389
  $this->end_controls_section();
1390
 
1391
  }
1452
  }
1453
 
1454
  printf( '<div class="aux-elementor-header aux-nav-menu-element aux-nav-menu-element-%s">', $this->get_id() );
1455
+
1456
  if ( 'default' === $settings['burger_type'] ) {
1457
+ $burger_content = '<div class="aux-burger ' . $settings['burger_btn_style'] . '"><span class="mid-line"></span></div>';
1458
  } else {
1459
  $burger_content = '<div class="aux-burger aux-custom-burger">' . $settings['burger_custom'] . '</div>';
1460
  }
includes/elementor/widgets/theme-elements/modern-search.php ADDED
@@ -0,0 +1,634 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_Elements;
3
+
4
+ use Elementor\Widget_Base;
5
+ use Elementor\Controls_Manager;
6
+ use Elementor\Group_Control_Typography;
7
+ use Elementor\Scheme_Typography;
8
+ use Elementor\Group_Control_Text_Shadow;
9
+ use Elementor\Group_Control_Background;
10
+ use Elementor\Group_Control_Box_Shadow;
11
+ use Elementor\Group_Control_Border;
12
+
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit; // Exit if accessed directly.
16
+ }
17
+
18
+ /**
19
+ * Elementor 'ModernSearch' widget.
20
+ *
21
+ * Elementor widget that displays an 'ModernSearch'.
22
+ *
23
+ * @since 1.0.0
24
+ */
25
+ class ModernSearch extends Widget_Base {
26
+
27
+ /**
28
+ * Get widget name.
29
+ *
30
+ * Retrieve 'ModernSearch' widget name.
31
+ *
32
+ * @since 1.0.0
33
+ * @access public
34
+ *
35
+ * @return string Widget name.
36
+ */
37
+ public function get_name() {
38
+ return 'aux_modern_search';
39
+ }
40
+
41
+ /**
42
+ * Get widget title.
43
+ *
44
+ * Retrieve 'ModernSearch' widget title.
45
+ *
46
+ * @since 1.0.0
47
+ * @access public
48
+ *
49
+ * @return string Widget title.
50
+ */
51
+ public function get_title() {
52
+ return __('Modern Search', 'auxin-elements' );
53
+ }
54
+
55
+ /**
56
+ * Get widget icon.
57
+ *
58
+ * Retrieve 'ModernSearch' widget icon.
59
+ *
60
+ * @since 1.0.0
61
+ * @access public
62
+ *
63
+ * @return string Widget icon.
64
+ */
65
+ public function get_icon() {
66
+ return 'eicon-search auxin-badge';
67
+ }
68
+
69
+ /**
70
+ * Get widget categories.
71
+ *
72
+ * Retrieve 'ModernSearch' widget icon.
73
+ *
74
+ * @since 1.0.0
75
+ * @access public
76
+ *
77
+ * @return string Widget icon.
78
+ */
79
+ public function get_categories() {
80
+ return [ 'auxin-core', 'auxin-theme-elements' ];
81
+ }
82
+
83
+ /**
84
+ * Register 'ModernSearch' widget controls.
85
+ *
86
+ * Adds different input fields to allow the user to change and customize the widget settings.
87
+ *
88
+ * @since 1.0.0
89
+ * @access protected
90
+ */
91
+ protected function _register_controls() {
92
+
93
+ /* Search Section
94
+ /*-------------------------------------*/
95
+
96
+ $this->start_controls_section(
97
+ 'section_search',
98
+ [
99
+ 'label' => __( 'Button', 'auxin-elements' ),
100
+ ]
101
+ );
102
+
103
+ $this->add_control(
104
+ 'icon',
105
+ [
106
+ 'label' => __( 'Icon', 'auxin-elements' ),
107
+ 'type' => Controls_Manager::ICONS,
108
+ 'default' => [
109
+ 'value' => 'auxicon-search-4',
110
+ 'library' => 'auxicon'
111
+ ]
112
+ ]
113
+ );
114
+
115
+ $this->add_control(
116
+ 'text',
117
+ [
118
+ 'label' => __( 'Text', 'auxin-elements' ),
119
+ 'type' => Controls_Manager::TEXT,
120
+ 'dynamic' => [
121
+ 'active' => true,
122
+ ],
123
+ 'default' => __( '', 'auxin-elements' ),
124
+ 'placeholder' => __( 'Submit', 'auxin-elements' ),
125
+ ]
126
+ );
127
+
128
+ $this->end_controls_section();
129
+
130
+ /* Icon Style Section
131
+ /*-------------------------------------*/
132
+
133
+ $this->start_controls_section(
134
+ 'button_style_section',
135
+ [
136
+ 'label' => __( 'Button', 'auxin-elements' ),
137
+ 'tab' => Controls_Manager::TAB_STYLE
138
+ ]
139
+ );
140
+
141
+ $this->start_controls_tabs( 'button_styles' );
142
+
143
+ $this->start_controls_tab(
144
+ 'button_style_normal',
145
+ [
146
+ 'label' => __( 'Normal' , 'auxin-elements' )
147
+ ]
148
+ );
149
+
150
+ $this->add_control(
151
+ 'button_color_normal',
152
+ [
153
+ 'label' => __( 'Color', 'auxin-elements' ),
154
+ 'type' => Controls_Manager::COLOR,
155
+ 'selectors' => [
156
+ '{{WRAPPER}} .aux-search-submit' => 'color: {{VALUE}};'
157
+ ]
158
+ ]
159
+ );
160
+
161
+ $this->add_group_control(
162
+ Group_Control_Typography::get_type(),
163
+ [
164
+ 'name' => 'button_typo_normal',
165
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
166
+ 'selector' => '{{WRAPPER}} .aux-search-submit'
167
+ ]
168
+ );
169
+
170
+ $this->add_group_control(
171
+ Group_Control_Text_Shadow::get_type(),
172
+ [
173
+ 'name' => 'button_text_shadow_normal',
174
+ 'selector' => '{{WRAPPER}} .aux-search-submit'
175
+ ]
176
+ );
177
+
178
+ $this->add_group_control(
179
+ Group_Control_Box_Shadow::get_type(),
180
+ [
181
+ 'name' => 'button_box_shadow_normal',
182
+ 'selector' => '{{WRAPPER}} .aux-search-submit'
183
+ ]
184
+ );
185
+
186
+ $this->add_group_control(
187
+ Group_Control_Background::get_type(),
188
+ [
189
+ 'name' => 'button_bg_normal',
190
+ 'selector' => '{{WRAPPER}} .aux-search-submit',
191
+ 'types' => [ 'classic', 'gradient']
192
+ ]
193
+ );
194
+
195
+ $this->add_group_control(
196
+ Group_Control_Border::get_type(),
197
+ [
198
+ 'name' => 'button_border_normal',
199
+ 'selector' => '{{WRAPPER}} .aux-search-submit',
200
+ 'separator' => 'none'
201
+ ]
202
+ );
203
+
204
+ $this->add_responsive_control(
205
+ 'button_border_radius_normal',
206
+ [
207
+ 'label' => __( 'Border Radius', 'auxin-elements' ),
208
+ 'type' => Controls_Manager::DIMENSIONS,
209
+ 'size_units' => [ 'px', 'em', '%' ],
210
+ 'selectors' => [
211
+ '{{WRAPPER}} .aux-search-submit' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
212
+ ],
213
+ 'allowed_dimensions' => 'all'
214
+ ]
215
+ );
216
+
217
+ $this->add_responsive_control(
218
+ 'button_padding_normal',
219
+ [
220
+ 'label' => __( 'Padding', 'auxin-elements' ),
221
+ 'type' => Controls_Manager::DIMENSIONS,
222
+ 'size_units' => [ 'px', '%' ],
223
+ 'selectors' => [
224
+ '{{WRAPPER}} .aux-search-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
225
+ ],
226
+ 'separator' => 'before'
227
+ ]
228
+ );
229
+
230
+ $this->end_controls_tab();
231
+
232
+ $this->start_controls_tab(
233
+ 'button_style_hover',
234
+ [
235
+ 'label' => __( 'Hover' , 'auxin-elements' )
236
+ ]
237
+ );
238
+
239
+ $this->add_control(
240
+ 'button_color_hover',
241
+ [
242
+ 'label' => __( 'Color', 'auxin-elements' ),
243
+ 'type' => Controls_Manager::COLOR,
244
+ 'selectors' => [
245
+ '{{WRAPPER}} .aux-search-submit:hover' => 'color: {{VALUE}};'
246
+ ]
247
+ ]
248
+ );
249
+
250
+ $this->add_group_control(
251
+ Group_Control_Typography::get_type(),
252
+ [
253
+ 'name' => 'button_typo_hover',
254
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
255
+ 'selector' => '{{WRAPPER}} .aux-search-submit:hover'
256
+ ]
257
+ );
258
+
259
+ $this->add_group_control(
260
+ Group_Control_Text_Shadow::get_type(),
261
+ [
262
+ 'name' => 'button_text_shadow_hover',
263
+ 'selector' => '{{WRAPPER}} .aux-search-submit:hover'
264
+ ]
265
+ );
266
+
267
+ $this->add_group_control(
268
+ Group_Control_Box_Shadow::get_type(),
269
+ [
270
+ 'name' => 'button_box_shadow_hover',
271
+ 'selector' => '{{WRAPPER}} .aux-search-submit:hover'
272
+ ]
273
+ );
274
+
275
+ $this->add_group_control(
276
+ Group_Control_Background::get_type(),
277
+ [
278
+ 'name' => 'button_bg_hover',
279
+ 'selector' => '{{WRAPPER}} .aux-search-submit:hover',
280
+ 'types' => [ 'classic', 'gradient']
281
+ ]
282
+ );
283
+
284
+ $this->add_group_control(
285
+ Group_Control_Border::get_type(),
286
+ [
287
+ 'name' => 'button_border_hover',
288
+ 'selector' => '{{WRAPPER}} .aux-search-submit:hover',
289
+ 'separator' => 'none'
290
+ ]
291
+ );
292
+
293
+ $this->add_responsive_control(
294
+ 'button_border_radius_hover',
295
+ [
296
+ 'label' => __( 'Border Radius', 'auxin-elements' ),
297
+ 'type' => Controls_Manager::DIMENSIONS,
298
+ 'size_units' => [ 'px', 'em', '%' ],
299
+ 'selectors' => [
300
+ '{{WRAPPER}} .aux-search-submit:hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
301
+ ],
302
+ 'allowed_dimensions' => 'all'
303
+ ]
304
+ );
305
+
306
+ $this->add_responsive_control(
307
+ 'button_padding_hover',
308
+ [
309
+ 'label' => __( 'Padding', 'auxin-elements' ),
310
+ 'type' => Controls_Manager::DIMENSIONS,
311
+ 'size_units' => [ 'px', '%' ],
312
+ 'selectors' => [
313
+ '{{WRAPPER}} .aux-search-submit:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
314
+ ],
315
+ 'separator' => 'before'
316
+ ]
317
+ );
318
+
319
+
320
+ $this->end_controls_tab();
321
+
322
+ $this->end_controls_tabs();
323
+
324
+ $this->end_controls_section();
325
+
326
+ /* Icon Style Section
327
+ /*-------------------------------------*/
328
+
329
+ $this->start_controls_section(
330
+ 'icon_style_section',
331
+ [
332
+ 'label' => __( 'Icon', 'auxin-elements' ),
333
+ 'tab' => Controls_Manager::TAB_STYLE
334
+ ]
335
+ );
336
+
337
+ $this->start_controls_tabs( 'icon_styles' );
338
+
339
+ $this->start_controls_tab(
340
+ 'icon_style_normal',
341
+ [
342
+ 'label' => __( 'Normal' , 'auxin-elements' )
343
+ ]
344
+ );
345
+
346
+ $this->add_control(
347
+ 'icon_color_normal',
348
+ [
349
+ 'label' => __( 'Color', 'auxin-elements' ),
350
+ 'type' => Controls_Manager::COLOR,
351
+ 'selectors' => [
352
+ '{{WRAPPER}} .aux-search-submit i' => 'color: {{VALUE}};'
353
+ ]
354
+ ]
355
+ );
356
+
357
+ $this->add_responsive_control(
358
+ 'icon_size_normal',
359
+ [
360
+ 'label' => __( 'Size', 'auxin-elements' ),
361
+ 'type' => Controls_Manager::SLIDER,
362
+ 'size_units' => [ 'px', '%' ],
363
+ 'range' => [
364
+ 'px' => [
365
+ 'min' => 16,
366
+ 'max' => 512,
367
+ 'step' => 2,
368
+ ],
369
+ '%' => [
370
+ 'min' => 0,
371
+ 'max' => 100,
372
+ ],
373
+ ],
374
+ 'default' => [
375
+ 'size' => 22,
376
+ 'unit' => 'px'
377
+ ],
378
+ 'selectors' => [
379
+ '{{WRAPPER}} .aux-search-submit i' => 'font-size: {{SIZE}}{{UNIT}};',
380
+ ],
381
+ ]
382
+ );
383
+
384
+ $this->end_controls_tab();
385
+
386
+ $this->start_controls_tab(
387
+ 'icon_style_hover',
388
+ [
389
+ 'label' => __( 'Hover' , 'auxin-elements' )
390
+ ]
391
+ );
392
+
393
+ $this->add_control(
394
+ 'icon_color_hover',
395
+ [
396
+ 'label' => __( 'Color', 'auxin-elements' ),
397
+ 'type' => Controls_Manager::COLOR,
398
+ 'selectors' => [
399
+ '{{WRAPPER}} .aux-search-submit:hover i' => 'color: {{VALUE}};'
400
+ ]
401
+ ]
402
+ );
403
+
404
+ $this->add_responsive_control(
405
+ 'icon_size_hover',
406
+ [
407
+ 'label' => __( 'Size', 'auxin-elements' ),
408
+ 'type' => Controls_Manager::SLIDER,
409
+ 'size_units' => [ 'px', '%' ],
410
+ 'range' => [
411
+ 'px' => [
412
+ 'min' => 16,
413
+ 'max' => 512,
414
+ 'step' => 2,
415
+ ],
416
+ '%' => [
417
+ 'min' => 0,
418
+ 'max' => 100,
419
+ ],
420
+ ],
421
+ 'default' => [
422
+ 'size' => 22,
423
+ 'unit' => 'px'
424
+ ],
425
+ 'selectors' => [
426
+ '{{WRAPPER}} .aux-search-submit:hover i' => 'font-size: {{SIZE}}{{UNIT}};',
427
+ ],
428
+ ]
429
+ );
430
+
431
+ $this->end_controls_tab();
432
+
433
+ $this->end_controls_tabs();
434
+
435
+ $this->end_controls_section();
436
+
437
+ /* Form Style Section
438
+ /*-------------------------------------*/
439
+
440
+ $this->start_controls_section(
441
+ 'form_style_section',
442
+ [
443
+ 'label' => __( 'Form', 'auxin-elements' ),
444
+ 'tab' => Controls_Manager::TAB_STYLE
445
+ ]
446
+ );
447
+
448
+ $this->add_control(
449
+ 'form_color',
450
+ [
451
+ 'label' => __( 'Color', 'auxin-elements' ),
452
+ 'type' => Controls_Manager::COLOR,
453
+ 'selectors' => [
454
+ '{{WRAPPER}} .aux-search-popup .aux-search-field' => 'color: {{VALUE}};'
455
+ ]
456
+ ]
457
+ );
458
+
459
+ $this->add_group_control(
460
+ Group_Control_Typography::get_type(),
461
+ [
462
+ 'name' => 'form_typo',
463
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
464
+ 'selector' => '{{WRAPPER}} .aux-search-popup .aux-search-field'
465
+ ]
466
+ );
467
+
468
+ $this->add_control(
469
+ 'form_icon_color',
470
+ [
471
+ 'label' => __( 'Submit Icon Color', 'auxin-elements' ),
472
+ 'type' => Controls_Manager::COLOR,
473
+ 'selectors' => [
474
+ '{{WRAPPER}} .aux-search-popup .aux-submit-icon-container:before' => 'color: {{VALUE}} !important;'
475
+ ]
476
+ ]
477
+ );
478
+
479
+ $this->add_control(
480
+ 'form_border_color',
481
+ [
482
+ 'label' => __( 'Border Color', 'auxin-elements' ),
483
+ 'type' => Controls_Manager::COLOR,
484
+ 'selectors' => [
485
+ '{{WRAPPER}} .aux-search-popup .aux-search-input-form' => 'border-color: {{VALUE}};'
486
+ ]
487
+ ]
488
+ );
489
+
490
+ $this->end_controls_section();
491
+
492
+ /* Overlay Style Section
493
+ /*-------------------------------------*/
494
+
495
+ $this->start_controls_section(
496
+ 'overlay_style_section',
497
+ [
498
+ 'label' => __( 'Overlay', 'auxin-elements' ),
499
+ 'tab' => Controls_Manager::TAB_STYLE
500
+ ]
501
+ );
502
+
503
+ $this->add_group_control(
504
+ Group_Control_Background::get_type(),
505
+ [
506
+ 'name' => 'overlay_bg',
507
+ 'selector' => '{{WRAPPER}} .aux-search-popup',
508
+ 'types' => [ 'classic', 'gradient']
509
+ ]
510
+ );
511
+
512
+ $this->end_controls_section();
513
+ }
514
+
515
+ /**
516
+ * Render Search Input.
517
+ *
518
+ * Render button widget text.
519
+ *
520
+ * @since 1.5.0
521
+ * @access protected
522
+ */
523
+ protected function render_search_button( $args = [] ) { ;
524
+
525
+ $defaults = [
526
+ 'submit_class' => 'aux-search-submit aux-search-fullscreen',
527
+ 'submit_text' => '',
528
+ 'wrapper_class' => 'aux-modern-search-wrapper',
529
+ 'icon' => 'auxicon-search-4',
530
+ 'target' => '.aux-search-popup-' . $this->get_id(),
531
+ 'use_ajax' => false
532
+ ];
533
+
534
+ $args = wp_parse_args( $args, $defaults );
535
+
536
+ $this->add_render_attribute( 'wrapper', 'class', $args['wrapper_class'] );
537
+ $this->add_render_attribute( 'button', 'class', $args['submit_class'] );
538
+ $this->add_render_attribute( 'button', 'data-target', $args['target'] );
539
+ $this->add_render_attribute( 'submit_text', 'class', 'aux-submit-text' );
540
+ $this->add_render_attribute( 'icon', 'class', $args['icon'] );
541
+ ?>
542
+ <div <?php echo $this->get_render_attribute_string( 'wrapper' );?> >
543
+ <button <?php echo $this->get_render_attribute_string( 'button' );?> >
544
+ <i <?php echo $this->get_render_attribute_string( 'icon' );?>></i>
545
+ <span <?php echo $this->get_render_attribute_string( 'submit_text' );?> ><?php echo $args['submit_text']; ?></span>
546
+ </button>
547
+ </div>
548
+ <?php
549
+
550
+ }
551
+ /**
552
+ * Render Search Overlay.
553
+ *
554
+ * Render button widget text.
555
+ *
556
+ * @since 1.5.0
557
+ * @access protected
558
+ */
559
+ protected function render_search_overlay( $args = [] ) { ;
560
+
561
+ $defaults = [
562
+ 'wrapper_class' => 'aux-search-popup aux-search-popup-' . $this->get_id()
563
+ ];
564
+
565
+ $args = wp_parse_args( $args, $defaults );
566
+
567
+ $this->add_render_attribute( 'overlay_wrapper', 'class', $args['wrapper_class'] );
568
+ ?>
569
+ <div <?php echo $this->get_render_attribute_string( 'overlay_wrapper' );?>>
570
+ <div class="aux-panel-close">
571
+ <div class="aux-close aux-cross-symbol aux-thick-medium"></div>
572
+ </div>
573
+ <div class="aux-search-popup-content">
574
+ <?php $this->render_search_form() ;?>
575
+ </div>
576
+ </div>
577
+ <?php
578
+ }
579
+
580
+ /**
581
+ * Render Search Overlay.
582
+ *
583
+ * Render button widget text.
584
+ *
585
+ * @since 1.5.0
586
+ * @access protected
587
+ */
588
+ protected function render_search_form( $args = [] ) { ;
589
+
590
+ $defaults = [
591
+ 'wrapper_class' => 'aux-search-form'
592
+ ];
593
+
594
+ $args = wp_parse_args( $args, $defaults );
595
+
596
+ $this->add_render_attribute( 'form_wrapper', 'class', $args['wrapper_class'] );
597
+ ?>
598
+ <div <?php echo $this->get_render_attribute_string( 'form_wrapper' );?>>
599
+ <form action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get" >
600
+ <div class="aux-search-input-form">
601
+ <input type="text" class="aux-search-field" placeholder="<?php esc_attr_e('Search...', 'auxin-elements' ); ?>" name="s" autocomplete="off" />
602
+ <div class="aux-submit-icon-container auxicon-search-4">
603
+ <input type="submit" class="aux-iconic-search-submit" value="<?php esc_attr_e( 'Search', 'auxin-elements' ); ?>" >
604
+ </div>
605
+ </div>
606
+ </form>
607
+ </div>
608
+ <?php
609
+ }
610
+
611
+ /**
612
+ * Render image box widget output on the frontend.
613
+ *
614
+ * Written in PHP and used to generate the final HTML.
615
+ *
616
+ * @since 1.0.0
617
+ * @access protected
618
+ */
619
+ protected function render() {
620
+ $settings = $this->get_settings_for_display();
621
+
622
+ echo '<div class="aux-modern-search">';
623
+
624
+ $this->render_search_button( [
625
+ 'submit_text' => $settings['text'],
626
+ 'icon' => $settings['icon']
627
+ ] );
628
+
629
+ $this->render_search_overlay();
630
+
631
+ echo '</div>';
632
+ }
633
+
634
+ }
includes/elementor/widgets/theme-elements/search.php CHANGED
@@ -4,16 +4,9 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
- use Elementor\Group_Control_Background;
15
- use Elementor\Group_Control_Box_Shadow;
16
- use Elementor\Group_Control_Text_Shadow;
17
 
18
 
19
  if ( ! defined( 'ABSPATH' ) ) {
@@ -54,7 +47,7 @@ class SearchBox extends Widget_Base {
54
  * @return string Widget title.
55
  */
56
  public function get_title() {
57
- return __('Search', 'auxin-elements' );
58
  }
59
 
60
  /**
@@ -110,7 +103,7 @@ class SearchBox extends Widget_Base {
110
  'default' => 'icon',
111
  'options' => array(
112
  'form' => __('Form' , 'auxin-elements' ),
113
- 'icon' => __('Icon' , 'auxin-elements' )
114
  )
115
  )
116
  );
@@ -122,9 +115,9 @@ class SearchBox extends Widget_Base {
122
  'type' => Controls_Manager::SELECT,
123
  'default' => 'none',
124
  'options' => array(
125
- 'none' => __('None' , 'auxin-elements' ),
126
- 'icon' => __('Icon' , 'auxin-elements' ),
127
- 'button' => __('Button' , 'auxin-elements' ),
128
  ),
129
  'condition' => array(
130
  'type' => 'form'
@@ -157,10 +150,25 @@ class SearchBox extends Widget_Base {
157
  )
158
  );
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  $this->add_control(
161
  'has_category',
162
  array(
163
- 'label' => __('Searcy by Category', 'auxin-elements'),
164
  'type' => Controls_Manager::SWITCHER,
165
  'label_on' => __( 'On', 'auxin-elements' ),
166
  'label_off' => __( 'Off', 'auxin-elements' ),
@@ -203,6 +211,18 @@ class SearchBox extends Widget_Base {
203
  )
204
  );
205
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  $this->add_responsive_control(
207
  'icon_size',
208
  array(
@@ -339,7 +359,7 @@ class SearchBox extends Widget_Base {
339
  'type' => Controls_Manager::COLOR,
340
  'default' => '#FFF',
341
  'selectors' => array(
342
- '{{WRAPPER}} .aux-search-form .aux-search-field' => 'background-color: {{VALUE}}',
343
  )
344
  )
345
  );
@@ -393,7 +413,7 @@ class SearchBox extends Widget_Base {
393
  )
394
  )
395
  );
396
-
397
  $this->add_control(
398
  'button_color',
399
  array(
@@ -442,54 +462,54 @@ class SearchBox extends Widget_Base {
442
  $this->end_controls_section();
443
  }
444
 
445
- /**
446
- * Render image box widget output on the frontend.
447
- *
448
- * Written in PHP and used to generate the final HTML.
449
- *
450
- * @since 1.0.0
451
- * @access protected
452
- */
453
- protected function render() {
454
- $settings = $this->get_settings_for_display();
455
-
456
- $output = '';
457
- $args = array();
458
- $is_edit = \Elementor\Plugin::$instance->editor->is_edit_mode();
459
- $is_preview = isset( $_GET['preview'] ) && $_GET['preview'] ? true : false;
460
-
461
- if ( $is_edit || $is_preview ) {
462
- auxin_add_hidden_blocks();
463
- }
464
-
465
- if ( 'icon' === $settings['type'] ) {
466
- $args['has_form'] = false;
467
- $args['toggle_icon_class'] = 'aux-overlay-search';
468
-
469
- } else {
470
- $args['has_toggle_icon'] = false;
471
- $args['has_category'] = $settings['has_category'];
472
-
473
- switch( $settings['submit_type'] ) {
474
- case 'none' :
475
- $args['has_submit'] = false;
476
- break;
477
- case 'icon' :
478
- $args['has_submit_icon'] = true;
479
- break;
480
- case 'button' :
481
- $args['has_submit'] = true;
482
- break;
483
- default :
484
- break;
485
  }
486
 
487
- }
488
- $args['icon_classname'] = $settings['icon'];
489
- $output = auxin_get_search_box( $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
 
 
 
 
491
 
492
- echo $output;
493
- }
494
 
495
  }
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
9
  use Elementor\Group_Control_Border;
 
 
 
10
 
11
 
12
  if ( ! defined( 'ABSPATH' ) ) {
47
  * @return string Widget title.
48
  */
49
  public function get_title() {
50
+ return __('Search Form', 'auxin-elements' );
51
  }
52
 
53
  /**
103
  'default' => 'icon',
104
  'options' => array(
105
  'form' => __('Form' , 'auxin-elements' ),
106
+ 'icon' => __('Icon' , 'auxin-elements' )
107
  )
108
  )
109
  );
115
  'type' => Controls_Manager::SELECT,
116
  'default' => 'none',
117
  'options' => array(
118
+ 'none' => __('None' , 'auxin-elements' ),
119
+ 'icon' => __('Icon' , 'auxin-elements' ),
120
+ 'button' => __('Button' , 'auxin-elements' ),
121
  ),
122
  'condition' => array(
123
  'type' => 'form'
150
  )
151
  );
152
 
153
+ $this->add_control(
154
+ 'is_ajax',
155
+ array(
156
+ 'label' => __('Ajax Search', 'auxin-elements'),
157
+ 'type' => Controls_Manager::SWITCHER,
158
+ 'label_on' => __( 'On', 'auxin-elements' ),
159
+ 'label_off' => __( 'Off', 'auxin-elements' ),
160
+ 'return_value' => true,
161
+ 'default' => true,
162
+ 'condition' => array(
163
+ 'type' => 'icon'
164
+ )
165
+ )
166
+ );
167
+
168
  $this->add_control(
169
  'has_category',
170
  array(
171
+ 'label' => __('Search by Category', 'auxin-elements'),
172
  'type' => Controls_Manager::SWITCHER,
173
  'label_on' => __( 'On', 'auxin-elements' ),
174
  'label_off' => __( 'Off', 'auxin-elements' ),
211
  )
212
  );
213
 
214
+ $this->add_control(
215
+ 'icon_background_color',
216
+ array(
217
+ 'label' => __('Background Color', 'auxin-elements'),
218
+ 'type' => Controls_Manager::COLOR,
219
+ 'default' => 'transparent',
220
+ 'selectors' => array(
221
+ '{{WRAPPER}} .aux-search-form .aux-submit-icon-container,{{WRAPPER}} .aux-search-section button.aux-search-icon' => 'background-color: {{VALUE}}',
222
+ )
223
+ )
224
+ );
225
+
226
  $this->add_responsive_control(
227
  'icon_size',
228
  array(
359
  'type' => Controls_Manager::COLOR,
360
  'default' => '#FFF',
361
  'selectors' => array(
362
+ '{{WRAPPER}} .aux-search-form .aux-search-field, {{WRAPPER}} .aux-search-form select' => 'background-color: {{VALUE}}',
363
  )
364
  )
365
  );
413
  )
414
  )
415
  );
416
+
417
  $this->add_control(
418
  'button_color',
419
  array(
462
  $this->end_controls_section();
463
  }
464
 
465
+ /**
466
+ * Render image box widget output on the frontend.
467
+ *
468
+ * Written in PHP and used to generate the final HTML.
469
+ *
470
+ * @since 1.0.0
471
+ * @access protected
472
+ */
473
+ protected function render() {
474
+ $settings = $this->get_settings_for_display();
475
+
476
+ $args = [];
477
+
478
+ $is_edit = \Elementor\Plugin::$instance->editor->is_edit_mode();
479
+ $is_preview = isset( $_GET['preview'] ) && $_GET['preview'] ? true : false;
480
+
481
+ if ( $is_edit || $is_preview ) {
482
+ auxin_add_hidden_blocks();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  }
484
 
485
+ if ( 'icon' === $settings['type'] ) {
486
+ $args['has_form'] = false;
487
+ $args['is_ajax'] = auxin_is_true( $settings['is_ajax'] );
488
+ $args['toggle_icon_class'] = 'aux-overlay-search';
489
+
490
+ } else {
491
+ $args['has_toggle_icon'] = false;
492
+ $args['has_category'] = $settings['has_category'];
493
+
494
+ switch( $settings['submit_type'] ) {
495
+ case 'none' :
496
+ $args['has_submit'] = false;
497
+ break;
498
+ case 'icon' :
499
+ $args['has_submit_icon'] = true;
500
+ break;
501
+ case 'button' :
502
+ $args['has_submit'] = true;
503
+ break;
504
+ default :
505
+ break;
506
+ }
507
 
508
+ }
509
+ $args['icon_classname'] = $settings['icon'];
510
+ $args['css_class'] = 'aux-search-elementor-element';
511
 
512
+ echo auxin_get_search_box( $args );
513
+ }
514
 
515
  }
includes/elementor/widgets/theme-elements/shopping-cart.php CHANGED
@@ -6,14 +6,10 @@ use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
  use Elementor\Group_Control_Border;
14
  use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
16
- use Elementor\Group_Control_Text_Shadow;
17
 
18
 
19
  if ( ! defined( 'ABSPATH' ) ) {
@@ -110,14 +106,41 @@ class Shopping_Cart extends Widget_Base {
110
  'icon',
111
  array(
112
  'label' => __( 'Icon', 'auxin-elements' ),
113
- 'type' => 'aux-icon'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  )
115
  );
116
 
117
  $this->add_control(
118
  'action',
119
  array(
120
- 'label' => __('Basket Content Display', 'auxin-elements'),
121
  'type' => Controls_Manager::SELECT,
122
  'default' => 'hover',
123
  'options' => array(
@@ -127,6 +150,42 @@ class Shopping_Cart extends Widget_Base {
127
  )
128
  );
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  $this->add_responsive_control(
131
  'align',
132
  array(
@@ -146,13 +205,22 @@ class Shopping_Cart extends Widget_Base {
146
  'icon' => 'fa fa-align-right',
147
  ),
148
  ),
149
- 'default' => 'center',
150
- 'selectors' => array(
151
  '{{WRAPPER}} .aux-cart-element-container' => 'display: flex; justify-content: {{VALUE}};',
152
- ),
153
  )
154
  );
155
 
 
 
 
 
 
 
 
 
 
156
 
157
  $this->end_controls_section();
158
 
@@ -494,17 +562,32 @@ class Shopping_Cart extends Widget_Base {
494
  protected function render() {
495
 
496
  $settings = $this->get_settings_for_display();
497
- $align = !empty( $settings['align'] ) ? ' aux-dropdown-' . $settings['align'] : '';
 
 
 
 
 
 
 
 
 
498
 
499
  echo '<div class="aux-cart-element-container">';
500
  echo auxin_wc_add_to_cart(
501
  array(
502
- 'css_class' => 'aux-cart-element' . $align,
 
 
503
  'action_on' => $settings['action'],
504
  'icon' => $settings['icon'],
505
  'size' => $settings['image_size'],
506
  'width' => $settings['image_custom_dimension']['width'],
507
  'height' => $settings['image_custom_dimension']['height'],
 
 
 
 
508
  )
509
  );
510
  echo '</div>';
6
  use Elementor\Controls_Manager;
7
  use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
 
9
  use Elementor\Scheme_Typography;
 
 
10
  use Elementor\Group_Control_Border;
11
  use Elementor\Group_Control_Background;
12
  use Elementor\Group_Control_Box_Shadow;
 
13
 
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
106
  'icon',
107
  array(
108
  'label' => __( 'Icon', 'auxin-elements' ),
109
+ 'type' => 'aux-icon',
110
+ 'default' => 'auxicon-shopping-bag-4'
111
+ )
112
+ );
113
+
114
+ $this->add_control(
115
+ 'cart_style',
116
+ array(
117
+ 'label' => __( 'Cart Type', 'auxin-elements' ),
118
+ 'type' => Controls_Manager::SELECT,
119
+ 'options' => array(
120
+ 'dropdown' => __( 'DropDown', 'auxin-elements' ),
121
+ 'offcanvas' => __( 'Off Canvas', 'auxin-elements' )
122
+ ),
123
+ 'default' => 'dropdown'
124
+ )
125
+ );
126
+
127
+ $this->add_control(
128
+ 'cart_content_skin',
129
+ array(
130
+ 'label' => __('Cart Skin', 'auxin-elements'),
131
+ 'type' => Controls_Manager::SELECT,
132
+ 'default' => 'light',
133
+ 'options' => array(
134
+ 'light' => __('Light', 'auxin-elements' ),
135
+ 'dark' => __('Dark' , 'auxin-elements' )
136
+ )
137
  )
138
  );
139
 
140
  $this->add_control(
141
  'action',
142
  array(
143
+ 'label' => __('Display Basket', 'auxin-elements'),
144
  'type' => Controls_Manager::SELECT,
145
  'default' => 'hover',
146
  'options' => array(
150
  )
151
  );
152
 
153
+ $this->add_control(
154
+ 'basket_animation',
155
+ array(
156
+ 'label' => __( 'Basket Animation', 'auxin-elements' ),
157
+ 'type' => Controls_Manager::SWITCHER,
158
+ 'label_on' => __( 'Yes', 'auxin-elements' ),
159
+ 'label_off' => __( 'No', 'auxin-elements' ),
160
+ 'return_value' => 'yes',
161
+ 'default' => 'yes'
162
+ )
163
+ );
164
+
165
+ $this->add_control(
166
+ 'simple_cart_mode',
167
+ array(
168
+ 'label' => __( 'Simple Cart', 'auxin-elements' ),
169
+ 'type' => Controls_Manager::SWITCHER,
170
+ 'label_on' => __( 'Yes', 'auxin-elements' ),
171
+ 'label_off' => __( 'No', 'auxin-elements' ),
172
+ 'return_value' => 'yes',
173
+ 'default' => 'yes'
174
+ )
175
+ );
176
+
177
+ $this->add_control(
178
+ 'cart_header_text',
179
+ [
180
+ 'label' => __( 'Text for cart', 'auxin-elements' ),
181
+ 'type' => \Elementor\Controls_Manager::TEXT,
182
+ 'default' => __( 'Shopping Basket', 'auxin-elements' ),
183
+ 'condition' => array(
184
+ 'simple_cart_mode' => ''
185
+ )
186
+ ]
187
+ );
188
+
189
  $this->add_responsive_control(
190
  'align',
191
  array(
205
  'icon' => 'fa fa-align-right',
206
  ),
207
  ),
208
+ 'default' => '',
209
+ 'selectors' => [
210
  '{{WRAPPER}} .aux-cart-element-container' => 'display: flex; justify-content: {{VALUE}};',
211
+ ]
212
  )
213
  );
214
 
215
+ $this->add_control(
216
+ 'total_price_text_in_dropdown',
217
+ [
218
+ 'label' => __( 'Total Price Text', 'auxin-elements' ),
219
+ 'type' => \Elementor\Controls_Manager::TEXT,
220
+ 'default' => __( 'Sub Total', 'auxin-elements' )
221
+ ]
222
+ );
223
+
224
 
225
  $this->end_controls_section();
226
 
562
  protected function render() {
563
 
564
  $settings = $this->get_settings_for_display();
565
+ $align = ! empty( $settings['align'] ) ? ' aux-dropdown-' . $settings['align'] : '';
566
+ $dropdown_class = "";
567
+
568
+ if ( $settings['cart_style'] === 'offcanvas' ) {
569
+ $dropdown_class .= ' aux-desktop-off aux-tablet-off';
570
+ }
571
+
572
+ if ( $settings['simple_cart_mode'] = auxin_is_true( $settings['simple_cart_mode'] ) ) {
573
+ $dropdown_class .= ' aux-modern-dropdown';
574
+ }
575
 
576
  echo '<div class="aux-cart-element-container">';
577
  echo auxin_wc_add_to_cart(
578
  array(
579
+ 'css_class' => 'aux-cart-element'. $align .' aux-cart-type-'. $settings['cart_style'],
580
+ 'dropdown_class' => $dropdown_class,
581
+ 'dropdown_skin' => $settings['cart_content_skin'],
582
  'action_on' => $settings['action'],
583
  'icon' => $settings['icon'],
584
  'size' => $settings['image_size'],
585
  'width' => $settings['image_custom_dimension']['width'],
586
  'height' => $settings['image_custom_dimension']['height'],
587
+ 'simple_mode' => $settings['simple_cart_mode'],
588
+ 'basket_animation' => auxin_is_true( $settings['basket_animation'] ),
589
+ 'cart_header_text' => $settings['cart_header_text'],
590
+ 'total_price_text_in_dropdown' => $settings['total_price_text_in_dropdown']
591
  )
592
  );
593
  echo '</div>';
includes/elementor/widgets/theme-elements/site-title.php CHANGED
@@ -4,15 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
- use Elementor\Group_Control_Background;
15
- use Elementor\Group_Control_Box_Shadow;
16
  use Elementor\Group_Control_Text_Shadow;
17
 
18
 
@@ -210,7 +203,7 @@ class SiteTitle extends Widget_Base {
210
  ),
211
  )
212
  );
213
-
214
  $this->end_controls_section();
215
 
216
  $this->start_controls_section(
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
 
 
9
  use Elementor\Group_Control_Text_Shadow;
10
 
11
 
203
  ),
204
  )
205
  );
206
+
207
  $this->end_controls_section();
208
 
209
  $this->start_controls_section(
includes/elementor/widgets/touch-slider.php CHANGED
@@ -4,13 +4,8 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
  use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
  use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
 
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
7
  use Elementor\Group_Control_Typography;
 
8
  use Elementor\Scheme_Typography;
 
 
 
9
 
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
includes/elementor/widgets/video.php CHANGED
@@ -4,14 +4,6 @@ namespace Auxin\Plugin\CoreElements\Elementor\Elements;
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
7
- use Elementor\Group_Control_Image_Size;
8
- use Elementor\Group_Control_Typography;
9
- use Elementor\Scheme_Color;
10
- use Elementor\Scheme_Typography;
11
- use Elementor\Utils;
12
- use Elementor\Control_Media;
13
- use Elementor\Group_Control_Border;
14
-
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
17
  exit; // Exit if accessed directly.
@@ -137,9 +129,12 @@ class Video extends Widget_Base {
137
  'type' => Controls_Manager::URL,
138
  'show_external' => false,
139
  'placeholder' => 'https://vimeo.com/119777338',
140
- 'condition' => array(
141
- 'type' => array( 'link' ),
142
- )
 
 
 
143
  )
144
  );
145
 
4
  use Elementor\Plugin;
5
  use Elementor\Widget_Base;
6
  use Elementor\Controls_Manager;
 
 
 
 
 
 
 
 
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
9
  exit; // Exit if accessed directly.
129
  'type' => Controls_Manager::URL,
130
  'show_external' => false,
131
  'placeholder' => 'https://vimeo.com/119777338',
132
+ 'condition' => [
133
+ 'type' => 'link'
134
+ ],
135
+ 'dynamic' => [
136
+ 'active' => true
137
+ ]
138
  )
139
  );
140
 
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -593,7 +593,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
593
  // Carousel Options
594
  array(
595
  'heading' => __( 'Column space', 'auxin-elements' ),
596
- 'description' => __( 'Specifies space between carousel columns in pixels.', 'auxin-elements' ),
597
  'param_name' => 'carousel_space',
598
  'type' => 'textfield',
599
  'value' => '30',
593
  // Carousel Options
594
  array(
595
  'heading' => __( 'Column space', 'auxin-elements' ),
596
+ 'description' => __( 'Specifies horizontal space between items (pixel).', 'auxin-elements' ),
597
  'param_name' => 'carousel_space',
598
  'type' => 'textfield',
599
  'value' => '30',
includes/elements/staff.php CHANGED
@@ -576,6 +576,7 @@ function auxin_widget_staff_callback( $atts, $shortcode_content = null ){
576
  'icon_align' => 'aux-horizontal',
577
  'social_github' => '',
578
  'social_delicious' => '',
 
579
  'layout_style' => 'top',
580
  'extra_classes' => '', // custom css class names for this element
581
  'custom_el_id' => '', // custom id attribute for this element
@@ -710,6 +711,12 @@ function auxin_widget_staff_callback( $atts, $shortcode_content = null ){
710
  <a class="github" href="<?php echo esc_url( $social_github ) ;?>" target="_blank"><span class="auxicon-github"></span>
711
  </a>
712
  </li>
 
 
 
 
 
 
713
  <?php } ?>
714
  </ul>
715
  </div>
576
  'icon_align' => 'aux-horizontal',
577
  'social_github' => '',
578
  'social_delicious' => '',
579
+ 'social_instagram' => '',
580
  'layout_style' => 'top',
581
  'extra_classes' => '', // custom css class names for this element
582
  'custom_el_id' => '', // custom id attribute for this element
711
  <a class="github" href="<?php echo esc_url( $social_github ) ;?>" target="_blank"><span class="auxicon-github"></span>
712
  </a>
713
  </li>
714
+ <?php } ?>
715
+ <?php if ( ! empty( $social_instagram ) ) { ;?>
716
+ <li>
717
+ <a class="instagram" href="<?php echo esc_url( $social_instagram ) ;?>" target="_blank"><span class="auxicon-instagram"></span>
718
+ </a>
719
+ </li>
720
  <?php } ?>
721
  </ul>
722
  </div>
includes/elements/text.php CHANGED
@@ -1013,9 +1013,10 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
1013
  'btn_nofollow' => false,
1014
  'footer_shape' => '',
1015
  'footer_shape_color' => '',
 
1016
  'extra_classes' => '', // custom css class names for this element
1017
  'custom_el_id' => '', // custom id attribute for this element
1018
- 'base_class' => 'aux-widget-text' // base class name for container
1019
  );
1020
 
1021
 
@@ -1171,14 +1172,16 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
1171
  <div class="aux-text-widget-overlay" <?php echo $overlay_style ;?>></div>
1172
  <?php } ?>
1173
 
1174
- <?php if( ! empty( $icon ) || ! empty( $image ) || ! empty( $header_bg_img ) ) { ?>
1175
  <div class="aux-text-widget-header <?php echo $header_classess ;?>" <?php echo $header_styles ;?> >
1176
  <div class="aux-ico-box <?php echo $icon_box_classnames ;?> " <?php echo $icon_styles ;?>>
1177
  <?php if ( ! empty( $icon ) ){ ;?>
1178
  <span class="aux-ico <?php echo esc_attr( $icon_classname ) ;?>" > </span>
1179
  <?php } elseif ( ! empty( $image ) ) { ?>
1180
  <?php echo $image; ?>
1181
- <?php } ?>
 
 
1182
  </div>
1183
  </div>
1184
  <?php } ?>
1013
  'btn_nofollow' => false,
1014
  'footer_shape' => '',
1015
  'footer_shape_color' => '',
1016
+ 'icon_svg_inline' => '',
1017
  'extra_classes' => '', // custom css class names for this element
1018
  'custom_el_id' => '', // custom id attribute for this element
1019
+ 'base_class' => 'aux-widget-text' // base class name for container
1020
  );
1021
 
1022
 
1172
  <div class="aux-text-widget-overlay" <?php echo $overlay_style ;?>></div>
1173
  <?php } ?>
1174
 
1175
+ <?php if( ! empty( $icon ) || ! empty( $image ) || ! empty( $header_bg_img ) || ! empty( $icon_svg_inline ) ) { ?>
1176
  <div class="aux-text-widget-header <?php echo $header_classess ;?>" <?php echo $header_styles ;?> >
1177
  <div class="aux-ico-box <?php echo $icon_box_classnames ;?> " <?php echo $icon_styles ;?>>
1178
  <?php if ( ! empty( $icon ) ){ ;?>
1179
  <span class="aux-ico <?php echo esc_attr( $icon_classname ) ;?>" > </span>
1180
  <?php } elseif ( ! empty( $image ) ) { ?>
1181
  <?php echo $image; ?>
1182
+ <?php } else { ?>
1183
+ <?php echo $icon_svg_inline ;?>
1184
+ <?php }; ?>
1185
  </div>
1186
  </div>
1187
  <?php } ?>
includes/general-functions.php CHANGED
@@ -2066,13 +2066,37 @@ function auxin_get_comments( $args = array() ){
2066
  * @return void
2067
  */
2068
  function auxin_get_header_template(){
2069
- $template = get_page_by_path( auxin_get_option( 'site_header_template', ' ' ), OBJECT, 'elementor_library' );
2070
- if( isset( $template->ID ) && $template->ID !== ' ' && get_post_status( $template->ID ) ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2071
  ?>
2072
- <header itemscope="itemscope" itemtype="https://schema.org/WPHeader">
2073
  <div class="aux-wrapper">
2074
  <div class="aux-header aux-header-elements-wrapper">
2075
- <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template->ID ); ?>
2076
  </div><!-- end of header-elements -->
2077
  </div><!-- end of wrapper -->
2078
  </header><!-- end header -->
@@ -2086,12 +2110,21 @@ function auxin_get_header_template(){
2086
  * @return void
2087
  */
2088
  function auxin_get_footer_template(){
2089
- $template = get_page_by_path( auxin_get_option( 'site_footer_template', ' ' ), OBJECT, 'elementor_library' );
2090
- if( isset( $template->ID ) && $template->ID !== ' ' && get_post_status( $template->ID ) ){
 
 
 
 
 
 
 
 
 
2091
  ?>
2092
- <footer itemtype="https://schema.org/WPFooter" itemscope="itemscope" role="contentinfo">
2093
  <div class="aux-wrapper">
2094
- <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template->ID ); ?>
2095
  </div><!-- end of wrapper -->
2096
  </footer><!-- end footer -->
2097
  <?php
@@ -2362,3 +2395,40 @@ function auxin_get_taxonomies( $args = [], $output = 'names', $operator = 'and'
2362
 
2363
  return $taxonomies;
2364
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2066
  * @return void
2067
  */
2068
  function auxin_get_header_template(){
2069
+ global $post;
2070
+
2071
+ $template_ID = auxin_get_option( 'site_elementor_header_template', '' );
2072
+ $template_ID = strpos( auxin_get_post_meta( $post, 'page_elementor_header_template' ), '-def') === false ?
2073
+ $template_ID : auxin_get_post_meta( $post, 'page_elementor_header_template' );
2074
+
2075
+ $attrs = [
2076
+ 'class' => ['aux-elementor-header'],
2077
+ 'id' => 'site-elementor-header',
2078
+ 'itemscope' => 'itemscope',
2079
+ 'itemtype' => 'https://schema.org/WPHeader',
2080
+ ];
2081
+
2082
+ if ( 'default' === $overlay_header = auxin_get_post_meta( $post, 'page_overlay_header', 'default' ) ) {
2083
+ $overlay_header = auxin_get_option('site_overlay_header');
2084
+ }
2085
+
2086
+ if ( 'default' === $attributes['data-sticky-height'] = auxin_get_post_meta( $post, 'page_header_container_scaled_height', 'default' ) ) {
2087
+ $attrs['data-sticky-height'] = auxin_get_option( 'site_header_container_scaled_height','60' );
2088
+ }
2089
+
2090
+ if ( auxin_is_true ( $overlay_header ) ) {
2091
+ array_push( $attrs['class'], 'aux-overlay-header' );
2092
+ }
2093
+
2094
+ if( isset( $template_ID ) && $template_ID !== ' ' && get_post_status( $template_ID ) ){
2095
  ?>
2096
+ <header <?php echo auxin_make_html_attributes( $attrs ) ;?> >
2097
  <div class="aux-wrapper">
2098
  <div class="aux-header aux-header-elements-wrapper">
2099
+ <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template_ID ); ?>
2100
  </div><!-- end of header-elements -->
2101
  </div><!-- end of wrapper -->
2102
  </header><!-- end header -->
2110
  * @return void
2111
  */
2112
  function auxin_get_footer_template(){
2113
+ $template_ID = auxin_get_option( 'site_elementor_footer_template', '' );
2114
+
2115
+ $attrs = [
2116
+ 'class' => ['aux-elementor-footer'],
2117
+ 'itemscope' => 'itemscope',
2118
+ 'itemtype' => 'https://schema.org/WPFooter',
2119
+ 'role' => 'contentinfo'
2120
+ ];
2121
+
2122
+ if( isset( $template_ID ) && $template_ID !== ' ' && get_post_status( $template_ID ) ){
2123
+
2124
  ?>
2125
+ <footer <?php echo auxin_make_html_attributes( $attrs ) ;?> >
2126
  <div class="aux-wrapper">
2127
+ <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template_ID ); ?>
2128
  </div><!-- end of wrapper -->
2129
  </footer><!-- end footer -->
2130
  <?php
2395
 
2396
  return $taxonomies;
2397
  }
2398
+
2399
+
2400
+ /**
2401
+ * Full Screen Search Results
2402
+ *
2403
+ */
2404
+ function auxin_search_page_results($post_type = 'post',$args = array()) {
2405
+ switch ($post_type) {
2406
+ case 'product':
2407
+ echo auxin_widget_the_recent_products_callback($args);
2408
+ break;
2409
+
2410
+ case 'portfolio':
2411
+ $additional_args = array(
2412
+ 'display_like' => 0,
2413
+ 'display_title' => 0,
2414
+ 'show_info' => 0,
2415
+ 'paginate' => false
2416
+ );
2417
+ $args = wp_parse_args( $additional_args, $args );
2418
+ echo auxin_widget_recent_portfolios_grid_callback($args);
2419
+ break;
2420
+
2421
+ case 'news':
2422
+ $additional_args = array(
2423
+ 'big_grid_style' => 'pattern-6',
2424
+ );
2425
+ $args = wp_parse_args( $additional_args, $args );
2426
+ echo auxin_widget_recent_news_big_grid_callback( $args );
2427
+ break;
2428
+
2429
+ default:
2430
+ echo auxin_widget_recent_posts_callback($args);
2431
+ break;
2432
+ }
2433
+
2434
+ }
includes/general-hooks.php CHANGED
@@ -569,10 +569,21 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
569
  // Sub section - Button 1 in header -------------------------------
570
 
571
  $fields_sections_list['sections'][] = array(
572
- 'id' => 'header-section-action-button1',
573
- 'parent' => 'header-section', // section parent's id
574
- 'title' => __( 'Header Button 1', 'auxin-elements' ),
575
- 'description' => __( 'Setting for Header Button 1', 'auxin-elements' )
 
 
 
 
 
 
 
 
 
 
 
576
  );
577
 
578
  $fields_sections_list['fields'][] = array(
@@ -582,6 +593,13 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
582
  'id' => 'site_header_show_btn1',
583
  'type' => 'switch',
584
  'default' => '0',
 
 
 
 
 
 
 
585
  'partial' => array(
586
  'selector' => '.aux-btn1-box',
587
  'container_inclusive' => true,
@@ -590,8 +608,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
590
  );
591
 
592
  $fields_sections_list['fields'][] = array(
593
- 'title' => __( 'Hide Button 1 on Tablet', THEME_DOMAIN ),
594
- 'description' => __( 'Enable it to hide header button 1 on tablet devices.', THEME_DOMAIN ),
595
  'id' => 'site_header_show_btn1_on_tablet',
596
  'section' => 'header-section-action-button1',
597
  'dependency' => array(
@@ -599,7 +617,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
599
  'id' => 'site_header_show_btn1',
600
  'value' => array('1'),
601
  'operator'=> ''
602
- )
 
 
 
 
 
603
  ),
604
  'default' => '1',
605
  'transport' => 'postMessage',
@@ -608,8 +631,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
608
  );
609
 
610
  $fields_sections_list['fields'][] = array(
611
- 'title' => __( 'Hide Button 1 on Mobile', THEME_DOMAIN ),
612
- 'description' => __( 'Enable it to hide header button 1 on tablet devices.', THEME_DOMAIN ),
613
  'id' => 'site_header_show_btn1_on_phone',
614
  'section' => 'header-section-action-button1',
615
  'dependency' => array(
@@ -617,7 +640,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
617
  'id' => 'site_header_show_btn1',
618
  'value' => array('1'),
619
  'operator'=> ''
620
- )
 
 
 
 
 
621
  ),
622
  'default' => '1',
623
  'transport' => 'postMessage',
@@ -637,7 +665,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
637
  'id' => 'site_header_show_btn1',
638
  'value' => '1',
639
  'operator'=> '=='
640
- )
 
 
 
 
 
641
  ),
642
  'transport' => 'postMessage',
643
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").html( to );'
@@ -662,7 +695,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
662
  'id' => 'site_header_show_btn1',
663
  'value' => '1',
664
  'operator'=> '=='
665
- )
 
 
 
 
 
666
  ),
667
  'transport' => 'postMessage',
668
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-exlarge aux-large aux-medium aux-small aux-tiny" ).addClass( "aux-" + to );'
@@ -694,7 +732,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
694
  'id' => 'site_header_show_btn1',
695
  'value' => '1',
696
  'operator'=> '=='
697
- )
 
 
 
 
 
698
  ),
699
  'transport' => 'postMessage',
700
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-round aux-curve" ).addClass( "aux-" + to );'
@@ -726,7 +769,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
726
  'id' => 'site_header_show_btn1',
727
  'value' => '1',
728
  'operator'=> '=='
729
- )
 
 
 
 
 
730
  ),
731
  'transport' => 'postMessage',
732
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-3d aux-outline" ).addClass( "aux-" + to );'
@@ -744,7 +792,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
744
  'id' => 'site_header_show_btn1',
745
  'value' => '1',
746
  'operator'=> '=='
747
- )
 
 
 
 
 
748
  ),
749
  'transport' => 'postMessage'
750
  );
@@ -761,7 +814,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
761
  'id' => 'site_header_show_btn1',
762
  'value' => '1',
763
  'operator'=> '=='
764
- )
 
 
 
 
 
765
  ),
766
  'transport' => 'refresh'
767
  );
@@ -804,7 +862,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
804
  'id' => 'site_header_show_btn1',
805
  'value' => '1',
806
  'operator'=> '=='
807
- )
 
 
 
 
 
808
  ),
809
  'transport' => 'postMessage',
810
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").alterClass( "aux-icon-*", "aux-icon-" + to );'
@@ -823,7 +886,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
823
  'id' => 'site_header_show_btn1',
824
  'value' => '1',
825
  'operator'=> '=='
826
- )
 
 
 
 
 
827
  ),
828
  'transport' => 'refresh'
829
  );
@@ -841,7 +909,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
841
  'id' => 'site_header_show_btn1',
842
  'value' => '1',
843
  'operator'=> '=='
844
- )
 
 
 
 
 
845
  ),
846
  'transport' => 'refresh'
847
  );
@@ -858,7 +931,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
858
  'id' => 'site_header_show_btn1',
859
  'value' => '1',
860
  'operator'=> '=='
861
- )
 
 
 
 
 
862
  ),
863
  'transport' => 'postMessage',
864
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").prop( "href", to );'
@@ -880,7 +958,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
880
  'id' => 'site_header_show_btn1',
881
  'value' => '1',
882
  'operator'=> '=='
883
- )
 
 
 
 
 
884
  ),
885
  'transport' => 'postMessage',
886
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").prop( "target", to );'
@@ -891,10 +974,21 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
891
  // Sub section - Button 2 in header -------------------------------
892
 
893
  $fields_sections_list['sections'][] = array(
894
- 'id' => 'header-section-action-button2',
895
- 'parent' => 'header-section', // section parent's id
896
- 'title' => __( 'Header Button 2', 'auxin-elements' ),
897
- 'description' => __( 'Setting for Header Button 2', 'auxin-elements' )
 
 
 
 
 
 
 
 
 
 
 
898
  );
899
 
900
  $fields_sections_list['fields'][] = array(
@@ -903,7 +997,14 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
903
  'section' => 'header-section-action-button2',
904
  'id' => 'site_header_show_btn2',
905
  'type' => 'switch',
906
- 'default' => 0,
 
 
 
 
 
 
 
907
  'partial' => array(
908
  'selector' => '.aux-btn2-box',
909
  'container_inclusive' => true,
@@ -912,8 +1013,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
912
  );
913
 
914
  $fields_sections_list['fields'][] = array(
915
- 'title' => __( 'Hide Button 2 on Tablet', THEME_DOMAIN ),
916
- 'description' => __( 'Enable it to hide header button 2 on tablet devices.', THEME_DOMAIN ),
917
  'id' => 'site_header_show_btn2_on_tablet',
918
  'section' => 'header-section-action-button2',
919
  'dependency' => array(
@@ -921,7 +1022,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
921
  'id' => 'site_header_show_btn2',
922
  'value' => array('1'),
923
  'operator'=> ''
924
- )
 
 
 
 
 
925
  ),
926
  'default' => '1',
927
  'transport' => 'postMessage',
@@ -930,8 +1036,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
930
  );
931
 
932
  $fields_sections_list['fields'][] = array(
933
- 'title' => __( 'Hide Button 2 on Mobile', THEME_DOMAIN ),
934
- 'description' => __( 'Enable it to hide header button 2 on tablet devices.', THEME_DOMAIN ),
935
  'id' => 'site_header_show_btn2_on_phone',
936
  'section' => 'header-section-action-button2',
937
  'dependency' => array(
@@ -939,7 +1045,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
939
  'id' => 'site_header_show_btn2',
940
  'value' => array('1'),
941
  'operator'=> ''
942
- )
 
 
 
 
 
943
  ),
944
  'default' => '1',
945
  'transport' => 'postMessage',
@@ -959,7 +1070,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
959
  'id' => 'site_header_show_btn2',
960
  'value' => 1,
961
  'operator'=> '=='
962
- )
 
 
 
 
 
963
  ),
964
  'transport' => 'postMessage',
965
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").html( to );'
@@ -984,7 +1100,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
984
  'id' => 'site_header_show_btn2',
985
  'value' => 1,
986
  'operator'=> '=='
987
- )
 
 
 
 
 
988
  ),
989
  'transport' => 'postMessage',
990
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-exlarge aux-large aux-medium aux-small aux-tiny" ).addClass( "aux-" + to );'
@@ -1016,7 +1137,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1016
  'id' => 'site_header_show_btn2',
1017
  'value' => 1,
1018
  'operator'=> '=='
1019
- )
 
 
 
 
 
1020
  ),
1021
  'transport' => 'postMessage',
1022
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-round aux-curve" ).addClass( "aux-" + to );'
@@ -1048,7 +1174,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1048
  'id' => 'site_header_show_btn2',
1049
  'value' => 1,
1050
  'operator'=> '=='
1051
- )
 
 
 
 
 
1052
  ),
1053
  'transport' => 'postMessage',
1054
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-3d aux-outline" ).addClass( "aux-" + to );'
@@ -1066,7 +1197,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1066
  'id' => 'site_header_show_btn2',
1067
  'value' => '1',
1068
  'operator'=> '=='
1069
- )
 
 
 
 
 
1070
  ),
1071
  'transport' => 'postMessage'
1072
  );
@@ -1083,7 +1219,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1083
  'id' => 'site_header_show_btn2',
1084
  'value' => 1,
1085
  'operator'=> '=='
1086
- )
 
 
 
 
 
1087
  ),
1088
  'transport' => 'refresh'
1089
  );
@@ -1126,7 +1267,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1126
  'id' => 'site_header_show_btn2',
1127
  'value' => 1,
1128
  'operator'=> '=='
1129
- )
 
 
 
 
 
1130
  ),
1131
  'transport' => 'postMessage',
1132
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").alterClass( "aux-icon-*", "aux-icon-" + to );'
@@ -1145,7 +1291,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1145
  'id' => 'site_header_show_btn2',
1146
  'value' => 1,
1147
  'operator'=> '=='
1148
- )
 
 
 
 
 
1149
  ),
1150
  'transport' => 'refresh'
1151
  );
@@ -1163,7 +1314,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1163
  'id' => 'site_header_show_btn2',
1164
  'value' => '1',
1165
  'operator'=> '=='
1166
- )
 
 
 
 
 
1167
  ),
1168
  'transport' => 'refresh'
1169
  );
@@ -1180,7 +1336,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1180
  'id' => 'site_header_show_btn2',
1181
  'value' => 1,
1182
  'operator'=> '=='
1183
- )
 
 
 
 
 
1184
  ),
1185
  'transport' => 'postMessage',
1186
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").prop( "href", to );'
@@ -1202,7 +1363,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1202
  'id' => 'site_header_show_btn2',
1203
  'value' => 1,
1204
  'operator'=> '=='
1205
- )
 
 
 
 
 
1206
  ),
1207
  'transport' => 'postMessage',
1208
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").prop( "target", to );'
@@ -1222,7 +1388,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1222
  'id' => 'show_site_footer',
1223
  'value' => array('1'),
1224
  'operator'=> '=='
1225
- )
 
 
 
 
 
1226
  ),
1227
  'default' => '',
1228
  'transport' => 'postMessage',
@@ -1244,7 +1415,12 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1244
  'id' => 'show_site_footer',
1245
  'value' => array('1'),
1246
  'operator'=> '=='
1247
- )
 
 
 
 
 
1248
  ),
1249
  'default' => '50',
1250
  'transport' => 'postMessage',
@@ -1613,7 +1789,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1613
  'section' => 'tools-section-maintenance',
1614
  'dependency' => array(),
1615
  'transport' => 'refresh',
1616
- 'default' => 0,
1617
  'type' => 'switch',
1618
  );
1619
 
@@ -1636,20 +1812,19 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1636
  // Sub section - Custom Search -------------------------------
1637
 
1638
  $fields_sections_list['sections'][] = array(
1639
- 'id' => 'tools-section-search',
1640
  'parent' => 'tools-section', // section parent's id
1641
  'title' => __( 'Search Results', 'auxin-elements' ),
1642
  'description' => __( 'Search Results Options', 'auxin-elements' )
1643
  );
1644
 
1645
-
1646
  //--------------------------------
1647
 
1648
  $fields_sections_list['fields'][] = array(
1649
  'title' => __( 'Exclude Posts Types', 'auxin-elements' ),
1650
- 'description' => __( 'Exclude these post types from search results.', 'auxin-elements' ),
1651
  'id' => 'auxin_search_exclude_post_types',
1652
- 'section' => 'tools-section-search',
1653
  'dependency' => array(),
1654
  'transport' => 'postMessage',
1655
  'default' => '',
@@ -1660,7 +1835,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1660
  'title' => __( 'Exclude Posts Without Featured Image', 'auxin-elements' ),
1661
  'description' => __( 'Exclude posts without featured image in search results.', 'auxin-elements' ),
1662
  'id' => 'auxin_search_exclude_no_media',
1663
- 'section' => 'tools-section-search',
1664
  'dependency' => array(),
1665
  'transport' => 'postMessage',
1666
  'default' => '',
@@ -1671,7 +1846,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
1671
  'title' => __( 'Include posts', 'auxin-elements' ),
1672
  'description' => __( 'If you intend to include additional posts, you should specify the posts here.<br>You have to insert the Post IDs that are separated by camma (eg. 53,34,87,25)', 'auxin-elements' ),
1673
  'id' => 'auxin_search_pinned_contents',
1674
- 'section' => 'tools-section-search',
1675
  'dependency' => array(),
1676
  'transport' => 'postMessage',
1677
  'default' => '',
@@ -2568,7 +2743,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
2568
  $display_comments = true;
2569
  $display_author_header = true;
2570
  $display_author_footer = false;
2571
-
2572
  // Use taxonomy template option if is category or tag archive page
2573
 
2574
  if( is_category() || is_tag() ){
@@ -3151,23 +3326,26 @@ function auxin_get_star_rating_html( $rating_html, $rating ){
3151
  add_filter( 'woocommerce_product_get_rating_html', 'auxin_get_star_rating_html', 10, 2 );
3152
 
3153
  /*-----------------------------------------------------------------------------------*/
3154
- /* Disable ajax add to cart on free version
3155
  /*-----------------------------------------------------------------------------------*/
3156
- function auxin_disable_woocommerce_ajax_add_to_cart( $args ){
3157
  if( ! defined('AUXSHP_VERSION' ) ) {
3158
  global $product;
3159
  $args['class'] = implode( ' ', array_filter( array(
3160
  'button',
 
3161
  'product_type_' . $product->get_type(),
3162
  $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : ''
3163
  ) ) );
 
 
 
3164
  }
3165
 
3166
  return $args;
3167
  }
3168
 
3169
- add_filter( 'woocommerce_loop_add_to_cart_args', 'auxin_disable_woocommerce_ajax_add_to_cart', 10 );
3170
-
3171
 
3172
  /**
3173
  * Override inner body sections hooks for replace header&footer
@@ -3175,17 +3353,29 @@ add_filter( 'woocommerce_loop_add_to_cart_args', 'auxin_disable_woocommerce_ajax
3175
  * @return void
3176
  */
3177
  function auxin_override_inner_body_sections(){
3178
- if( auxin_is_true( auxin_get_option( 'site_header_override_template', '0' ) ) ) {
 
 
 
 
 
 
 
 
 
 
 
3179
  remove_action( 'auxin_after_inner_body_open', 'auxin_the_top_header_section', 4 );
3180
  remove_action( 'auxin_after_inner_body_open', 'auxin_the_main_header_section', 4 );
3181
  add_action( 'auxin_after_inner_body_open', 'auxin_get_header_template', 4 );
3182
  }
3183
- if( auxin_is_true( auxin_get_option( 'site_footer_override_template', '0' ) ) ) {
 
3184
  remove_action( 'auxin_before_the_footer', 'auxin_the_site_footer' );
3185
  add_action( 'auxin_before_the_footer', 'auxin_get_footer_template' );
3186
  }
3187
  }
3188
- add_action( 'wp_loaded', 'auxin_override_inner_body_sections' );
3189
 
3190
  /**
3191
  * Add canvas on elementor single template
@@ -3228,4 +3418,4 @@ function auxin_override_elementor_canvas_template( $template ){
3228
 
3229
  return $template;
3230
  }
3231
- add_filter( 'template_include', 'auxin_override_elementor_canvas_template', 12 );
569
  // Sub section - Button 1 in header -------------------------------
570
 
571
  $fields_sections_list['sections'][] = array(
572
+ 'id' => 'header-section-action-button1',
573
+ 'parent' => 'header-section', // section parent's id
574
+ 'title' => __( 'Header Button 1', 'auxin-elements' ),
575
+ 'description' => __( 'Setting for Header Button 1', 'auxin-elements' ),
576
+ 'is_deprecated' => true
577
+ );
578
+
579
+ $fields_sections_list['fields'][] = array(
580
+ 'title' => __( 'Use Legacy Header', 'auxin-elements' ),
581
+ 'description' => __( 'Enable it to replace header section with an Elementor template', 'auxin-elements' ),
582
+ 'id' => 'site_header_btn1_section_use_legacy',
583
+ 'section' => 'header-section-action-button1',
584
+ 'type' => 'switch',
585
+ 'default' => '0',
586
+ 'related_controls' => ['site_header_use_legacy']
587
  );
588
 
589
  $fields_sections_list['fields'][] = array(
593
  'id' => 'site_header_show_btn1',
594
  'type' => 'switch',
595
  'default' => '0',
596
+ 'dependency' => array(
597
+ array(
598
+ 'id' => 'site_header_use_legacy',
599
+ 'value' => '1',
600
+ 'operator'=> '=='
601
+ ),
602
+ ),
603
  'partial' => array(
604
  'selector' => '.aux-btn1-box',
605
  'container_inclusive' => true,
608
  );
609
 
610
  $fields_sections_list['fields'][] = array(
611
+ 'title' => __( 'Hide Button 1 on Tablet', 'auxin-elements' ),
612
+ 'description' => __( 'Enable it to hide header button 1 on tablet devices.', 'auxin-elements' ),
613
  'id' => 'site_header_show_btn1_on_tablet',
614
  'section' => 'header-section-action-button1',
615
  'dependency' => array(
617
  'id' => 'site_header_show_btn1',
618
  'value' => array('1'),
619
  'operator'=> ''
620
+ ),
621
+ array(
622
+ 'id' => 'site_header_use_legacy',
623
+ 'value' => '1',
624
+ 'operator'=> '=='
625
+ ),
626
  ),
627
  'default' => '1',
628
  'transport' => 'postMessage',
631
  );
632
 
633
  $fields_sections_list['fields'][] = array(
634
+ 'title' => __( 'Hide Button 1 on Mobile', 'auxin-elements' ),
635
+ 'description' => __( 'Enable it to hide header button 1 on tablet devices.', 'auxin-elements' ),
636
  'id' => 'site_header_show_btn1_on_phone',
637
  'section' => 'header-section-action-button1',
638
  'dependency' => array(
640
  'id' => 'site_header_show_btn1',
641
  'value' => array('1'),
642
  'operator'=> ''
643
+ ),
644
+ array(
645
+ 'id' => 'site_header_use_legacy',
646
+ 'value' => '1',
647
+ 'operator'=> '=='
648
+ ),
649
  ),
650
  'default' => '1',
651
  'transport' => 'postMessage',
665
  'id' => 'site_header_show_btn1',
666
  'value' => '1',
667
  'operator'=> '=='
668
+ ),
669
+ array(
670
+ 'id' => 'site_header_use_legacy',
671
+ 'value' => '1',
672
+ 'operator'=> '=='
673
+ ),
674
  ),
675
  'transport' => 'postMessage',
676
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").html( to );'
695
  'id' => 'site_header_show_btn1',
696
  'value' => '1',
697
  'operator'=> '=='
698
+ ),
699
+ array(
700
+ 'id' => 'site_header_use_legacy',
701
+ 'value' => '1',
702
+ 'operator'=> '=='
703
+ ),
704
  ),
705
  'transport' => 'postMessage',
706
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-exlarge aux-large aux-medium aux-small aux-tiny" ).addClass( "aux-" + to );'
732
  'id' => 'site_header_show_btn1',
733
  'value' => '1',
734
  'operator'=> '=='
735
+ ),
736
+ array(
737
+ 'id' => 'site_header_use_legacy',
738
+ 'value' => '1',
739
+ 'operator'=> '=='
740
+ ),
741
  ),
742
  'transport' => 'postMessage',
743
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-round aux-curve" ).addClass( "aux-" + to );'
769
  'id' => 'site_header_show_btn1',
770
  'value' => '1',
771
  'operator'=> '=='
772
+ ),
773
+ array(
774
+ 'id' => 'site_header_use_legacy',
775
+ 'value' => '1',
776
+ 'operator'=> '=='
777
+ ),
778
  ),
779
  'transport' => 'postMessage',
780
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-3d aux-outline" ).addClass( "aux-" + to );'
792
  'id' => 'site_header_show_btn1',
793
  'value' => '1',
794
  'operator'=> '=='
795
+ ),
796
+ array(
797
+ 'id' => 'site_header_use_legacy',
798
+ 'value' => '1',
799
+ 'operator'=> '=='
800
+ ),
801
  ),
802
  'transport' => 'postMessage'
803
  );
814
  'id' => 'site_header_show_btn1',
815
  'value' => '1',
816
  'operator'=> '=='
817
+ ),
818
+ array(
819
+ 'id' => 'site_header_use_legacy',
820
+ 'value' => '1',
821
+ 'operator'=> '=='
822
+ ),
823
  ),
824
  'transport' => 'refresh'
825
  );
862
  'id' => 'site_header_show_btn1',
863
  'value' => '1',
864
  'operator'=> '=='
865
+ ),
866
+ array(
867
+ 'id' => 'site_header_use_legacy',
868
+ 'value' => '1',
869
+ 'operator'=> '=='
870
+ ),
871
  ),
872
  'transport' => 'postMessage',
873
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").alterClass( "aux-icon-*", "aux-icon-" + to );'
886
  'id' => 'site_header_show_btn1',
887
  'value' => '1',
888
  'operator'=> '=='
889
+ ),
890
+ array(
891
+ 'id' => 'site_header_use_legacy',
892
+ 'value' => '1',
893
+ 'operator'=> '=='
894
+ ),
895
  ),
896
  'transport' => 'refresh'
897
  );
909
  'id' => 'site_header_show_btn1',
910
  'value' => '1',
911
  'operator'=> '=='
912
+ ),
913
+ array(
914
+ 'id' => 'site_header_use_legacy',
915
+ 'value' => '1',
916
+ 'operator'=> '=='
917
+ ),
918
  ),
919
  'transport' => 'refresh'
920
  );
931
  'id' => 'site_header_show_btn1',
932
  'value' => '1',
933
  'operator'=> '=='
934
+ ),
935
+ array(
936
+ 'id' => 'site_header_use_legacy',
937
+ 'value' => '1',
938
+ 'operator'=> '=='
939
+ ),
940
  ),
941
  'transport' => 'postMessage',
942
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").prop( "href", to );'
958
  'id' => 'site_header_show_btn1',
959
  'value' => '1',
960
  'operator'=> '=='
961
+ ),
962
+ array(
963
+ 'id' => 'site_header_use_legacy',
964
+ 'value' => '1',
965
+ 'operator'=> '=='
966
+ ),
967
  ),
968
  'transport' => 'postMessage',
969
  'post_js' => '$(".aux-btn1-box .aux-ac-btn1").prop( "target", to );'
974
  // Sub section - Button 2 in header -------------------------------
975
 
976
  $fields_sections_list['sections'][] = array(
977
+ 'id' => 'header-section-action-button2',
978
+ 'parent' => 'header-section', // section parent's id
979
+ 'title' => __( 'Header Button 2', 'auxin-elements' ),
980
+ 'description' => __( 'Setting for Header Button 2', 'auxin-elements' ),
981
+ 'is_deprecated' => true
982
+ );
983
+
984
+ $fields_sections_list['fields'][] = array(
985
+ 'title' => __( 'Use Legacy Header', 'auxin-elements' ),
986
+ 'description' => __( 'Enable it to replace header section with an Elementor template', 'auxin-elements' ),
987
+ 'id' => 'site_header_btn2_section_use_legacy',
988
+ 'section' => 'header-section-action-button2',
989
+ 'type' => 'switch',
990
+ 'default' => '0',
991
+ 'related_controls' => ['site_header_use_legacy']
992
  );
993
 
994
  $fields_sections_list['fields'][] = array(
997
  'section' => 'header-section-action-button2',
998
  'id' => 'site_header_show_btn2',
999
  'type' => 'switch',
1000
+ 'default' => '0',
1001
+ 'dependency' => array(
1002
+ array(
1003
+ 'id' => 'site_header_use_legacy',
1004
+ 'value' => '1',
1005
+ 'operator'=> '=='
1006
+ ),
1007
+ ),
1008
  'partial' => array(
1009
  'selector' => '.aux-btn2-box',
1010
  'container_inclusive' => true,
1013
  );
1014
 
1015
  $fields_sections_list['fields'][] = array(
1016
+ 'title' => __( 'Hide Button 2 on Tablet', 'auxin-elements' ),
1017
+ 'description' => __( 'Enable it to hide header button 2 on tablet devices.', 'auxin-elements' ),
1018
  'id' => 'site_header_show_btn2_on_tablet',
1019
  'section' => 'header-section-action-button2',
1020
  'dependency' => array(
1022
  'id' => 'site_header_show_btn2',
1023
  'value' => array('1'),
1024
  'operator'=> ''
1025
+ ),
1026
+ array(
1027
+ 'id' => 'site_header_use_legacy',
1028
+ 'value' => '1',
1029
+ 'operator'=> '=='
1030
+ ),
1031
  ),
1032
  'default' => '1',
1033
  'transport' => 'postMessage',
1036
  );
1037
 
1038
  $fields_sections_list['fields'][] = array(
1039
+ 'title' => __( 'Hide Button 2 on Mobile', 'auxin-elements' ),
1040
+ 'description' => __( 'Enable it to hide header button 2 on tablet devices.', 'auxin-elements' ),
1041
  'id' => 'site_header_show_btn2_on_phone',
1042
  'section' => 'header-section-action-button2',
1043
  'dependency' => array(
1045
  'id' => 'site_header_show_btn2',
1046
  'value' => array('1'),
1047
  'operator'=> ''
1048
+ ),
1049
+ array(
1050
+ 'id' => 'site_header_use_legacy',
1051
+ 'value' => '1',
1052
+ 'operator'=> '=='
1053
+ ),
1054
  ),
1055
  'default' => '1',
1056
  'transport' => 'postMessage',
1070
  'id' => 'site_header_show_btn2',
1071
  'value' => 1,
1072
  'operator'=> '=='
1073
+ ),
1074
+ array(
1075
+ 'id' => 'site_header_use_legacy',
1076
+ 'value' => '1',
1077
+ 'operator'=> '=='
1078
+ ),
1079
  ),
1080
  'transport' => 'postMessage',
1081
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").html( to );'
1100
  'id' => 'site_header_show_btn2',
1101
  'value' => 1,
1102
  'operator'=> '=='
1103
+ ),
1104
+ array(
1105
+ 'id' => 'site_header_use_legacy',
1106
+ 'value' => '1',
1107
+ 'operator'=> '=='
1108
+ ),
1109
  ),
1110
  'transport' => 'postMessage',
1111
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-exlarge aux-large aux-medium aux-small aux-tiny" ).addClass( "aux-" + to );'
1137
  'id' => 'site_header_show_btn2',
1138
  'value' => 1,
1139
  'operator'=> '=='
1140
+ ),
1141
+ array(
1142
+ 'id' => 'site_header_use_legacy',
1143
+ 'value' => '1',
1144
+ 'operator'=> '=='
1145
+ ),
1146
  ),
1147
  'transport' => 'postMessage',
1148
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-round aux-curve" ).addClass( "aux-" + to );'
1174
  'id' => 'site_header_show_btn2',
1175
  'value' => 1,
1176
  'operator'=> '=='
1177
+ ),
1178
+ array(
1179
+ 'id' => 'site_header_use_legacy',
1180
+ 'value' => '1',
1181
+ 'operator'=> '=='
1182
+ ),
1183
  ),
1184
  'transport' => 'postMessage',
1185
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-3d aux-outline" ).addClass( "aux-" + to );'
1197
  'id' => 'site_header_show_btn2',
1198
  'value' => '1',
1199
  'operator'=> '=='
1200
+ ),
1201
+ array(
1202
+ 'id' => 'site_header_use_legacy',
1203
+ 'value' => '1',
1204
+ 'operator'=> '=='
1205
+ ),
1206
  ),
1207
  'transport' => 'postMessage'
1208
  );
1219
  'id' => 'site_header_show_btn2',
1220
  'value' => 1,
1221
  'operator'=> '=='
1222
+ ),
1223
+ array(
1224
+ 'id' => 'site_header_use_legacy',
1225
+ 'value' => '1',
1226
+ 'operator'=> '=='
1227
+ ),
1228
  ),
1229
  'transport' => 'refresh'
1230
  );
1267
  'id' => 'site_header_show_btn2',
1268
  'value' => 1,
1269
  'operator'=> '=='
1270
+ ),
1271
+ array(
1272
+ 'id' => 'site_header_use_legacy',
1273
+ 'value' => '1',
1274
+ 'operator'=> '=='
1275
+ ),
1276
  ),
1277
  'transport' => 'postMessage',
1278
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").alterClass( "aux-icon-*", "aux-icon-" + to );'
1291
  'id' => 'site_header_show_btn2',
1292
  'value' => 1,
1293
  'operator'=> '=='
1294
+ ),
1295
+ array(
1296
+ 'id' => 'site_header_use_legacy',
1297
+ 'value' => '1',
1298
+ 'operator'=> '=='
1299
+ ),
1300
  ),
1301
  'transport' => 'refresh'
1302
  );
1314
  'id' => 'site_header_show_btn2',
1315
  'value' => '1',
1316
  'operator'=> '=='
1317
+ ),
1318
+ array(
1319
+ 'id' => 'site_header_use_legacy',
1320
+ 'value' => '1',
1321
+ 'operator'=> '=='
1322
+ ),
1323
  ),
1324
  'transport' => 'refresh'
1325
  );
1336
  'id' => 'site_header_show_btn2',
1337
  'value' => 1,
1338
  'operator'=> '=='
1339
+ ),
1340
+ array(
1341
+ 'id' => 'site_header_use_legacy',
1342
+ 'value' => '1',
1343
+ 'operator'=> '=='
1344
+ ),
1345
  ),
1346
  'transport' => 'postMessage',
1347
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").prop( "href", to );'
1363
  'id' => 'site_header_show_btn2',
1364
  'value' => 1,
1365
  'operator'=> '=='
1366
+ ),
1367
+ array(
1368
+ 'id' => 'site_header_use_legacy',
1369
+ 'value' => '1',
1370
+ 'operator'=> '=='
1371
+ ),
1372
  ),
1373
  'transport' => 'postMessage',
1374
  'post_js' => '$(".aux-btn2-box .aux-ac-btn2").prop( "target", to );'
1388
  'id' => 'show_site_footer',
1389
  'value' => array('1'),
1390
  'operator'=> '=='
1391
+ ),
1392
+ array(
1393
+ 'id' => 'site_footer_use_legacy',
1394
+ 'value' => array('1'),
1395
+ 'operator'=> '=='
1396
+ )
1397
  ),
1398
  'default' => '',
1399
  'transport' => 'postMessage',
1415
  'id' => 'show_site_footer',
1416
  'value' => array('1'),
1417
  'operator'=> '=='
1418
+ ),
1419
+ array(
1420
+ 'id' => 'site_footer_use_legacy',
1421
+ 'value' => array('1'),
1422
+ 'operator'=> '=='
1423
+ )
1424
  ),
1425
  'default' => '50',
1426
  'transport' => 'postMessage',
1789
  'section' => 'tools-section-maintenance',
1790
  'dependency' => array(),
1791
  'transport' => 'refresh',
1792
+ 'default' => '0',
1793
  'type' => 'switch',
1794
  );
1795
 
1812
  // Sub section - Custom Search -------------------------------
1813
 
1814
  $fields_sections_list['sections'][] = array(
1815
+ 'id' => 'tools-section-search-result',
1816
  'parent' => 'tools-section', // section parent's id
1817
  'title' => __( 'Search Results', 'auxin-elements' ),
1818
  'description' => __( 'Search Results Options', 'auxin-elements' )
1819
  );
1820
 
 
1821
  //--------------------------------
1822
 
1823
  $fields_sections_list['fields'][] = array(
1824
  'title' => __( 'Exclude Posts Types', 'auxin-elements' ),
1825
+ 'description' => __( 'The post types which should be excluded from search results.', 'auxin-elements' ),
1826
  'id' => 'auxin_search_exclude_post_types',
1827
+ 'section' => 'tools-section-search-result',
1828
  'dependency' => array(),
1829
  'transport' => 'postMessage',
1830
  'default' => '',
1835
  'title' => __( 'Exclude Posts Without Featured Image', 'auxin-elements' ),
1836
  'description' => __( 'Exclude posts without featured image in search results.', 'auxin-elements' ),
1837
  'id' => 'auxin_search_exclude_no_media',
1838
+ 'section' => 'tools-section-search-result',
1839
  'dependency' => array(),
1840
  'transport' => 'postMessage',
1841
  'default' => '',
1846
  'title' => __( 'Include posts', 'auxin-elements' ),
1847
  'description' => __( 'If you intend to include additional posts, you should specify the posts here.<br>You have to insert the Post IDs that are separated by camma (eg. 53,34,87,25)', 'auxin-elements' ),
1848
  'id' => 'auxin_search_pinned_contents',
1849
+ 'section' => 'tools-section-search-result',
1850
  'dependency' => array(),
1851
  'transport' => 'postMessage',
1852
  'default' => '',
2743
  $display_comments = true;
2744
  $display_author_header = true;
2745
  $display_author_footer = false;
2746
+
2747
  // Use taxonomy template option if is category or tag archive page
2748
 
2749
  if( is_category() || is_tag() ){
3326
  add_filter( 'woocommerce_product_get_rating_html', 'auxin_get_star_rating_html', 10, 2 );
3327
 
3328
  /*-----------------------------------------------------------------------------------*/
3329
+ /* Enable ajax add to cart on free version
3330
  /*-----------------------------------------------------------------------------------*/
3331
+ function auxels_enable_woocommerce_ajax_add_to_cart( $args ){
3332
  if( ! defined('AUXSHP_VERSION' ) ) {
3333
  global $product;
3334
  $args['class'] = implode( ' ', array_filter( array(
3335
  'button',
3336
+ 'aux-ajax-add-to-cart',
3337
  'product_type_' . $product->get_type(),
3338
  $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : ''
3339
  ) ) );
3340
+
3341
+ $args['attributes']['data-product-type'] = $product->get_type();
3342
+ $args['attributes']['data-verify_nonce'] = wp_create_nonce( 'aux_add_to_cart-' . $product->get_id() );
3343
  }
3344
 
3345
  return $args;
3346
  }
3347
 
3348
+ add_filter( 'woocommerce_loop_add_to_cart_args', 'auxels_enable_woocommerce_ajax_add_to_cart', 10 );
 
3349
 
3350
  /**
3351
  * Override inner body sections hooks for replace header&footer
3353
  * @return void
3354
  */
3355
  function auxin_override_inner_body_sections(){
3356
+
3357
+ global $post;
3358
+
3359
+ if( ! class_exists( '\Elementor\Plugin' ) ){
3360
+ return;
3361
+ }
3362
+
3363
+ if ( 'default' === $use_legacy_header = auxin_get_post_meta( $post, 'page_header_use_legacy', 'default' ) ) {
3364
+ $use_legacy_header = auxin_get_option('site_header_use_legacy');
3365
+ }
3366
+
3367
+ if( ! auxin_is_true( $use_legacy_header ) ) {
3368
  remove_action( 'auxin_after_inner_body_open', 'auxin_the_top_header_section', 4 );
3369
  remove_action( 'auxin_after_inner_body_open', 'auxin_the_main_header_section', 4 );
3370
  add_action( 'auxin_after_inner_body_open', 'auxin_get_header_template', 4 );
3371
  }
3372
+
3373
+ if( ! auxin_is_true( auxin_get_option( 'site_footer_use_legacy', '0' ) ) ) {
3374
  remove_action( 'auxin_before_the_footer', 'auxin_the_site_footer' );
3375
  add_action( 'auxin_before_the_footer', 'auxin_get_footer_template' );
3376
  }
3377
  }
3378
+ add_action( 'wp', 'auxin_override_inner_body_sections' );
3379
 
3380
  /**
3381
  * Add canvas on elementor single template
3418
 
3419
  return $template;
3420
  }
3421
+ add_filter( 'template_include', 'auxin_override_elementor_canvas_template', 12 );
public/assets/js/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Phlox Core Plugin - v2.4.19 (2020-02-03)
2
  * All required plugins
3
  * http://phlox.pro/
4
  */
1
+ /*! Phlox Core Plugin - v2.5.0 (2020-03-09)
2
  * All required plugins
3
  * http://phlox.pro/
4
  */
public/assets/js/scripts.js ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function($, window, document, undefined){
2
+ const AuxinRemoveCartContent = function() {
3
+ // Remove cart content
4
+ $(document).on( 'click', '.aux-remove-cart-content', function(e) {
5
+ e.preventDefault();
6
+
7
+ var product_id = $(this).data("product_id");
8
+ var verify_nonce = $(this).data("verify_nonce");
9
+ var $cartBoxEl = $(this).closest('.aux-cart-wrapper').addClass('aux-cart-remove-in-progress');
10
+
11
+ $.ajax({
12
+ type: 'POST',
13
+ dataType: 'json',
14
+ url: auxin.ajax_url,
15
+ data: {
16
+ action: "auxels_remove_from_cart",
17
+ product_id: product_id,
18
+ verify_nonce: verify_nonce,
19
+ },
20
+ success: function( response ){
21
+ // Remove old notification
22
+ $(".woocommerce-message, .woocommerce-error").remove();
23
+ // Start Notifications
24
+ if( response.success ) {
25
+ $('.aux-hidden-blocks').append( response.data.notif );
26
+
27
+ if( parseInt(response.data.total) === 0 ) {
28
+ $('.aux-card-dropdown').html(response.data.empty);
29
+ $('.aux-cart-contents').find('span').remove();
30
+ } else {
31
+ $('.aux-card-item').filter(function(){
32
+ return $(this).data('product-id') == product_id;
33
+ }).remove();
34
+ $('.aux-cart-contents').find('span').text(response.data.count);
35
+ }
36
+ $(".aux-cart-subtotal").each(function() {
37
+ $(this).find('.woocommerce-Price-amount').contents().filter(function(){
38
+ return this.nodeType == 3;
39
+ })[0].nodeValue = response.data.total;
40
+ });
41
+ $cartBoxEl.removeClass('aux-cart-remove-in-progress');
42
+ } else {
43
+ $('.aux-hidden-blocks').append( response.data );
44
+ }
45
+ }
46
+ });
47
+
48
+ });
49
+ };
50
+
51
+ const AuxinAjaxAddToCart = function() {
52
+ // Add Content to Cart
53
+ $(document).on( 'click', '.aux-ajax-add-to-cart', function(e) {
54
+ var productType = $(this).data("product-type");
55
+
56
+ if ( productType !== 'simple') {
57
+ return;
58
+ }
59
+
60
+ e.preventDefault();
61
+
62
+ var product_id = $(this).data("product_id");
63
+ var quantity = $(this).data("quantity");
64
+ var verify_nonce = $(this).data("verify_nonce");
65
+ var $cartBoxEl = $('.aux-cart-wrapper');
66
+ var hasAnimation = $cartBoxEl.hasClass('aux-basket-animation') ? true : false;
67
+
68
+ $cartBoxEl.trigger('AuxCartInProgress');
69
+
70
+ if ( $(this).parents('.aux-shop-quicklook-modal') ) {
71
+ quantity = $(this).parents('.aux-shop-quicklook-modal').find('.quantity input').val();
72
+ }
73
+
74
+ $.ajax({
75
+ type: 'POST',
76
+ dataType: 'json',
77
+ url: auxin.ajax_url,
78
+ data: {
79
+ action : "auxels_add_to_cart",
80
+ args : auxin_cart_options,
81
+ product_id : product_id,
82
+ quantity : quantity,
83
+ verify_nonce: verify_nonce
84
+ },
85
+ success: function( response ){
86
+ // Remove old notification
87
+ $(".woocommerce-message, .woocommerce-error").remove();
88
+ // Start Notifications
89
+ if( response.success ) {
90
+ $('.aux-hidden-blocks').append( response.data.notif );
91
+
92
+ setTimeout( function(){
93
+ if ( hasAnimation ) {
94
+ $cartBoxEl.on('AuxCartProgressAnimationDone', function(e) {
95
+ $cartBoxEl.find('.aux-card-dropdown').html( response.data.items );
96
+ $cartBoxEl.find('.aux-shopping-basket').html( response.data.total );
97
+ $cartBoxEl.trigger('AuxCartUpdated');
98
+ });
99
+ } else {
100
+ $cartBoxEl.find('.aux-card-dropdown').html( response.data.items );
101
+ $cartBoxEl.find('.aux-shopping-basket').html( response.data.total );
102
+ $cartBoxEl.trigger('AuxCartUpdated');
103
+ }
104
+ }, 150);
105
+
106
+
107
+ } else {
108
+ $('.aux-hidden-blocks').append( response.data );
109
+ }
110
+
111
+ }
112
+
113
+ });
114
+
115
+ });
116
+ };
117
+
118
+ $(document).ready(function(){
119
+ AuxinRemoveCartContent();
120
+ AuxinAjaxAddToCart();
121
+ });
122
+ })(jQuery,window,document);
public/class-auxels.php CHANGED
@@ -88,6 +88,7 @@ class AUXELS {
88
  // Load AJAX spesific codes on demand
89
  if ( defined('DOING_AJAX') && DOING_AJAX ){
90
  include( AUXELS_ADMIN_DIR . '/includes/admin-ajax.php' );
 
91
  include( 'includes/frontend-ajax.php' );
92
  }
93
 
88
  // Load AJAX spesific codes on demand
89
  if ( defined('DOING_AJAX') && DOING_AJAX ){
90
  include( AUXELS_ADMIN_DIR . '/includes/admin-ajax.php' );
91
+ include( AUXELS_ADMIN_DIR . '/includes/admin-the-functions.php' );
92
  include( 'includes/frontend-ajax.php' );
93
  }
94
 
public/includes/class-auxels-frontend-assets.php CHANGED
@@ -36,6 +36,7 @@ class AUXELS_Frontend_Assets {
36
 
37
  //wp_enqueue_style( AUXELS_SLUG .'-main', AUXELS_PUB_URL . '/assets/css/main.css', array(), AUXELS_VERSION );
38
  wp_enqueue_script( AUXELS_SLUG .'-plugins', AUXELS_PUB_URL . '/assets/js/plugins.min.js', array('jquery'), AUXELS_VERSION, true );
 
39
  }
40
 
41
  }
36
 
37
  //wp_enqueue_style( AUXELS_SLUG .'-main', AUXELS_PUB_URL . '/assets/css/main.css', array(), AUXELS_VERSION );
38
  wp_enqueue_script( AUXELS_SLUG .'-plugins', AUXELS_PUB_URL . '/assets/js/plugins.min.js', array('jquery'), AUXELS_VERSION, true );
39
+ wp_enqueue_script( AUXELS_SLUG .'-scripts', AUXELS_PUB_URL . '/assets/js/scripts.js', array('jquery'), AUXELS_VERSION, true );
40
  }
41
 
42
  }
public/includes/frontend-ajax.php CHANGED
@@ -112,4 +112,199 @@ function auxels_ajax_handler_element_load_more(){
112
  }
113
 
114
  add_action( 'wp_ajax_load_more_element', 'auxels_ajax_handler_element_load_more' );
115
- add_action( 'wp_ajax_nopriv_load_more_element', 'auxels_ajax_handler_element_load_more' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
113
 
114
  add_action( 'wp_ajax_load_more_element', 'auxels_ajax_handler_element_load_more' );
115
+ add_action( 'wp_ajax_nopriv_load_more_element', 'auxels_ajax_handler_element_load_more' );
116
+
117
+ /**
118
+ * Remove Product from Cart via Ajax
119
+ *
120
+ * @return void
121
+ */
122
+ function auxels_remove_product_from_cart() {
123
+
124
+ if ( !class_exists( 'WooCommerce' ) )
125
+ return;
126
+
127
+ global $woocommerce;
128
+
129
+ try {
130
+
131
+ $nonce = $_POST['verify_nonce'];
132
+ $id = $_POST['product_id'];
133
+
134
+ if( ! isset( $_POST['product_id'] ) || ! wp_verify_nonce( $nonce, 'remove_cart-' . $id ) ){
135
+ wp_send_json_error( sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-error">%s</div>', __('Verification failed!', 'auxin-elements') ) );
136
+ }
137
+
138
+ $cart = $woocommerce->cart;
139
+ $cart_id = $cart->generate_cart_id($id);
140
+ $cart_item_id = $cart->find_product_in_cart($cart_id);
141
+
142
+ if( $cart_item_id ) {
143
+ $cart->set_quantity( $cart_item_id, 0 );
144
+ }
145
+
146
+ $cart->calculate_totals();
147
+
148
+ $response = array(
149
+ 'total' => wc_format_decimal( $cart->cart_contents_total, 2 ),
150
+ 'count' => $cart->cart_contents_count,
151
+ 'empty' => sprintf( '<div class="aux-card-box">%s</div>', __( 'Your cart is currently empty.', 'auxin-elements' ) ),
152
+ 'notif' => sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-message">%s</div>', __('Item has been removed from your shopping cart.', 'auxin-elements') )
153
+ );
154
+
155
+ wp_send_json_success( $response );
156
+
157
+ } catch (Exception $e) {
158
+ wp_send_json_error( sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-error">%s</div>', __('An Error Occurred!', 'auxin-elements') ) );
159
+ }
160
+
161
+ }
162
+ add_action( 'wp_ajax_auxels_remove_from_cart', 'auxels_remove_product_from_cart' );
163
+ add_action( 'wp_ajax_nopriv_auxels_remove_from_cart', 'auxels_remove_product_from_cart' );
164
+
165
+
166
+ /**
167
+ * Add to Cart via Ajax
168
+ */
169
+ function auxels_add_product_to_cart() {
170
+
171
+ if ( ! class_exists( 'WooCommerce' ) )
172
+ return;
173
+
174
+ global $woocommerce;
175
+
176
+ try {
177
+
178
+ $product_id = isset( $_POST['product_id'] ) ? absint( $_POST['product_id'] ) : '';
179
+ $quantity = empty( $_POST['quantity'] ) ? 1 : wc_stock_amount( $_POST['quantity'] );
180
+ $verify_nonce = isset( $_POST['verify_nonce'] ) ? $_POST['verify_nonce'] : '';
181
+ $passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity );
182
+
183
+ if( empty( $product_id ) || ! wp_verify_nonce( $verify_nonce, 'aux_add_to_cart-' . $product_id ) ){
184
+ wp_send_json_error( sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-error">%s</div>', __('Verification failed!', 'auxin-elements') ) );
185
+ } else {
186
+ // Add item to cart
187
+ if( $passed_validation && WC()->cart->add_to_cart( $product_id, $quantity ) ) {
188
+ $args = isset( $_POST['args'] ) ? $_POST['args'] : array(
189
+ 'title' => '',
190
+ 'css_class' => '',
191
+ 'dropdown_class' => '',
192
+ 'color_class' => 'aux-black',
193
+ 'action_on' => 'click',
194
+ 'cart_url' => '#',
195
+ 'dropdown_skin' => '',
196
+ );
197
+ $items = auxin_get_cart_items( $args );
198
+ $count = $woocommerce->cart->cart_contents_count;
199
+ $total = auxin_get_cart_basket( $args, $count );
200
+
201
+ $data = array(
202
+ 'items' => $items,
203
+ 'total' => $total,
204
+ 'notif' => sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-message"><a href="%s" class="button wc-forward">%s</a> "%s" %s</div>', esc_url( wc_get_cart_url() ) , __( 'View cart', 'auxin-elements' ), get_the_title( $product_id ) , __('has been added to your cart.', 'auxin-elements') )
205
+ );
206
+ // Send json success
207
+ wp_send_json_success( $data );
208
+ } else {
209
+ wp_send_json_error( sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-error">%s</div>', __('Sorry, this product cannot be purchased.', 'auxin-elements') ) );
210
+ }
211
+
212
+ }
213
+
214
+ } catch( Exception $e ){
215
+ wp_send_json_error( sprintf( '<div class="aux-woocommerce-ajax-notification woocommerce-error">%s</div>', __('An Error Occurred!', 'auxin-elements') ) );
216
+ }
217
+
218
+ }
219
+ add_action( 'wp_ajax_auxels_add_to_cart', 'auxels_add_product_to_cart' );
220
+ add_action( 'wp_ajax_nopriv_auxels_add_to_cart', 'auxels_add_product_to_cart' );
221
+
222
+
223
+
224
+ /**
225
+ * Ajax Search Handler
226
+ *
227
+ * @return void
228
+ */
229
+ function auxels_ajax_search() {
230
+
231
+ $search_post_type = post_type_exists( 'product' ) ? 'product' : 'post';
232
+ $second_post_type = 'post';
233
+
234
+ $s = trim( sanitize_text_field( $_GET['s'] ) );
235
+ if ( "0" == $cat = trim( sanitize_text_field( $_GET['cat'] ) ) ) {
236
+ $cat = '';
237
+ }
238
+
239
+ // Dom Wrapper
240
+ $empty_wrapper_start = "<div class='aux-empty-result'>";
241
+ $empty_wrapper_end = "</div>";
242
+
243
+ // Emtpy Result Message and Dom - when main post type is empty or both post types or empty
244
+ $empty_result_message = esc_html__( "Nothing Matched %s From %s", 'auxin-elements' );
245
+ $both_empty_result_message = esc_html__( "Nothing Matched %s From %s And %s", 'auxin-elements');
246
+
247
+ $empty_result_dom = $empty_wrapper_start.
248
+ "<span class='aux-empty-result'>".
249
+ sprintf(
250
+ $empty_result_message,
251
+ "<span class='aux-search-phrase'>\"".$s."\"</span><br>",
252
+ "<span class='aux-post-type'>\"".$search_post_type."\"</span>"
253
+ ).
254
+ "</span>".
255
+ $empty_wrapper_end;
256
+
257
+ $both_empty_result_dom = $empty_wrapper_start.
258
+ "<span class='aux-empty-result'>".
259
+ sprintf(
260
+ $both_empty_result_message,
261
+ "<span class='aux-search-phrase'>\"".$s."\"</span><br>",
262
+ "<span class='aux-post-type'>\"".$search_post_type."\"</span>",
263
+ "<span class='aux-post-type'>\"".$second_post_type."\"</span>"
264
+ ).
265
+ "</span>".
266
+ $empty_wrapper_end;
267
+
268
+
269
+ // Start Searching First Post type
270
+ $search_instance = new Auxels_Search_Post_Type($s,$cat,$search_post_type,'');
271
+ if ( $search_post_type == 'product')
272
+ $first_result = $search_instance->search_products();
273
+ else if ($search_post_type == 'portfolio' )
274
+ $first_result = $search_instance->search_portfolio();
275
+ else
276
+ $first_result = $search_instance->search_general_post_types();
277
+
278
+ if ( empty( $first_result ) )
279
+ $first_result = $empty_result_dom;
280
+
281
+ if ( ! auxin_get_option( 'fullscreen_second_search_result', false )) {
282
+ echo $first_result;
283
+ die();
284
+ }
285
+
286
+ // Start Searching second post type
287
+ $search_instance->set_query_args(array( 'post_type' => $second_post_type));
288
+ if ( $second_post_type == 'product')
289
+ $second_result = $search_instance->search_products();
290
+ else if ($second_post_type == 'portfolio' )
291
+ $second_result = $search_instance->search_portfolio();
292
+ else
293
+ $second_result = $search_instance->search_general_post_types();
294
+
295
+ if ( ! empty( $second_result ) ) {
296
+
297
+ $first_result .= "<span class='aux-other-search-result-label'>".esc_html__( 'From', 'auxin-elements' ).' '.$second_post_type."</span>";
298
+ $first_result .= "<div class='aux-other-search-result'>";
299
+ $first_result .= $second_result."</div>";
300
+
301
+ } else if ( $first_result == $empty_result_dom) {
302
+ $first_result = $both_empty_result_dom;
303
+ }
304
+
305
+ echo $first_result;
306
+ die();
307
+ }
308
+
309
+ add_action( 'wp_ajax_auxin_ajax_search', 'auxels_ajax_search' );
310
+ add_action( 'wp_ajax_nopriv_auxin_ajax_search', 'auxels_ajax_search');