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',