Version Description
Download this release
Release Info
Developer | averta |
Plugin | 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
- README.txt +111 -1
- admin/assets/js/elementor/widgets.js +25 -20
- admin/assets/js/plugins.js +1 -1
- admin/includes/admin-ajax.php +12 -1
- admin/includes/admin-hooks.php +94 -39
- admin/includes/admin-the-functions.php +148 -0
- admin/includes/compatibility/element-pack/element-pack.php +12 -0
- admin/includes/index.php +2 -0
- admin/includes/metaboxes/metabox-fields-general-custom-logo.php +59 -0
- admin/includes/metaboxes/metabox-fields-general-header-template-settings.php +71 -0
- admin/includes/metaboxes/metabox-fields-general-header-template.php +85 -0
- admin/includes/metaboxes/metabox-fields-general-header.php +250 -175
- admin/includes/metaboxes/metabox-fields-general-top-header.php +62 -9
- auxin-elements.php +1 -1
- includes/classes/class-auxels-search-post-type.php +296 -0
- includes/classes/class-auxin-demo-importer.php +148 -46
- includes/classes/class-auxin-welcome-sections.php +4 -2
- includes/classes/class-auxin-welcome.php +4 -4
- includes/define.php +1 -1
- includes/elementor/class-auxin-elementor-core-elements.php +148 -113
- includes/elementor/modules/documents/footer.php +1 -1
- includes/elementor/widgets/accordion.php +0 -4
- includes/elementor/widgets/audio.php +0 -7
- includes/elementor/widgets/before-after.php +0 -6
- includes/elementor/widgets/button.php +2 -7
- includes/elementor/widgets/carousel-navigation.php +522 -0
- includes/elementor/widgets/contact-box.php +0 -7
- includes/elementor/widgets/contact-form.php +0 -7
- includes/elementor/widgets/custom-list.php +4 -5
- includes/elementor/widgets/divider.php +0 -7
- includes/elementor/widgets/gallery.php +0 -12
- includes/elementor/widgets/gmap.php +1 -8
- includes/elementor/widgets/icon.php +1 -10
- includes/elementor/widgets/image.php +4 -3
- includes/elementor/widgets/mailchimp.php +3 -7
- includes/elementor/widgets/quote.php +0 -4
- includes/elementor/widgets/recent-comments.php +1 -6
- includes/elementor/widgets/recent-posts-grid-carousel.php +4 -9
- includes/elementor/widgets/recent-posts-land-style.php +2 -8
- includes/elementor/widgets/recent-posts-masonry.php +5 -10
- includes/elementor/widgets/recent-posts-tiles-carousel.php +0 -5
- includes/elementor/widgets/recent-posts-tiles.php +0 -5
- includes/elementor/widgets/recent-posts-timeline.php +2 -7
- includes/elementor/widgets/recent-products.php +0 -5
- includes/elementor/widgets/search.php +0 -7
- includes/elementor/widgets/staff.php +56 -17
- includes/elementor/widgets/svg.php +447 -0
- includes/elementor/widgets/tabs.php +0 -4
- includes/elementor/widgets/testimonial.php +4 -3
- includes/elementor/widgets/text.php +27 -9
- includes/elementor/widgets/theme-elements/copyright.php +240 -0
- includes/elementor/widgets/theme-elements/current-time.php +0 -7
- includes/elementor/widgets/theme-elements/logo.php +38 -21
- includes/elementor/widgets/theme-elements/menu.php +267 -121
- includes/elementor/widgets/theme-elements/modern-search.php +634 -0
- includes/elementor/widgets/theme-elements/search.php +80 -60
- includes/elementor/widgets/theme-elements/shopping-cart.php +94 -11
- includes/elementor/widgets/theme-elements/site-title.php +1 -8
- includes/elementor/widgets/touch-slider.php +0 -5
- includes/elementor/widgets/video.php +6 -11
- includes/elements/recent-posts-grid-carousel.php +1 -1
- includes/elements/staff.php +7 -0
- includes/elements/text.php +6 -3
- includes/general-functions.php +78 -8
- includes/general-hooks.php +251 -61
- public/assets/js/plugins.js +1 -1
- public/assets/js/scripts.js +122 -0
- public/class-auxels.php +1 -0
- public/includes/class-auxels-frontend-assets.php +1 -0
- 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.
|
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.
|
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' =>
|
329 |
-
'priority' =>
|
330 |
Â
);
|
331 |
Â
|
332 |
Â
$models[] = array(
|
333 |
-
'model' =>
|
334 |
-
'priority' =>
|
335 |
Â
);
|
336 |
Â
|
337 |
Â
$models[] = array(
|
338 |
-
'model' =>
|
339 |
-
'priority' =>
|
340 |
Â
);
|
341 |
Â
|
342 |
Â
$models[] = array(
|
343 |
Â
'model' => auxin_metabox_fields_page_template(),
|
344 |
-
'priority' =>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
345 |
Â
);
|
346 |
Â
|
347 |
Â
$models[] = array(
|
348 |
Â
'model' => auxin_metabox_fields_general_advanced(),
|
349 |
-
'priority' =>
|
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
|
20 |
-
$model->id
|
21 |
-
$model->title
|
22 |
-
$model->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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' => '
|
315 |
-
'value' => array( '
|
316 |
-
|
Â
|
|
317 |
Â
),
|
318 |
-
'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 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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' => '
|
399 |
-
'value' => array( '
|
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' => '
|
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
|
20 |
-
$model->id
|
21 |
-
$model->title
|
Â
|
|
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.
|
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 |
-
$
|
62 |
Â
|
63 |
-
if( $template_status === 'copy' && false !== ( $data = auxin_get_transient( $
|
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( $
|
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',
|
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->
|
115 |
-
$data = $this->update_elementor_data( $data, 'upload' );
|
116 |
Â
}
|
117 |
Â
|
118 |
Â
if( $data ) {
|
119 |
Â
// Set transient for 48h
|
120 |
-
auxin_set_transient( $
|
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
|
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 |
-
$
|
Â
|
|
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 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
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( '
|
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( '
|
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( '
|
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 |
-
|
Â
|
|
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 |
-
$
|
762 |
-
$
|
763 |
-
|
764 |
Â
// If the taxonomy doesn't exist, then we create it
|
765 |
-
if ( ! $
|
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 |
-
$
|
773 |
Â
$key,
|
774 |
Â
$tax,
|
775 |
Â
array()
|
776 |
Â
);
|
777 |
-
if ( is_wp_error( $
|
778 |
Â
continue;
|
779 |
Â
}
|
780 |
Â
|
781 |
-
auxin_set_transient( 'auxin_category_new_id_of' . $value, $
|
782 |
Â
|
783 |
-
|
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(
|
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(
|
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(
|
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 = '
|
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 = '
|
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 '%
|
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.
|
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' ,
|
175 |
-
add_action( 'elementor/widgets/widgets_registered' ,
|
176 |
-
add_action( 'elementor/controls/controls_registered' ,
|
177 |
Â
|
178 |
Â
// Register Widget Styles
|
179 |
-
add_action( 'elementor/frontend/after_enqueue_styles' ,
|
180 |
Â
|
181 |
Â
// Register Widget Scripts
|
182 |
-
add_action( 'elementor/frontend/after_register_scripts',
|
183 |
Â
|
184 |
Â
// Register Admin Scripts
|
185 |
-
add_action( 'elementor/editor/before_enqueue_scripts' ,
|
186 |
Â
|
187 |
-
// Register
|
188 |
-
|
189 |
Â
|
Â
|
|
Â
|
|
190 |
Â
}
|
191 |
Â
|
192 |
Â
/**
|
@@ -198,157 +200,175 @@ final class Elements {
|
|
198 |
Â
*/
|
199 |
Â
public function register_widgets( $widgets_manager ) {
|
200 |
Â
|
201 |
-
$widgets =
|
202 |
Â
|
203 |
Â
/* Dynamic Elements
|
204 |
Â
/*-------------------------------------*/
|
205 |
-
'10' =>
|
206 |
Â
'file' => $this->dir_path . '/widgets/recent-posts-grid-carousel.php',
|
207 |
Â
'class' => 'Elements\RecentPostsGridCarousel'
|
208 |
-
|
209 |
-
'20' =>
|
210 |
Â
'file' => $this->dir_path . '/widgets/recent-posts-masonry.php',
|
211 |
Â
'class' => 'Elements\RecentPostsMasonry'
|
212 |
-
|
213 |
-
'30' =>
|
214 |
Â
'file' => $this->dir_path . '/widgets/recent-posts-land-style.php',
|
215 |
Â
'class' => 'Elements\RecentPostsLand'
|
216 |
-
|
217 |
-
'40' =>
|
218 |
Â
'file' => $this->dir_path . '/widgets/recent-posts-timeline.php',
|
219 |
Â
'class' => 'Elements\RecentPostsTimeline'
|
220 |
-
|
221 |
-
'50' =>
|
222 |
Â
'file' => $this->dir_path . '/widgets/recent-posts-tiles.php',
|
223 |
Â
'class' => 'Elements\RecentPostsTiles'
|
224 |
-
|
225 |
-
'60' =>
|
226 |
Â
'file' => $this->dir_path . '/widgets/recent-posts-tiles-carousel.php',
|
227 |
Â
'class' => 'Elements\RecentPostsTilesCarousel'
|
228 |
-
|
229 |
-
'70' =>
|
230 |
Â
'file' => $this->dir_path . '/widgets/recent-products.php',
|
231 |
Â
'class' => 'Elements\RecentProducts'
|
232 |
-
|
233 |
Â
|
234 |
-
'80' =>
|
235 |
Â
'file' => $this->dir_path . '/widgets/recent-comments.php',
|
236 |
Â
'class' => 'Elements\RecentComments'
|
237 |
-
|
238 |
Â
|
239 |
Â
/* General Elements
|
240 |
Â
/*-------------------------------------*/
|
241 |
-
'88' =>
|
242 |
Â
'file' => $this->dir_path . '/widgets/heading-modern.php',
|
243 |
Â
'class' => 'Elements\ModernHeading'
|
244 |
-
|
245 |
-
'89' =>
|
246 |
Â
'file' => $this->dir_path . '/widgets/icon.php',
|
247 |
Â
'class' => 'Elements\Icon'
|
248 |
-
|
249 |
-
'90' =>
|
250 |
Â
'file' => $this->dir_path . '/widgets/image.php',
|
251 |
Â
'class' => 'Elements\Image'
|
252 |
-
|
253 |
-
'100' =>
|
254 |
Â
'file' => $this->dir_path . '/widgets/gallery.php',
|
255 |
Â
'class' => 'Elements\Gallery'
|
256 |
-
|
257 |
-
'105' =>
|
258 |
Â
'file' => $this->dir_path . '/widgets/text.php',
|
259 |
Â
'class' => 'Elements\Text'
|
260 |
-
|
261 |
-
'110' =>
|
262 |
Â
'file' => $this->dir_path . '/widgets/divider.php',
|
263 |
Â
'class' => 'Elements\Divider'
|
264 |
-
|
265 |
-
'115' =>
|
266 |
Â
'file' => $this->dir_path . '/widgets/button.php',
|
267 |
Â
'class' => 'Elements\Button'
|
268 |
-
|
269 |
-
'120' =>
|
270 |
Â
'file' => $this->dir_path . '/widgets/accordion.php',
|
271 |
Â
'class' => 'Elements\Accordion'
|
272 |
-
|
273 |
-
'125' =>
|
274 |
Â
'file' => $this->dir_path . '/widgets/tabs.php',
|
275 |
Â
'class' => 'Elements\Tabs'
|
276 |
-
|
277 |
-
'130' =>
|
278 |
Â
'file' => $this->dir_path . '/widgets/audio.php',
|
279 |
Â
'class' => 'Elements\Audio'
|
280 |
-
|
281 |
-
'140' =>
|
282 |
Â
'file' => $this->dir_path . '/widgets/video.php',
|
283 |
Â
'class' => 'Elements\Video'
|
284 |
-
|
285 |
-
'145' =>
|
286 |
Â
'file' => $this->dir_path . '/widgets/quote.php',
|
287 |
Â
'class' => 'Elements\Quote'
|
288 |
-
|
289 |
-
'150' =>
|
290 |
Â
'file' => $this->dir_path . '/widgets/testimonial.php',
|
291 |
Â
'class' => 'Elements\Testimonial'
|
292 |
-
|
293 |
-
'155' =>
|
294 |
Â
'file' => $this->dir_path . '/widgets/contact-form.php',
|
295 |
Â
'class' => 'Elements\ContactForm'
|
296 |
-
|
297 |
-
'160' =>
|
298 |
Â
'file' => $this->dir_path . '/widgets/contact-box.php',
|
299 |
Â
'class' => 'Elements\ContactBox'
|
300 |
-
|
301 |
-
'165' =>
|
302 |
Â
'file' => $this->dir_path . '/widgets/touch-slider.php',
|
303 |
Â
'class' => 'Elements\TouchSlider'
|
304 |
-
|
305 |
-
'170' =>
|
306 |
Â
'file' => $this->dir_path . '/widgets/before-after.php',
|
307 |
Â
'class' => 'Elements\BeforeAfter'
|
308 |
-
|
309 |
-
'175' =>
|
310 |
Â
'file' => $this->dir_path . '/widgets/staff.php',
|
311 |
Â
'class' => 'Elements\Staff'
|
312 |
-
|
313 |
-
'180' =>
|
314 |
Â
'file' => $this->dir_path . '/widgets/gmap.php',
|
315 |
Â
'class' => 'Elements\Gmap'
|
316 |
-
|
317 |
-
'185' =>
|
318 |
Â
'file' => $this->dir_path . '/widgets/custom-list.php',
|
319 |
Â
'class' => 'Elements\CustomList'
|
320 |
-
|
321 |
-
'190' =>
|
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' =>
|
335 |
Â
'file' => $this->dir_path . '/widgets/theme-elements/search.php',
|
336 |
Â
'class' => 'Elements\Theme_Elements\SearchBox'
|
337 |
-
|
338 |
-
'210' =>
|
339 |
Â
'file' => $this->dir_path . '/widgets/theme-elements/site-title.php',
|
340 |
Â
'class' => 'Elements\Theme_Elements\SiteTitle'
|
341 |
-
|
342 |
-
'215' =>
|
343 |
Â
'file' => $this->dir_path . '/widgets/theme-elements/menu.php',
|
344 |
Â
'class' => 'Elements\Theme_Elements\MenuBox'
|
345 |
-
|
346 |
-
'220' =>
|
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 |
-
*
|
663 |
Â
*
|
664 |
-
* Change The Default
|
665 |
Â
*
|
666 |
Â
* @since 1.0.0
|
667 |
Â
*
|
668 |
Â
* @access public
|
669 |
Â
*/
|
670 |
-
public function
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
Â
|
|
Â
|
|
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' => __( '
|
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: {{
|
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: {{
|
532 |
Â
],
|
533 |
Â
'separator' => 'after'
|
534 |
Â
]
|
@@ -756,7 +752,7 @@ class MailChimp extends Widget_Base {
|
|
756 |
Â
]
|
757 |
Â
],
|
758 |
Â
'selectors' => [
|
759 |
-
'{{WRAPPER}} .mc4wp-form-fields' => 'height: {{
|
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
|
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' =>
|
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' =>
|
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' =>
|
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' =>
|
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'
|
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'
|
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'
|
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 |
-
'
|
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'
|
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'
|
128 |
-
'raw' =>
|
Â
|
|
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'
|
188 |
-
|
Â
|
|
Â
|
|
Â
|
|
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( $
|
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'
|
135 |
-
'type'
|
136 |
-
'options'
|
137 |
-
'default'
|
138 |
Â
'save_default' => true,
|
139 |
-
'
|
140 |
-
|
Â
|
|
Â
|
|
Â
|
|
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' ),
|
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'
|
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
|
Â
|
|
204 |
Â
'type' => Controls_Manager::SELECT,
|
205 |
Â
'default' => '768',
|
206 |
Â
'options' => array(
|
207 |
-
'1024' => __('Tablet' , 'auxin-elements' ),
|
208 |
-
'768' => __('Mobile' , 'auxin-elements' ),
|
209 |
-
'custom' => __('Custom'
|
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' => __('
|
246 |
Â
'type' => 'aux-visual-select',
|
247 |
-
'style_items' => '
|
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' => __(
|
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' => __('
|
Â
|
|
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}}
|
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 |
-
|
354 |
Â
array(
|
355 |
-
'name' => '
|
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 |
-
|
423 |
Â
array(
|
424 |
-
'name' => '
|
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->
|
483 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
484 |
Â
array(
|
485 |
-
'label'
|
486 |
-
'
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
'right' => array(
|
498 |
-
'title' => __( 'Right', 'auxin-elements' ),
|
499 |
-
'icon' => 'fa fa-align-right',
|
500 |
-
),
|
501 |
Â
),
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
507 |
Â
)
|
508 |
Â
);
|
509 |
Â
|
510 |
Â
$this->end_controls_section();
|
511 |
Â
|
512 |
Â
|
513 |
-
/*
|
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' => __('
|
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' => __('
|
565 |
Â
'type' => 'aux-visual-select',
|
566 |
-
'style_items' => 'max-width:
|
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 |
-
'
|
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 |
-
'
|
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' => __( '
|
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 |
-
|
734 |
-
|
735 |
-
'name'
|
736 |
-
'
|
737 |
-
|
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 |
-
|
804 |
-
|
805 |
-
'name'
|
806 |
-
'
|
807 |
-
|
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}}
|
1060 |
Â
),
|
1061 |
Â
'seperartor' => 'after'
|
1062 |
Â
)
|
@@ -1072,13 +1173,11 @@ class MenuBox extends Widget_Base {
|
|
1072 |
Â
);
|
1073 |
Â
|
1074 |
Â
$this->add_group_control(
|
1075 |
-
|
1076 |
-
|
1077 |
-
'name'
|
1078 |
-
'
|
1079 |
-
|
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}}
|
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
|
1141 |
Â
)
|
1142 |
Â
);
|
1143 |
Â
|
1144 |
Â
$this->add_group_control(
|
1145 |
-
|
1146 |
-
|
1147 |
-
'name'
|
1148 |
-
'
|
1149 |
-
|
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}}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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'
|
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'
|
126 |
-
'icon' => __('Icon'
|
127 |
-
'button' => __('Button'
|
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' => __('
|
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 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
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 |
-
|
489 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
490 |
Â
|
Â
|
|
Â
|
|
Â
|
|
491 |
Â
|
492 |
-
|
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
|
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' => '
|
150 |
-
'selectors' =>
|
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' . $
|
Â
|
|
Â
|
|
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' =>
|
141 |
-
'type' =>
|
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
|
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'
|
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 |
-
$
|
2070 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2071 |
Â
?>
|
2072 |
-
<header
|
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( $
|
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 |
-
$
|
2090 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2091 |
Â
?>
|
2092 |
-
<footer
|
2093 |
Â
<div class="aux-wrapper">
|
2094 |
-
<?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $
|
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'
|
573 |
-
'parent'
|
574 |
-
'title'
|
575 |
-
'description'
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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',
|
594 |
-
'description' => __( 'Enable it to hide header button 1 on tablet devices.',
|
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',
|
612 |
-
'description' => __( 'Enable it to hide header button 1 on tablet devices.',
|
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'
|
895 |
-
'parent'
|
896 |
-
'title'
|
897 |
-
'description'
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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',
|
916 |
-
'description' => __( 'Enable it to hide header button 2 on tablet devices.',
|
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',
|
934 |
-
'description' => __( 'Enable it to hide header button 2 on tablet devices.',
|
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' => __( '
|
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 |
-
/*
|
3155 |
Â
/*-----------------------------------------------------------------------------------*/
|
3156 |
-
function
|
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', '
|
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 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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 |
-
|
Â
|
|
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( '
|
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.
|
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');
|