Version Description
- Amaz Store - Initial Released.
Download this release
Release Info
Developer | themehunk |
Plugin | ThemeHunk Customizer |
Version | 2.5.9 |
Comparing to | |
See all releases |
Code changes from version 2.5.8 to 2.5.9
- amaz-store/amaz-store-admin/amaz-store-shortcode.php +33 -0
- amaz-store/amaz-store-admin/widget/about-us-widget.php +189 -0
- amaz-store/amaz-store-admin/widget/post-single-slide-widget.php +148 -0
- amaz-store/amaz-store-admin/widget/widget-input.php +31 -0
- amaz-store/amaz-store-admin/woo/amaz-store-admin.php +510 -0
- amaz-store/amaz-store-admin/woo/woo-ajax.php +17 -0
- amaz-store/amaz-store-front-page/front-banner.php +11 -0
- amaz-store/amaz-store-front-page/front-categoryslider.php +158 -0
- amaz-store/amaz-store-front-page/front-highlight.php +16 -0
- amaz-store/amaz-store-front-page/front-productlist.php +24 -0
- amaz-store/amaz-store-front-page/front-productslider.php +25 -0
- amaz-store/amaz-store-front-page/front-ribbon.php +45 -0
- amaz-store/amaz-store-front-page/front-tabproduct.php +35 -0
- amaz-store/amaz-store-front-page/front-topslider.php +118 -0
- amaz-store/customizer/customizer.php +40 -0
- amaz-store/customizer/images/ribbon-layout-1.png +0 -0
- amaz-store/customizer/images/ribbon-layout-2.png +0 -0
- amaz-store/customizer/section/frontpage/banner.php +176 -0
- amaz-store/customizer/section/frontpage/category-slider.php +123 -0
- amaz-store/customizer/section/frontpage/category-tab.php +104 -0
- amaz-store/customizer/section/frontpage/higlight.php +73 -0
- amaz-store/customizer/section/frontpage/product-list.php +98 -0
- amaz-store/customizer/section/frontpage/product-slide.php +113 -0
- amaz-store/customizer/section/frontpage/ribbon.php +252 -0
- amaz-store/customizer/section/frontpage/top-slider.php +425 -0
- amaz-store/demo/import.php +106 -0
- amaz-store/include.php +9 -0
- readme.txt +5 -2
- themehunk-customizer.php +13 -2
amaz-store/amaz-store-admin/amaz-store-shortcode.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
+
function amaz_store_shortcode_template($section_name=''){
|
4 |
+
switch ($section_name){
|
5 |
+
case 'amaz_store_show_frontpage':
|
6 |
+
$section = array(
|
7 |
+
'front-banner',
|
8 |
+
'front-tabproduct',
|
9 |
+
'front-categoryslider',
|
10 |
+
'front-productslider',
|
11 |
+
'front-ribbon',
|
12 |
+
'front-productlist',
|
13 |
+
'front-highlight',
|
14 |
+
|
15 |
+
);
|
16 |
+
foreach($section as $value):
|
17 |
+
require_once (THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/amaz-store-front-page/'.$value.'.php');
|
18 |
+
endforeach;
|
19 |
+
break;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
function amaz_store_shortcodeid_data($atts){
|
23 |
+
$output = '';
|
24 |
+
if (class_exists('WooCommerce')) {
|
25 |
+
$pull_quote_atts = shortcode_atts(array(
|
26 |
+
'section' => ''
|
27 |
+
), $atts);
|
28 |
+
$section_name = wp_kses_post($pull_quote_atts['section']);
|
29 |
+
$output = amaz_store_shortcode_template($section_name);
|
30 |
+
}
|
31 |
+
return $output;
|
32 |
+
}
|
33 |
+
add_shortcode('amaz-store', 'amaz_store_shortcodeid_data');
|
amaz-store/amaz-store-admin/widget/about-us-widget.php
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
+
/*
|
4 |
+
* About me widget
|
5 |
+
* user about us
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
// add admin scripts
|
9 |
+
function amaz_store_widget_enqueue(){
|
10 |
+
wp_enqueue_media();
|
11 |
+
}
|
12 |
+
add_action('admin_enqueue_scripts', 'amaz_store_widget_enqueue');
|
13 |
+
// register widget
|
14 |
+
function amaz_store_about_us_widget(){
|
15 |
+
register_widget( 'amaz_store_About_Me' );
|
16 |
+
}
|
17 |
+
add_action('widgets_init','amaz_store_about_us_widget');
|
18 |
+
class amaz_store_About_Me extends WP_Widget {
|
19 |
+
function __construct() {
|
20 |
+
$widget_ops = array('classname' => 'th-about-me',
|
21 |
+
'description' => 'Display member image with description, link and font awesome icons');
|
22 |
+
parent::__construct('th-about-me-widget', __('Amaz Store : About Us widget','amaz-store'), $widget_ops);
|
23 |
+
}
|
24 |
+
|
25 |
+
function widget($args, $instance) {
|
26 |
+
extract($args);
|
27 |
+
// widget content
|
28 |
+
echo $before_widget;
|
29 |
+
$title = isset($instance['title'])?$instance['title']:'';
|
30 |
+
$text = isset($instance['text'])?$instance['text']:'';
|
31 |
+
$author_img_uri = isset($instance['author_img_uri'])?$instance['author_img_uri']:'';
|
32 |
+
$readlink = isset($instance['readlink'])?$instance['readlink']:'';
|
33 |
+
$readtxt = isset($instance['readtxt'])?$instance['readtxt']:'';
|
34 |
+
$icon1 = isset($instance['icon1'])?$instance['icon1']:'';
|
35 |
+
$icon2 = isset($instance['icon2'])?$instance['icon2']:'';
|
36 |
+
$icon3 = isset($instance['icon3'])?$instance['icon3']:'';
|
37 |
+
$icon4 = isset($instance['icon4'])?$instance['icon4']:'';
|
38 |
+
$linkicon1 = isset($instance['linkicon1'])?$instance['linkicon1']:'Social Link-1';
|
39 |
+
$linkicon2 = isset($instance['linkicon2'])?$instance['linkicon2']:'http://';
|
40 |
+
$linkicon3 = isset($instance['linkicon3'])?$instance['linkicon3']:'http://';
|
41 |
+
$linkicon4 = isset($instance['linkicon4'])?$instance['linkicon4']:'http://';
|
42 |
+
?>
|
43 |
+
<div class="th-aboutme">
|
44 |
+
<h2 class="widget-title">
|
45 |
+
<?php echo apply_filters('widget_title',$title); ?>
|
46 |
+
</h2>
|
47 |
+
<div class="th-aboutme-description">
|
48 |
+
<?php if($author_img_uri!=''): ?>
|
49 |
+
<a href="<?php echo esc_url($readlink); ?>"><img src="<?php echo esc_url($author_img_uri); ?>" /></a>
|
50 |
+
<?php endif; ?>
|
51 |
+
<p><?php echo $text; ?></p>
|
52 |
+
<?php if ($readtxt != '') { ?>
|
53 |
+
<a class="read-more" href="<?php echo $readlink; ?>"><?php echo $readtxt;?></a>
|
54 |
+
<?php } ?>
|
55 |
+
|
56 |
+
<?php if($icon1!=='') {?>
|
57 |
+
<div class="about-social-meta">
|
58 |
+
<ul>
|
59 |
+
<li class="about-social-social"><a href="<?php echo $linkicon1;?>"><i class="<?php echo $icon1; ?>"></i></a></li>
|
60 |
+
<li class="about-social-social"><a href="<?php echo $linkicon2;?>"><i class="<?php echo $icon2; ?>"></i></a></li>
|
61 |
+
<li class="about-social-social"><a href="<?php echo $linkicon3;?>"><i class="<?php echo $icon3; ?>"></i></a></li>
|
62 |
+
<li class="about-social-social"><a href="<?php echo $linkicon4;?>"><i class="<?php echo $icon4; ?>"></i></a></li>
|
63 |
+
</ul>
|
64 |
+
</div>
|
65 |
+
<?php } ?>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<?php
|
70 |
+
echo $after_widget;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
function update($new_instance, $old_instance) {
|
75 |
+
$instance = $old_instance;
|
76 |
+
$instance['text'] = $new_instance['text'];
|
77 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
78 |
+
$instance['author_img_uri'] = strip_tags( $new_instance['author_img_uri'] );
|
79 |
+
$instance['readlink'] = $new_instance['readlink'];
|
80 |
+
$instance['readtxt'] = $new_instance['readtxt'];
|
81 |
+
$instance['icon1'] = $new_instance['icon1'];
|
82 |
+
$instance['icon2'] = $new_instance['icon2'];
|
83 |
+
$instance['icon3'] = $new_instance['icon3'];
|
84 |
+
$instance['icon4'] = $new_instance['icon4'];
|
85 |
+
$instance['linkicon1'] = $new_instance['linkicon1'];
|
86 |
+
$instance['linkicon2'] = $new_instance['linkicon2'];
|
87 |
+
$instance['linkicon3'] = $new_instance['linkicon3'];
|
88 |
+
$instance['linkicon4'] = $new_instance['linkicon4'];
|
89 |
+
return $instance;
|
90 |
+
}
|
91 |
+
|
92 |
+
function form($instance) {
|
93 |
+
if( $instance) {
|
94 |
+
$title = $instance['title'];
|
95 |
+
$text = $instance['text'];
|
96 |
+
$author_img_uri = $instance['author_img_uri'];
|
97 |
+
$readlink = $instance['readlink'];
|
98 |
+
$readtxt = $instance['readtxt'];
|
99 |
+
$icon1 = $instance['icon1'];
|
100 |
+
$icon2 = $instance['icon2'];
|
101 |
+
$icon3 = $instance['icon3'];
|
102 |
+
$icon4 = $instance['icon4'];
|
103 |
+
$linkicon1 = $instance['linkicon1'];
|
104 |
+
$linkicon2 = $instance['linkicon2'];
|
105 |
+
$linkicon3 = $instance['linkicon3'];
|
106 |
+
$linkicon4 = $instance['linkicon4'];
|
107 |
+
|
108 |
+
|
109 |
+
} else {
|
110 |
+
$title = '';
|
111 |
+
$text = '';
|
112 |
+
$author_img_uri = '';
|
113 |
+
$readtxt = '';
|
114 |
+
$readlink = 'https://';
|
115 |
+
$icon1 = 'fa fa-facebook';
|
116 |
+
$icon2 = 'fa fa-twitter';
|
117 |
+
$icon3 = 'fa fa-linkedin';
|
118 |
+
$icon4 = 'fa fa-google';
|
119 |
+
$linkicon1 = 'Social Link-1';
|
120 |
+
$linkicon2 = '';
|
121 |
+
$linkicon3 = '';
|
122 |
+
$linkicon4 = '';
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
?>
|
127 |
+
<div class="clearfix"></div>
|
128 |
+
<p>
|
129 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title','amaz-store'); ?></label></p><P>
|
130 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" value="<?php if(isset($instance["title"])){ echo $instance['title']; } ?>" style="margin-top:5px;">
|
131 |
+
</p>
|
132 |
+
|
133 |
+
<p>
|
134 |
+
<label for="<?php echo $this->get_field_id('author_img_uri'); ?>"><?php _e('Member Image','amaz-store'); ?></label>
|
135 |
+
<?php
|
136 |
+
if ( isset($instance['author_img_uri']) && $instance['author_img_uri'] != '' ) :
|
137 |
+
echo '<img id="'.$this->get_field_id('author_img_uri').'" class="custom_media_image" src="' . $instance['author_img_uri'] . '" style="margin:0;padding:0;max-width:100px;float:left;display:inline-block" /><br />';
|
138 |
+
endif;
|
139 |
+
?>
|
140 |
+
<input type="text" class="widefat custom_media_url" name="<?php echo $this->get_field_name('author_img_uri'); ?>" id="<?php echo $this->get_field_id('author_img_uri'); ?>" value="<?php if(isset($instance["author_img_uri"])){ echo $instance['author_img_uri']; } ?>" style="margin-top:5px;">
|
141 |
+
<input type="button" class="button button-primary custom_media_button" id="<?php echo $this->get_field_id('author_img_uri'); ?>" name="<?php echo $this->get_field_name('author_img_uri'); ?>" value="Upload Image" style="margin-top:5px;" />
|
142 |
+
</p>
|
143 |
+
<p>
|
144 |
+
<label for="<?php echo $this->get_field_id('text'); ?>"><?php _e('About Me Description','amaz-store'); ?></label></p><P>
|
145 |
+
<textarea name="<?php echo $this->get_field_name('text'); ?>" id="<?php echo $this->get_field_id('text'); ?>" class="widefat" >
|
146 |
+
<?php if(isset($instance["text"])){ echo $instance['text']; } ?></textarea>
|
147 |
+
</p>
|
148 |
+
|
149 |
+
<p>
|
150 |
+
<label for="<?php echo $this->get_field_id('readtxt'); ?>"><?php _e('Read More Text','amaz-store'); ?></label></p><P>
|
151 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('readtxt'); ?>" id="<?php echo $this->get_field_id('readtxt'); ?>" value="<?php if(isset($instance["readtxt"])){ echo $instance['readtxt']; } ?>" style="margin-top:5px;">
|
152 |
+
</p>
|
153 |
+
<p>
|
154 |
+
<label for="<?php echo $this->get_field_id('readlink'); ?>"><?php _e('Link','amaz-store'); ?></label></p><P>
|
155 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('readlink'); ?>" id="<?php echo $this->get_field_id('readlink'); ?>" value="<?php if(isset($instance["readlink"])){ echo $instance['readlink']; } ?>" style="margin-top:5px;">
|
156 |
+
</p>
|
157 |
+
|
158 |
+
<br/><P>
|
159 |
+
<label style="padding-bottom: 5px; padding-top:0px;font-size: 12px;font-style: italic;"><?php _e('Go to this link for <a target="_blank" href="//fontawesome.io/icons/">Fontawesome icons</a> and copy the class of icon that you need & paste it below.','amaz-store'); ?></label></p>
|
160 |
+
<P>
|
161 |
+
<label for="<?php echo $this->get_field_id('icon1'); ?>"><?php _e('Fontawesome Social Icon-1','amaz-store'); ?></label>
|
162 |
+
</p>
|
163 |
+
<P>
|
164 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('icon1'); ?>" id="<?php echo $this->get_field_id('icon1'); ?>" value="<?php if(isset($instance["icon1"])){ echo $instance['icon1']; } ?>" style="margin-top:5px;"></p><P>
|
165 |
+
<label for="<?php echo $this->get_field_id('icon1'); ?>"><?php _e('Social Icon Link','amaz-store'); ?></label></p><P>
|
166 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon1'); ?>" id="<?php echo $this->get_field_id('linkicon1'); ?>" value="<?php if(isset($instance["linkicon1"])){ echo $instance['linkicon1']; } ?>" style="margin-top:5px;">
|
167 |
+
</p>
|
168 |
+
<p>
|
169 |
+
<label for="<?php echo $this->get_field_id('icon2'); ?>"><?php _e('Fontawesome Social Icon-2','amaz-store'); ?></label></p><P>
|
170 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('icon2'); ?>" id="<?php echo $this->get_field_id('icon2'); ?>" value="<?php if(isset($instance["icon2"])){ echo $instance['icon2']; } ?>" style="margin-top:5px;"></p><P>
|
171 |
+
<label for="<?php echo $this->get_field_id('icon2'); ?>"><?php _e('Social Icon Link','amaz-store'); ?></label></p><P>
|
172 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon2'); ?>" id="<?php echo $this->get_field_id('linkicon2'); ?>" value="<?php if(isset($instance["linkicon2"])){ echo $instance['linkicon2']; } ?>" style="margin-top:5px;">
|
173 |
+
</p>
|
174 |
+
<p>
|
175 |
+
<label for="<?php echo $this->get_field_id('icon3'); ?>"><?php _e('Fontawesome Social Icon-3','amaz-store'); ?></label></p><P>
|
176 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('icon3'); ?>" id="<?php echo $this->get_field_id('icon3'); ?>" value="<?php if(isset($instance["icon3"])){ echo $instance['icon3']; } ?>" style="margin-top:5px;"></p><P>
|
177 |
+
<label for="<?php echo $this->get_field_id('icon3'); ?>"><?php _e('Social Icon Link','amaz-store'); ?></label></p><P>
|
178 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon3'); ?>" id="<?php echo $this->get_field_id('linkicon3'); ?>" value="<?php if(isset($instance["linkicon3"])){ echo $instance['linkicon3']; } ?>" style="margin-top:5px;">
|
179 |
+
</p>
|
180 |
+
<p>
|
181 |
+
<label for="<?php echo $this->get_field_id('icon4'); ?>"><?php _e('Fontawesome Social Icon-4','amaz-store'); ?></label></p><P>
|
182 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('icon4'); ?>" id="<?php echo $this->get_field_id('icon4'); ?>" value="<?php if(isset($instance["icon4"])){ echo $instance['icon4']; } ?>" style="margin-top:5px;"></p><P>
|
183 |
+
<label for="<?php echo $this->get_field_id('icon4'); ?>"><?php _e('Social Icon Link-4','amaz-store'); ?></label></p><P>
|
184 |
+
<input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon4'); ?>" id="<?php echo $this->get_field_id('linkicon4'); ?>" value="<?php if(isset($instance["linkicon4"])){ echo $instance['linkicon4']; } ?>" style="margin-top:5px;">
|
185 |
+
</p>
|
186 |
+
|
187 |
+
<?php
|
188 |
+
}
|
189 |
+
}
|
amaz-store/amaz-store-admin/widget/post-single-slide-widget.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// register widget
|
3 |
+
function amaz_store_post_slide_widget(){
|
4 |
+
register_widget( 'amaz_store_slide_post' );
|
5 |
+
}
|
6 |
+
add_action('widgets_init','amaz_store_post_slide_widget');
|
7 |
+
|
8 |
+
|
9 |
+
class amaz_store_slide_post extends WP_Widget {
|
10 |
+
function __construct() {
|
11 |
+
$widget_ops = array('classname' => 'jotshop-pro-slide-post',
|
12 |
+
'description' => 'Display post along with description');
|
13 |
+
parent::__construct('themehunk-customizer-section-four', __('Amaz Store : Post Slide widget','amaz-store'), $widget_ops);
|
14 |
+
}
|
15 |
+
|
16 |
+
function widget($args, $instance) {
|
17 |
+
extract($args);
|
18 |
+
// widget content
|
19 |
+
echo $before_widget;
|
20 |
+
$query = array();
|
21 |
+
$title = isset($instance['title'])?$instance['title']:__('writing your description','amaz-store');
|
22 |
+
$query['cate'] = isset($instance['cate']) ? absint($instance['cate']) : 0;
|
23 |
+
$query['count'] = isset($instance['count']) ? absint($instance['count']) : 3;
|
24 |
+
$query['orderby'] = isset($instance['orderby']) ?$instance['orderby'] : 'post_date';
|
25 |
+
$query['thumbnail'] = false;
|
26 |
+
$query['sticky'] = true;
|
27 |
+
$latest_posts = amaz_store_post_query($query);
|
28 |
+
$catelink = get_category_link( $query['cate'] );
|
29 |
+
?>
|
30 |
+
<div class="post-slide-widget <?php echo $widget_id; ?>">
|
31 |
+
<h2 class="widget-title slide-widget-title "><?php echo $title; ?></h2>
|
32 |
+
|
33 |
+
<div id="<?php echo $widget_id; ?>" class="slide-post owl-carousel">
|
34 |
+
<?php if ( $latest_posts->have_posts() ) { ?>
|
35 |
+
<?php while($latest_posts->have_posts()): $latest_posts->the_post();
|
36 |
+
?>
|
37 |
+
<div class="post-item">
|
38 |
+
<div class="post-thumb">
|
39 |
+
<?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
|
40 |
+
the_post_thumbnail();
|
41 |
+
}
|
42 |
+
?>
|
43 |
+
</div>
|
44 |
+
<div class="entry-body">
|
45 |
+
<div class="post-item-content">
|
46 |
+
<a href="<?php the_permalink(); ?>"><span class="title"><?php the_title(); ?></span></a>
|
47 |
+
<div class="entry-meta">
|
48 |
+
<span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<?php endwhile; ?>
|
55 |
+
<?php } wp_reset_postdata(); ?>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<script>
|
60 |
+
///-----------------------///
|
61 |
+
// product slide script
|
62 |
+
///-----------------------///
|
63 |
+
jQuery(document).ready(function(){
|
64 |
+
var wdgetid = '<?php echo $widget_id; ?>';
|
65 |
+
|
66 |
+
jQuery('#'+wdgetid+'.owl-carousel').owlCarousel({
|
67 |
+
items:1,
|
68 |
+
loop:true,
|
69 |
+
nav: true,
|
70 |
+
margin:0,
|
71 |
+
autoplay:false,
|
72 |
+
autoplaySpeed:500,
|
73 |
+
autoplayTimeout:2000,
|
74 |
+
smartSpeed:500,
|
75 |
+
fluidSpeed:true,
|
76 |
+
responsiveClass:true,
|
77 |
+
dots: false,
|
78 |
+
autoplayHoverPause: true, // Stops autoplay
|
79 |
+
navText: ["<i class='slick-nav fa fa-angle-left'></i>",
|
80 |
+
"<i class='slick-nav fa fa-angle-right'></i>"],
|
81 |
+
});
|
82 |
+
});
|
83 |
+
</script>
|
84 |
+
<?php
|
85 |
+
echo $after_widget;
|
86 |
+
|
87 |
+
}
|
88 |
+
function update($new_instance, $old_instance) {
|
89 |
+
$instance = $old_instance;
|
90 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
91 |
+
$instance["cate"] = absint($new_instance["cate"]);
|
92 |
+
$instance['count'] = strip_tags( $new_instance['count'] );
|
93 |
+
$instance["orderby"] = $new_instance["orderby"];
|
94 |
+
return $instance;
|
95 |
+
}
|
96 |
+
function form($instance) {
|
97 |
+
$widgetInput = New THunkWidgetHtml();
|
98 |
+
$title = isset($instance['title']) ? esc_attr($instance['title']) : __('Latest News','amaz-store');
|
99 |
+
$cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
|
100 |
+
$count = isset($instance['count']) ? absint($instance['count']) : 3;
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
$termarr = array('child_of' => 0);
|
105 |
+
$terms = get_terms('category' ,$termarr);
|
106 |
+
$foption = '<option value="0">All Post Show</option>';
|
107 |
+
foreach($terms as $cat) {
|
108 |
+
$term_id = $cat->term_id;
|
109 |
+
$selected1 = ($cate==$term_id)?'selected':'';
|
110 |
+
$foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
|
111 |
+
}
|
112 |
+
?>
|
113 |
+
|
114 |
+
<div class="clearfix"></div>
|
115 |
+
|
116 |
+
<p>
|
117 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Latest News Title','amaz-store'); ?></label>
|
118 |
+
<input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
|
119 |
+
</p>
|
120 |
+
<p><label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Add Number of Post Show','amaz-store'); ?></label>
|
121 |
+
<input id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo $count; ?>" size="3" /></p>
|
122 |
+
<p>
|
123 |
+
<p>
|
124 |
+
<label for="<?php echo $this->get_field_id('cate'); ?>"><?php _e('Select Specific Option To Display Post','amaz-store'); ?></label>
|
125 |
+
<select name="<?php echo $this->get_field_name('cate'); ?>" ><?php echo $foption; ?></select>
|
126 |
+
</p>
|
127 |
+
<?php
|
128 |
+
$arr2 = array('id'=>'orderby',
|
129 |
+
'label'=> __('Show Post Orderby ','amaz-store'),
|
130 |
+
'default' => 'post_date',
|
131 |
+
'option' => array('post_date'=>__('Recent Posts','amaz-store'),
|
132 |
+
'rand'=>__('Random Post','amaz-store'),
|
133 |
+
'comment_count' =>__('Popular Posts','amaz-store'))
|
134 |
+
);
|
135 |
+
$widgetInput->selectBox($this,$instance,$arr2);
|
136 |
+
?>
|
137 |
+
|
138 |
+
<?php
|
139 |
+
$arr1 = array('id'=>'exclude',
|
140 |
+
'h5'=> __('Unique Post Option','amaz-store'),
|
141 |
+
'label'=> __('(Post displaying in this section will be excluded from all bottom sections. You can use this option to stop repeated post)','amaz-store'),
|
142 |
+
'span' => __('Check here to display unique post','amaz-store')
|
143 |
+
);
|
144 |
+
$widgetInput->radioBox($this,$instance,$arr1);?>
|
145 |
+
<?php
|
146 |
+
}
|
147 |
+
}
|
148 |
+
?>
|
amaz-store/amaz-store-admin/widget/widget-input.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class THunkWidgetHtml{
|
3 |
+
function radioBox($thi,$inst,$custarr){
|
4 |
+
$checked ='';
|
5 |
+
$id = $custarr['id'];
|
6 |
+
if(isset($inst[$id])){
|
7 |
+
$checked = checked((bool) $inst[$id], true,false);
|
8 |
+
}
|
9 |
+
?>
|
10 |
+
<p>
|
11 |
+
<h5 class="thnk-widget-checkbox" for="<?php echo $thi->get_field_id($id); ?>"><?php echo $custarr['h5']; ?></h5>
|
12 |
+
<span><?php echo $custarr['span']; ?></span>
|
13 |
+
<input type="checkbox" id="<?php echo $thi->get_field_id($id); ?>" name="<?php echo $thi->get_field_name($id); ?>" <?php echo $checked; ?>/>
|
14 |
+
<label class="thnk-widget-checkbox" for="<?php echo $thi->get_field_id($id); ?>"><?php echo $custarr['label']; ?></label>
|
15 |
+
</p>
|
16 |
+
<?php
|
17 |
+
}
|
18 |
+
function selectBox($thi,$inst,$custarr){
|
19 |
+
$id = $custarr['id'];
|
20 |
+
$orderby = isset($inst[$id]) ? $inst[$id]: $custarr['default'] ;
|
21 |
+
?>
|
22 |
+
<p><label for="<?php echo $thi->get_field_id($id); ?>"><?php echo $custarr['label']; ?></label>
|
23 |
+
<select id="<?php echo $thi->get_field_id($id); ?>" name="<?php echo $thi->get_field_name($id); ?>" >
|
24 |
+
<?php foreach($custarr['option'] as $value=>$title){ ?>
|
25 |
+
<option value ="<?php echo $value; ?>" <?php if($orderby==$value){ echo 'selected'; }?> ><?php echo $title; ?> </option>
|
26 |
+
<?php } ?>
|
27 |
+
</select>
|
28 |
+
</p>
|
29 |
+
<?php
|
30 |
+
}
|
31 |
+
}
|
amaz-store/amaz-store-admin/woo/amaz-store-admin.php
ADDED
@@ -0,0 +1,510 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!function_exists('amaz_store_product_query')){
|
3 |
+
function amaz_store_product_query($term_id,$prdct_optn){
|
4 |
+
$limit_product = get_theme_mod('amaz_store_prd_shw_no','20');
|
5 |
+
// product filter
|
6 |
+
$args = array('limit' => $limit_product, 'visibility' => 'catalog','status' => array( 'publish' ));
|
7 |
+
if($term_id){
|
8 |
+
$term_args = array('hide_empty' => 1,'slug' => $term_id);
|
9 |
+
$product_categories = get_terms( 'product_cat', $term_args);
|
10 |
+
$product_cat_slug = $product_categories[0]->slug;
|
11 |
+
$args['category'] = $product_cat_slug;
|
12 |
+
}
|
13 |
+
if($prdct_optn=='random'){
|
14 |
+
$args['orderby'] = 'rand';
|
15 |
+
}elseif($prdct_optn=='featured'){
|
16 |
+
$args['featured'] = true;
|
17 |
+
}
|
18 |
+
if(get_option('woocommerce_hide_out_of_stock_items')=='yes'){
|
19 |
+
$args['stock_status'] = 'instock';
|
20 |
+
}
|
21 |
+
return $args;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
if(!function_exists('amaz_store_product_slide_list_loop')){
|
26 |
+
/********************************/
|
27 |
+
//product slider loop
|
28 |
+
/********************************/
|
29 |
+
function amaz_store_product_slide_list_loop($term_id,$prdct_optn){
|
30 |
+
$args = amaz_store_product_query($term_id,$prdct_optn);
|
31 |
+
$products = wc_get_products( $args );
|
32 |
+
if (!empty($products)) {
|
33 |
+
foreach ($products as $product) {
|
34 |
+
$pid = $product->get_id();
|
35 |
+
?>
|
36 |
+
<div <?php post_class(); ?>>
|
37 |
+
<div class="thunk-list">
|
38 |
+
<div class="thunk-product-image">
|
39 |
+
<a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
|
40 |
+
<?php echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' ); ?>
|
41 |
+
</a>
|
42 |
+
</div>
|
43 |
+
<div class="thunk-product-content">
|
44 |
+
<a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-title woocommerce-loop-product__link"><?php echo $product->get_title(); ?></a>
|
45 |
+
<?php
|
46 |
+
$rat_product = wc_get_product($pid);
|
47 |
+
$rating_count = $rat_product->get_rating_count();
|
48 |
+
$average = $rat_product->get_average_rating();
|
49 |
+
echo $rating_count = wc_get_rating_html( $average, $rating_count );
|
50 |
+
?>
|
51 |
+
<div class="price"><?php echo $product->get_price_html(); ?></div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
<?php }
|
56 |
+
} else {
|
57 |
+
echo __( 'No products found','amaz-store' );
|
58 |
+
}
|
59 |
+
wp_reset_query();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
if(!function_exists('amaz_store_category_tab_list')){
|
64 |
+
/**********************************************
|
65 |
+
//Funtion Category list show
|
66 |
+
**********************************************/
|
67 |
+
function amaz_store_category_tab_list( $term_id ){
|
68 |
+
if( taxonomy_exists( 'product_cat' ) && !empty($term_id)){
|
69 |
+
// category filter
|
70 |
+
$args = array(
|
71 |
+
'orderby' => 'menu_order',
|
72 |
+
'order' => 'ASC',
|
73 |
+
'hide_empty' => 1,
|
74 |
+
'slug' => $term_id
|
75 |
+
);
|
76 |
+
$product_categories = get_terms( 'product_cat', $args );
|
77 |
+
$count = count($product_categories);
|
78 |
+
$cat_list = $cate_product = '';
|
79 |
+
$cat_list_drop = '';
|
80 |
+
$i=1;
|
81 |
+
$dl=0;
|
82 |
+
?>
|
83 |
+
<?php
|
84 |
+
//Detect special conditions devices
|
85 |
+
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
|
86 |
+
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
|
87 |
+
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
|
88 |
+
$Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
|
89 |
+
$webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
|
90 |
+
|
91 |
+
//do something with this information
|
92 |
+
if( $iPod || $iPhone ){
|
93 |
+
$device_cat = '1';
|
94 |
+
//browser reported as an iPhone/iPod touch -- do something here
|
95 |
+
}else if($iPad){
|
96 |
+
$device_cat = '3';
|
97 |
+
//browser reported as an iPad -- do something here
|
98 |
+
}else if($Android){
|
99 |
+
$device_cat = '2';
|
100 |
+
//browser reported as an Android device -- do something here
|
101 |
+
}else if($webOS){
|
102 |
+
$device_cat = '4';
|
103 |
+
//browser reported as a webOS device -- do something here
|
104 |
+
}else{
|
105 |
+
$device_cat = '5';
|
106 |
+
}
|
107 |
+
if ( $count > 0 ){
|
108 |
+
foreach ( $product_categories as $product_category ){
|
109 |
+
//global $product;
|
110 |
+
$category_product = array();
|
111 |
+
$current_class = '';
|
112 |
+
$cat_list .='
|
113 |
+
<li>
|
114 |
+
<a data-filter="' .esc_attr($product_category->slug) .'" data-animate="fadeInUp" href="#" data-term-id='.esc_attr($product_category->term_id) .' product_count="'.esc_attr($product_category->count).'">
|
115 |
+
'.esc_html($product_category->name).'</a>
|
116 |
+
</li>';
|
117 |
+
if ($i++ == $device_cat) break;
|
118 |
+
}
|
119 |
+
if($count > $device_cat){
|
120 |
+
foreach ( $product_categories as $product_category ){
|
121 |
+
//global $product;
|
122 |
+
$dl++;
|
123 |
+
if($dl <= $device_cat) continue;
|
124 |
+
$category_product = array();
|
125 |
+
$current_class = '';
|
126 |
+
$cat_list_drop .='
|
127 |
+
<li>
|
128 |
+
<a data-filter="' .esc_attr($product_category->slug) .'" data-animate="fadeInUp" href="#" data-term-id='.esc_attr($product_category->term_id) .' product_count="'.esc_attr($product_category->count).'">
|
129 |
+
'.esc_html($product_category->name).'</a>
|
130 |
+
</li>';
|
131 |
+
}
|
132 |
+
}
|
133 |
+
$return = '<div class="tab-head" catlist="'.esc_attr($i).'" >
|
134 |
+
<div class="tab-link-wrap">
|
135 |
+
<ul class="tab-link">';
|
136 |
+
$return .= $cat_list;
|
137 |
+
$return .= '</ul>';
|
138 |
+
if($count > $device_cat){
|
139 |
+
$return .= '<div class="header__cat__item dropdown"><a href="#" class="more-cat" title="'.__('More categories...','amaz-store').'">•••</a><ul class="dropdown-link">';
|
140 |
+
$return .= $cat_list_drop;
|
141 |
+
$return .= '</ul></div>';
|
142 |
+
}
|
143 |
+
$return .= '</div></div>';
|
144 |
+
|
145 |
+
echo $return;
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
if(!function_exists('amaz_store_product_cat_filter_default_loop')){
|
151 |
+
/********************************/
|
152 |
+
//product cat filter loop
|
153 |
+
/********************************/
|
154 |
+
function amaz_store_product_cat_filter_default_loop($term_id,$prdct_optn){
|
155 |
+
global $product;
|
156 |
+
$args = amaz_store_product_query($term_id,$prdct_optn);
|
157 |
+
$products = wc_get_products( $args );
|
158 |
+
if (!empty($products)) {
|
159 |
+
foreach ($products as $product) {
|
160 |
+
$pid = $product->get_id();
|
161 |
+
?>
|
162 |
+
<div <?php post_class('product',$pid); ?>>
|
163 |
+
<div class="thunk-product-wrap">
|
164 |
+
<div class="thunk-product">
|
165 |
+
|
166 |
+
<div class="thunk-product-image">
|
167 |
+
<a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
|
168 |
+
<?php $sale = get_post_meta( $pid, '_sale_price', true);
|
169 |
+
if( $sale) {
|
170 |
+
// Get product prices
|
171 |
+
$regular_price = (float) $product->get_regular_price(); // Regular price
|
172 |
+
$sale_price = (float) $product->get_price(); // Sale price
|
173 |
+
$saving_price = wc_price( $regular_price - $sale_price );
|
174 |
+
echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
|
175 |
+
}?>
|
176 |
+
<?php
|
177 |
+
echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' );
|
178 |
+
$hover_style = get_theme_mod( 'amaz_store_woo_product_animation' );
|
179 |
+
// the_post_thumbnail();
|
180 |
+
if ( 'swap' === $hover_style ){
|
181 |
+
$attachment_ids = $product->get_gallery_image_ids($pid);
|
182 |
+
if(!empty($attachment_ids)){
|
183 |
+
|
184 |
+
$glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
|
185 |
+
echo $category_product['glr'] = $glr;
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
if ( 'slide' === $hover_style ){
|
191 |
+
$attachment_ids = $product->get_gallery_image_ids($pid);
|
192 |
+
if(!empty($attachment_ids)){
|
193 |
+
|
194 |
+
$glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
|
195 |
+
echo $category_product['glr'] = $glr;
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
}
|
200 |
+
?>
|
201 |
+
</a>
|
202 |
+
<div class="thunk-icons-wrap">
|
203 |
+
<?php
|
204 |
+
if( class_exists( 'YITH_WCWL' )){
|
205 |
+
amaz_store_whish_list($pid);
|
206 |
+
}
|
207 |
+
if( ( class_exists( 'YITH_Woocompare' ))){
|
208 |
+
echo amaz_store_add_to_compare_fltr($pid);
|
209 |
+
}
|
210 |
+
if(get_theme_mod( 'amaz_store_woo_quickview_enable', true )){
|
211 |
+
?>
|
212 |
+
<div class="thunk-quickview">
|
213 |
+
<span class="quik-view">
|
214 |
+
<a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
|
215 |
+
<span><?php _e('Quick View','amaz-store');?></span>
|
216 |
+
</a>
|
217 |
+
</span>
|
218 |
+
</div>
|
219 |
+
<?php }
|
220 |
+
|
221 |
+
?>
|
222 |
+
</div>
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
</div>
|
227 |
+
|
228 |
+
<div class="thunk-product-content">
|
229 |
+
<?php if (class_exists('TH_Variation_Swatches_Pro')) {
|
230 |
+
thvs_loop_available_attributes($product);
|
231 |
+
} ?>
|
232 |
+
<h2 class="woocommerce-loop-product__title"><a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"><?php echo $product->get_title(); ?></a>
|
233 |
+
</h2>
|
234 |
+
<?php
|
235 |
+
$rat_product = wc_get_product($pid);
|
236 |
+
$rating_count = $rat_product->get_rating_count();
|
237 |
+
$average = $rat_product->get_average_rating();
|
238 |
+
echo $rating_count = wc_get_rating_html( $average, $rating_count );
|
239 |
+
?>
|
240 |
+
|
241 |
+
<div class="price"><?php echo $product->get_price_html(); ?></div>
|
242 |
+
<?php
|
243 |
+
amaz_store_show_stock_shop();
|
244 |
+
amaz_store_display_specific_shipping_class();
|
245 |
+
?>
|
246 |
+
</div>
|
247 |
+
<div class="thunk-product-hover">
|
248 |
+
|
249 |
+
<?php echo'<div class="th-add-to-cart">';
|
250 |
+
echo amaz_store_add_to_cart_url($product);
|
251 |
+
echo '</div>';
|
252 |
+
?>
|
253 |
+
|
254 |
+
|
255 |
+
</div>
|
256 |
+
</div>
|
257 |
+
</div>
|
258 |
+
</div>
|
259 |
+
<?php }
|
260 |
+
} else {
|
261 |
+
echo __( 'No products found','amaz-store' );
|
262 |
+
}
|
263 |
+
wp_reset_query();
|
264 |
+
}
|
265 |
+
}
|
266 |
+
if(!function_exists('amaz_store_product_filter_loop')){
|
267 |
+
function amaz_store_product_filter_loop($args){
|
268 |
+
global $product;
|
269 |
+
$products = wc_get_products( $args );
|
270 |
+
if (!empty($products)) {
|
271 |
+
foreach ($products as $product) {
|
272 |
+
$pid = $product->get_id();
|
273 |
+
$hover_style = get_theme_mod( 'amaz_store_woo_product_animation' );
|
274 |
+
if('swap' === $hover_style){
|
275 |
+
|
276 |
+
$attachment_ids = $product->get_gallery_image_ids();
|
277 |
+
if(count($attachment_ids) > '0'){
|
278 |
+
$swapclasses='amaz-store-swap-item-hover product';
|
279 |
+
}
|
280 |
+
}elseif('slide' === $hover_style){
|
281 |
+
|
282 |
+
$attachment_ids = $product->get_gallery_image_ids();
|
283 |
+
if(count($attachment_ids) > '0'){
|
284 |
+
$swapclasses='amaz-store-slide-item-hover product';
|
285 |
+
}
|
286 |
+
} else{
|
287 |
+
$swapclasses='product';
|
288 |
+
}
|
289 |
+
?>
|
290 |
+
<div <?php post_class($swapclasses,$pid); ?>>
|
291 |
+
<div class="thunk-product-wrap">
|
292 |
+
<div class="thunk-product">
|
293 |
+
|
294 |
+
<div class="thunk-product-image">
|
295 |
+
<a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
|
296 |
+
<?php $sale = get_post_meta( $pid, '_sale_price', true);
|
297 |
+
if( $sale) {
|
298 |
+
// Get product prices
|
299 |
+
$regular_price = (float) $product->get_regular_price(); // Regular price
|
300 |
+
$sale_price = (float) $product->get_price(); // Sale price
|
301 |
+
$saving_price = wc_price( $regular_price - $sale_price );
|
302 |
+
echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
|
303 |
+
}?>
|
304 |
+
<?php
|
305 |
+
echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' );
|
306 |
+
$hover_style = get_theme_mod( 'amaz_store_woo_product_animation' );
|
307 |
+
// the_post_thumbnail();
|
308 |
+
if ( 'swap' === $hover_style ){
|
309 |
+
$attachment_ids = $product->get_gallery_image_ids($pid);
|
310 |
+
if(!empty($attachment_ids)){
|
311 |
+
|
312 |
+
$glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
|
313 |
+
echo $category_product['glr'] = $glr;
|
314 |
+
|
315 |
+
}
|
316 |
+
|
317 |
+
}
|
318 |
+
if ( 'slide' === $hover_style ){
|
319 |
+
$attachment_ids = $product->get_gallery_image_ids($pid);
|
320 |
+
if(!empty($attachment_ids)){
|
321 |
+
|
322 |
+
$glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
|
323 |
+
echo $category_product['glr'] = $glr;
|
324 |
+
|
325 |
+
}
|
326 |
+
|
327 |
+
}
|
328 |
+
?>
|
329 |
+
</a>
|
330 |
+
|
331 |
+
<?php echo'<div class="add-to-cart">';
|
332 |
+
echo amaz_store_add_to_cart_url($product);
|
333 |
+
echo '</div>';
|
334 |
+
?>
|
335 |
+
|
336 |
+
</div>
|
337 |
+
|
338 |
+
<div class="thunk-product-content">
|
339 |
+
<?php if (class_exists('TH_Variation_Swatches_Pro')) {
|
340 |
+
thvs_loop_available_attributes($product);
|
341 |
+
} ?>
|
342 |
+
<h2 class="woocommerce-loop-product__title"><a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"><?php echo $product->get_title(); ?></a>
|
343 |
+
</h2>
|
344 |
+
<?php
|
345 |
+
$rat_product = wc_get_product($pid);
|
346 |
+
$rating_count = $rat_product->get_rating_count();
|
347 |
+
$average = $rat_product->get_average_rating();
|
348 |
+
echo $rating_count = wc_get_rating_html( $average, $rating_count );
|
349 |
+
?>
|
350 |
+
|
351 |
+
<div class="price"><?php echo $product->get_price_html(); ?></div>
|
352 |
+
</div>
|
353 |
+
<div class="thunk-product-hover">
|
354 |
+
<?php
|
355 |
+
//echo amaz_store_add_to_cart_url($product);
|
356 |
+
if(get_theme_mod( 'amaz_store_woo_quickview_enable', true )){
|
357 |
+
?>
|
358 |
+
<div class="thunk-quickview">
|
359 |
+
<span class="quik-view">
|
360 |
+
<a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
|
361 |
+
<span><?php _e('Quick View','amaz-store');?></span>
|
362 |
+
</a>
|
363 |
+
</span>
|
364 |
+
</div>
|
365 |
+
<?php }
|
366 |
+
if( ( class_exists( 'WPCleverWoosc' ))){
|
367 |
+
amaz_store_wpc_wish_compare($pid);
|
368 |
+
}
|
369 |
+
if( ( class_exists( 'YITH_Woocompare' ))){
|
370 |
+
echo amaz_store_add_to_compare_fltr($pid);
|
371 |
+
}
|
372 |
+
if( class_exists( 'YITH_WCWL' )){
|
373 |
+
echo amaz_store_whish_list($pid);
|
374 |
+
}
|
375 |
+
if( ( class_exists( 'WPCleverWoosw' ))){
|
376 |
+
amaz_store_wpc_wish_list($pid);
|
377 |
+
}
|
378 |
+
|
379 |
+
?>
|
380 |
+
|
381 |
+
</div>
|
382 |
+
</div>
|
383 |
+
</div>
|
384 |
+
</div>
|
385 |
+
<?php }
|
386 |
+
} else {
|
387 |
+
echo __( 'No products found','amaz-store' );
|
388 |
+
}
|
389 |
+
wp_reset_postdata();
|
390 |
+
}
|
391 |
+
}
|
392 |
+
if(!function_exists('amaz_store_post_query')){
|
393 |
+
/*****************************/
|
394 |
+
// Product show function
|
395 |
+
/****************************/
|
396 |
+
function amaz_store_post_query($query){
|
397 |
+
|
398 |
+
$args = array(
|
399 |
+
'orderby' => esc_html($query['orderby']),
|
400 |
+
'order' => 'DESC',
|
401 |
+
'ignore_sticky_posts' => esc_html($query['sticky']),
|
402 |
+
'post_type' => 'post',
|
403 |
+
'posts_per_page' => esc_html($query['count']),
|
404 |
+
'cat' => esc_html($query['cate']),
|
405 |
+
'meta_key' => '_thumbnail_id',
|
406 |
+
|
407 |
+
);
|
408 |
+
|
409 |
+
if($query['thumbnail']){
|
410 |
+
$args['meta_key'] = '_thumbnail_id';
|
411 |
+
}
|
412 |
+
|
413 |
+
$return = new WP_Query($args);
|
414 |
+
|
415 |
+
return $return;
|
416 |
+
}
|
417 |
+
|
418 |
+
}
|
419 |
+
if(!function_exists('amaz_store_product_list_categories_slider')){
|
420 |
+
function amaz_store_product_list_categories_slider( $args = '' ){
|
421 |
+
$term = get_theme_mod('amaz_store_include_category_slider','0');
|
422 |
+
if(!empty($term['0'])){
|
423 |
+
$include_id = $term;
|
424 |
+
}else{
|
425 |
+
$include_id = '';
|
426 |
+
}
|
427 |
+
$defaults = array(
|
428 |
+
'child_of' => 0,
|
429 |
+
'current_category' => 0,
|
430 |
+
'depth' => 2,
|
431 |
+
'echo' => 0,
|
432 |
+
'exclude' => '',
|
433 |
+
'exclude_tree' => '',
|
434 |
+
'include' => esc_html($include_id),
|
435 |
+
'feed' => '',
|
436 |
+
'feed_image' => '',
|
437 |
+
'feed_type' => '',
|
438 |
+
'hide_empty' => 1,
|
439 |
+
'hide_title_if_empty' => false,
|
440 |
+
'hierarchical' => true,
|
441 |
+
'order' => 'ASC',
|
442 |
+
'orderby' => 'menu_order',
|
443 |
+
'separator' => '<br />',
|
444 |
+
'show_count' => 0,
|
445 |
+
'show_option_all' => '',
|
446 |
+
'show_option_none' => __( 'No categories','amaz-store' ),
|
447 |
+
'style' => 'list',
|
448 |
+
'taxonomy' => 'product_cat',
|
449 |
+
'title_li' => '',
|
450 |
+
'use_desc_for_title' => 0,
|
451 |
+
'walker' => new amaz_store_List_Category_Images
|
452 |
+
);
|
453 |
+
$html = wp_list_categories($defaults);
|
454 |
+
echo '<ul class="thunk-product-cat-list slider" data-menu-style="vertical">'.$html.'</ul>';
|
455 |
+
}
|
456 |
+
// cLASS To fetch cat image
|
457 |
+
class amaz_store_List_Category_Images extends Walker_Category {
|
458 |
+
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
459 |
+
$saved_data = get_term_meta( $category->term_id, 'thumbnail_id', true );
|
460 |
+
$image = wp_get_attachment_url( $saved_data);
|
461 |
+
$cat_name = apply_filters(
|
462 |
+
'list_cats',
|
463 |
+
esc_attr( $category->name ),
|
464 |
+
$category
|
465 |
+
);
|
466 |
+
$link='';
|
467 |
+
|
468 |
+
$link.= '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
|
469 |
+
if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
|
470 |
+
$link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
|
471 |
+
}
|
472 |
+
|
473 |
+
$link .= '>';
|
474 |
+
if(!empty($image)){
|
475 |
+
$link .='<img src="' . $image . '">';
|
476 |
+
}
|
477 |
+
$link .= $cat_name . '</a>';
|
478 |
+
|
479 |
+
|
480 |
+
if ( ! empty( $args['show_count'] ) ) {
|
481 |
+
$link .= ' (' . number_format_i18n( $category->count ) . ')';
|
482 |
+
}
|
483 |
+
if ( 'list' == $args['style'] ) {
|
484 |
+
$output .= "\t<li";
|
485 |
+
$class = 'cat-item cat-item-' . $category->term_id;
|
486 |
+
if ( ! empty( $args['current_category'] ) ) {
|
487 |
+
$_current_category = get_term( $args['current_category'], $category->taxonomy );
|
488 |
+
if ( $category->term_id == $args['current_category'] ) {
|
489 |
+
$class .= ' current-cat';
|
490 |
+
} elseif ( $category->term_id == $_current_category->parent ) {
|
491 |
+
$class .= ' current-cat-parent';
|
492 |
+
}
|
493 |
+
}
|
494 |
+
$output .= ' class="' . $class . '"';
|
495 |
+
$output .= ">$link\n";
|
496 |
+
} else {
|
497 |
+
$output .= "\t$link<br />\n";
|
498 |
+
}
|
499 |
+
}
|
500 |
+
}
|
501 |
+
}
|
502 |
+
if (!function_exists('amaz_store_pro_scripts')) {
|
503 |
+
function amaz_store_pro_scripts(){
|
504 |
+
$localize = array(
|
505 |
+
'limit_repeater' => false,
|
506 |
+
);
|
507 |
+
wp_localize_script( 'amaz_store_customizer-repeater-script', 'amaz_store_repeater', $localize );
|
508 |
+
}
|
509 |
+
add_action( 'customize_controls_enqueue_scripts', 'amaz_store_pro_scripts' );
|
510 |
+
}
|
amaz-store/amaz-store-admin/woo/woo-ajax.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!function_exists('amaz_store_cat_filter_ajax')){
|
3 |
+
/***************************/
|
4 |
+
//category product section product ajax filter
|
5 |
+
/***************************/
|
6 |
+
|
7 |
+
add_action('wp_ajax_amaz_store_cat_filter_ajax', 'amaz_store_cat_filter_ajax');
|
8 |
+
add_action('wp_ajax_nopriv_amaz_store_cat_filter_ajax', 'amaz_store_cat_filter_ajax');
|
9 |
+
function amaz_store_cat_filter_ajax(){
|
10 |
+
if(isset($_POST['data_cat_slug'])){
|
11 |
+
$prdct_optn = get_theme_mod('amaz_store_category_optn','recent');
|
12 |
+
$args = amaz_store_product_query(sanitize_key($_POST['data_cat_slug']),$prdct_optn);
|
13 |
+
amaz_store_product_filter_loop($args);
|
14 |
+
}
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
}
|
amaz-store/amaz-store-front-page/front-banner.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_banner_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
<section class="thunk-banner-section">
|
7 |
+
<?php amaz_store_display_customizer_shortcut('amaz_store_banner'); ?>
|
8 |
+
<div class="content-wrap">
|
9 |
+
<?php amaz_store_front_banner(); ?>
|
10 |
+
</div>
|
11 |
+
</section>
|
amaz-store/amaz-store-front-page/front-categoryslider.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_category_slide_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
$amaz_store_cat_slide_layout = get_theme_mod('amaz_store_cat_slide_layout','cat-layout-3');
|
6 |
+
?>
|
7 |
+
|
8 |
+
<section class="thunk-category-slide-section">
|
9 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_cat_slide_section' ); ?>
|
10 |
+
<div class="thunk-heading-wrap">
|
11 |
+
<div class="thunk-heading">
|
12 |
+
<h4 class="thunk-title">
|
13 |
+
<span class="title"><?php echo esc_html(get_theme_mod('amaz_store_cat_slider_heading','Woo Category'));?></span>
|
14 |
+
</h4>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
<div class="content-wrap">
|
18 |
+
<?php if($amaz_store_cat_slide_layout=='cat-layout-1'):?>
|
19 |
+
<div class="thunk-slide thunk-cat-slide owl-carousel">
|
20 |
+
<?php
|
21 |
+
if( taxonomy_exists( 'product_cat' ) ){
|
22 |
+
$term_id = get_theme_mod('amaz_store_category_slide_list');
|
23 |
+
// category filter
|
24 |
+
$args = array(
|
25 |
+
|
26 |
+
'orderby' => 'menu_order',
|
27 |
+
'order' => 'ASC',
|
28 |
+
'hide_empty' => 1,
|
29 |
+
'slug' => $term_id
|
30 |
+
);
|
31 |
+
|
32 |
+
$product_categories = get_terms( 'product_cat', $args );
|
33 |
+
|
34 |
+
$count = count($product_categories);
|
35 |
+
|
36 |
+
$category_list = $cate_product = '';
|
37 |
+
if ( $count > 0 ){
|
38 |
+
foreach ( $product_categories as $product_category ){
|
39 |
+
//global $product;
|
40 |
+
$category_product = array();
|
41 |
+
$term_link = get_term_link( $product_category, 'product_cat' );
|
42 |
+
$thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
|
43 |
+
$image = wp_get_attachment_url( $thumbnail_id );
|
44 |
+
|
45 |
+
$current_class = '';
|
46 |
+
|
47 |
+
$category_list .='<div class="thunk-category">
|
48 |
+
<div class="thunk-cat-box">
|
49 |
+
<a href="'.$term_link.'">
|
50 |
+
<img src="' . $image . '" alt="" />
|
51 |
+
</a>
|
52 |
+
</div>
|
53 |
+
<div class="thunk-cat-text">
|
54 |
+
<div class="thunk-cat-title">
|
55 |
+
<a href="'.$term_link.'"><span class="title">'.$product_category->name. '</span></a>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
</div>
|
59 |
+
|
60 |
+
</div>';
|
61 |
+
}
|
62 |
+
echo $category_list;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
?>
|
67 |
+
</div>
|
68 |
+
<?php elseif($amaz_store_cat_slide_layout=='cat-layout-2'):?>
|
69 |
+
<div class="cat-wrap cat-layout-2">
|
70 |
+
<div class="cat-content">
|
71 |
+
<?php
|
72 |
+
if( taxonomy_exists( 'product_cat' ) ){
|
73 |
+
$term_id = get_theme_mod('amaz_store_category_slide_list');
|
74 |
+
// category filter
|
75 |
+
$args = array(
|
76 |
+
|
77 |
+
'orderby' => 'title',
|
78 |
+
'order' => 'ASC',
|
79 |
+
'hide_empty' => 1,
|
80 |
+
'slug' => $term_id
|
81 |
+
);
|
82 |
+
|
83 |
+
$product_categories = get_terms( 'product_cat', $args );
|
84 |
+
|
85 |
+
$count = count($product_categories);
|
86 |
+
|
87 |
+
$category_list = $cate_product = '';
|
88 |
+
if ( $count > 0 ){
|
89 |
+
foreach ( $product_categories as $product_category ){
|
90 |
+
//global $product;
|
91 |
+
$category_product = array();
|
92 |
+
$term_link = get_term_link( $product_category, 'product_cat' );
|
93 |
+
$thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
|
94 |
+
$image = wp_get_attachment_url( $thumbnail_id );
|
95 |
+
$current_class = '';
|
96 |
+
$category_list .='<div class="cat-list">
|
97 |
+
<a href="'.esc_url($term_link).'">
|
98 |
+
<img src="'.esc_url($image).'">
|
99 |
+
<span>'.esc_html($product_category->name).'</span>
|
100 |
+
</a>
|
101 |
+
</div>';
|
102 |
+
}
|
103 |
+
echo $category_list;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
?>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
<?php elseif($amaz_store_cat_slide_layout=='cat-layout-3'):?>
|
110 |
+
<div class="cat-wrap cat-layout-3">
|
111 |
+
<div class="cat-content-3">
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
<?php
|
116 |
+
if( taxonomy_exists( 'product_cat' ) ){
|
117 |
+
$term_id = get_theme_mod('amaz_store_category_slide_list');
|
118 |
+
// category filter
|
119 |
+
$args = array(
|
120 |
+
|
121 |
+
'orderby' => 'title',
|
122 |
+
'order' => 'ASC',
|
123 |
+
'hide_empty' => 1,
|
124 |
+
'slug' => $term_id
|
125 |
+
);
|
126 |
+
|
127 |
+
$product_categories = get_terms( 'product_cat', $args );
|
128 |
+
|
129 |
+
$count = count($product_categories);
|
130 |
+
|
131 |
+
$category_list = $cate_product = '';
|
132 |
+
if ( $count > 0 ){
|
133 |
+
foreach ( $product_categories as $product_category ){
|
134 |
+
//global $product;
|
135 |
+
$category_product = array();
|
136 |
+
$term_link = get_term_link( $product_category, 'product_cat' );
|
137 |
+
$thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
|
138 |
+
$image = wp_get_attachment_url( $thumbnail_id );
|
139 |
+
$current_class = '';
|
140 |
+
$category_list .='<div class="cat-col">
|
141 |
+
<div class="cat-col-wrap">
|
142 |
+
<img src="'.esc_url($image).'">
|
143 |
+
<div class="hover-area">
|
144 |
+
<span class="cat-title">'.esc_html($product_category->name).'</span>
|
145 |
+
<div class="prd-total-number"><span class="item">'.$product_category->count.esc_html('Product','amaz-store').'</span></div>
|
146 |
+
</div>
|
147 |
+
<a href="'.esc_url($term_link).'"> </a>
|
148 |
+
</div></div>';
|
149 |
+
}
|
150 |
+
echo $category_list;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
?>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
<?php endif;?>
|
157 |
+
</div>
|
158 |
+
</section>
|
amaz-store/amaz-store-front-page/front-highlight.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_highlight_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
<section class="thunk-product-highlight-section">
|
7 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_highlight' ); ?>
|
8 |
+
<div class="content-wrap">
|
9 |
+
<div class="thunk-highlight-feature-wrap">
|
10 |
+
<?php
|
11 |
+
$default = amaz_store_Defaults_Models::instance()->get_feature_default();
|
12 |
+
amaz_store_highlight_content('amaz_store_highlight_content', $default);
|
13 |
+
?>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
</section>
|
amaz-store/amaz-store-front-page/front-productlist.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_product_list_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
<section class="thunk-product-list-section thunk-list-style">
|
7 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_product_slide_list' ); ?>
|
8 |
+
<div class="thunk-heading-wrap">
|
9 |
+
<div class="thunk-heading">
|
10 |
+
<h4 class="thunk-title">
|
11 |
+
<span class="title"><?php echo esc_html(get_theme_mod('amaz_store_product_list_heading','Product List Carousel'));?></span>
|
12 |
+
</h4>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
<div class="content-wrap">
|
16 |
+
<div class="thunk-slide thunk-product-list owl-carousel">
|
17 |
+
<?php
|
18 |
+
$term_id = get_theme_mod('amaz_store_product_list_cat');
|
19 |
+
$prdct_optn = get_theme_mod('amaz_store_product_list_optn','recent');
|
20 |
+
amaz_store_product_cat_filter_default_loop($term_id,$prdct_optn);
|
21 |
+
?>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
</section>
|
amaz-store/amaz-store-front-page/front-productslider.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_product_slide_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
|
7 |
+
<section class="thunk-product-slide-section">
|
8 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_product_slide_section' ); ?>
|
9 |
+
<div class="thunk-heading-wrap">
|
10 |
+
<div class="thunk-heading">
|
11 |
+
<h4 class="thunk-title">
|
12 |
+
<span class="title"><?php echo esc_html(get_theme_mod('amaz_store_product_slider_heading','Product Carousel'));?></span>
|
13 |
+
</h4>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
<div class="content-wrap">
|
17 |
+
<div class="thunk-slide thunk-product-slide owl-carousel">
|
18 |
+
<?php
|
19 |
+
$term_id = get_theme_mod('amaz_store_product_slider_cat');
|
20 |
+
$prdct_optn = get_theme_mod('amaz_store_product_slide_optn','recent');
|
21 |
+
amaz_store_product_cat_filter_default_loop($term_id,$prdct_optn);
|
22 |
+
?>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</section>
|
amaz-store/amaz-store-front-page/front-ribbon.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_ribbon_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
$amaz_store_ribbon_layout = get_theme_mod('amaz_store_ribbon_layout','ribbonleft');
|
6 |
+
if(get_theme_mod('amaz_store_ribbon_background','image')=='image'){
|
7 |
+
?>
|
8 |
+
<section class="thunk-ribbon-section bg-image <?php echo esc_attr($amaz_store_ribbon_layout); ?>">
|
9 |
+
|
10 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_ribbon' ); ?>
|
11 |
+
<div class="content-wrap">
|
12 |
+
<div class="thunk-ribbon-content">
|
13 |
+
<div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('amaz_store_ribbon_text','Lorem ipsum dolor sit amet, consectetur adipiscing')); ?></h3></div>
|
14 |
+
<?php if(get_theme_mod('amaz_store_ribbon_btn_text','Call To Action')!==''):?>
|
15 |
+
<div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('amaz_store_ribbon_btn_link',''));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('amaz_store_ribbon_btn_text','Call To Action'));?></a></div>
|
16 |
+
<?php endif; ?>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
</section>
|
20 |
+
<?php }elseif(get_theme_mod('amaz_store_ribbon_background','image')=='video'){
|
21 |
+
$amaz_store_youtube_video_link = get_theme_mod('amaz_store_youtube_video_link',''); ?>
|
22 |
+
<section class="thunk-ribbon-section <?php echo esc_attr($amaz_store_ribbon_layout); ?>">
|
23 |
+
<?php if (get_theme_mod('amaz_store_enable_youtube_video','') == 1) { ?>
|
24 |
+
<?php if ($amaz_store_youtube_video_link != '') { ?>
|
25 |
+
<div class="th-youtube-video">
|
26 |
+
<iframe class="" frameborder="0" allowfullscreen="1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" src="<?php echo esc_url($amaz_store_youtube_video_link); ?>?autoplay=1&controls=0&rel=0&playsinline=1&mute=1&enablejsapi=1"></iframe>
|
27 |
+
</div>
|
28 |
+
<?php }
|
29 |
+
}
|
30 |
+
else{ ?>
|
31 |
+
<video autoplay="autoplay" loop playsinline id="bgvid" muted poster="<?php echo get_theme_mod( 'amaz_store_ribbon_video_poster_image'); ?>">
|
32 |
+
<source src="<?php echo get_theme_mod( 'amaz_store_ribbon_bg_video'); ?>" type="video/mp4" />
|
33 |
+
</video>
|
34 |
+
<?php } ?>
|
35 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_ribbon' ); ?>
|
36 |
+
<div class="content-wrap">
|
37 |
+
<div class="thunk-ribbon-content">
|
38 |
+
<div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('amaz_store_ribbon_text','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.')); ?></h3></div>
|
39 |
+
<?php if(get_theme_mod('amaz_store_ribbon_btn_text','Call To Action')!==''):?>
|
40 |
+
<div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('amaz_store_ribbon_btn_link',''));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('amaz_store_ribbon_btn_text','Call To Action'));?></a></div>
|
41 |
+
<?php endif; ?>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</section>
|
45 |
+
<?php }?>
|
amaz-store/amaz-store-front-page/front-tabproduct.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_cat_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
<section class="thunk-product-tab-section">
|
7 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_category_tab_section' ); ?>
|
8 |
+
|
9 |
+
<!-- thunk head start -->
|
10 |
+
<div id="thunk-cat-tab" class="thunk-cat-tab">
|
11 |
+
<div class="thunk-heading-wrap">
|
12 |
+
<div class="thunk-heading">
|
13 |
+
<h4 class="thunk-title">
|
14 |
+
<span class="title"><?php echo esc_html(get_theme_mod('amaz_store_cat_tab_heading','Tabbed Product Carousel'));?></span>
|
15 |
+
</h4>
|
16 |
+
</div>
|
17 |
+
<!-- tab head start -->
|
18 |
+
<?php $term_id = get_theme_mod('amaz_store_category_tab_list');
|
19 |
+
amaz_store_category_tab_list($term_id);
|
20 |
+
?>
|
21 |
+
</div>
|
22 |
+
<!-- tab head end -->
|
23 |
+
<div class="content-wrap">
|
24 |
+
<div class="tab-content">
|
25 |
+
<div class="thunk-slide thunk-product-cat-slide owl-carousel">
|
26 |
+
<?php
|
27 |
+
$term_id = get_theme_mod('amaz_store_category_tab_list');
|
28 |
+
$prdct_optn = get_theme_mod('amaz_store_category_optn','recent');
|
29 |
+
amaz_store_product_cat_filter_default_loop($term_id,$prdct_optn);
|
30 |
+
?>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
</section>
|
amaz-store/amaz-store-front-page/front-topslider.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(get_theme_mod('amaz_store_disable_top_slider_sec',false) == true){
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
$amaz_store_top_slide_layout = get_theme_mod('amaz_store_top_slide_layout','slide-layout-1');
|
6 |
+
?>
|
7 |
+
<section class="thunk-slider-section <?php echo esc_attr($amaz_store_top_slide_layout);?>">
|
8 |
+
|
9 |
+
<?php
|
10 |
+
|
11 |
+
if($amaz_store_top_slide_layout =='slide-layout-3'):
|
12 |
+
?>
|
13 |
+
<?php amaz_store_display_customizer_shortcut( 'amaz_store_top_slider_section' ); ?>
|
14 |
+
<div class="thunk-slider-content-wrap">
|
15 |
+
<div class="thunk-slider-content-bar">
|
16 |
+
<div class="thunk-slider-col thunk-slider-col-1">
|
17 |
+
<div class="slider-cat-title">
|
18 |
+
<a href="#"><?php _e('Market','amaz-store');?></a>
|
19 |
+
</div>
|
20 |
+
<?php amaz_store_product_list_categories_slider(); ?>
|
21 |
+
|
22 |
+
</div>
|
23 |
+
<div class="thunk-slider-col thunk-slider-col-2"><div class="thunk-3col-slider-wrap">
|
24 |
+
<div class="thunk-slider-content">
|
25 |
+
<div class="thunk-top2-slide owl-carousel">
|
26 |
+
<?php amaz_store_top_slider_2_content('amaz_store_top_slide_content', ''); ?>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<div class="thunk-add-content">
|
30 |
+
<div class="thunk-3-add-content">
|
31 |
+
<div class="thunk-row">
|
32 |
+
<a href="<?php echo esc_url(get_theme_mod('amaz_store_lay3_url'));?>"><img src="<?php echo esc_url(get_theme_mod('amaz_store_lay3_adimg'));?>"></a>
|
33 |
+
</div>
|
34 |
+
<div class="thunk-row">
|
35 |
+
<a href="<?php echo esc_url(get_theme_mod('amaz_store_lay3_2url'));?>"><img src="<?php echo esc_url(get_theme_mod('amaz_store_lay3_adimg2'));?>"></a>
|
36 |
+
</div>
|
37 |
+
<div class="thunk-row"><a href="<?php echo esc_url(get_theme_mod('amaz_store_lay3_3url'));?>"><img src="<?php echo esc_url(get_theme_mod('amaz_store_lay3_adimg3'));?>"></a>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<?php elseif($amaz_store_top_slide_layout == 'slide-layout-4'):?>
|
48 |
+
<div class="thunk-slider-content-wrap">
|
49 |
+
<div class="thunk-slider-content-bar">
|
50 |
+
<div class="thunk-slider-multi-slide owl-carousel">
|
51 |
+
<?php amaz_store_top_slider_multi_content('amaz_store_top_slide_content', ''); ?>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
<?php elseif($amaz_store_top_slide_layout == 'slide-layout-2'):?>
|
56 |
+
<div class="thunk-slider-content-wrap">
|
57 |
+
<div class="thunk-slider-content-bar">
|
58 |
+
<div class="thunk-3col-slider-wrap">
|
59 |
+
<div class="slider-content-1">
|
60 |
+
<div class="thunk-content-2">
|
61 |
+
<div class="thunk-row">
|
62 |
+
<a href="<?php echo esc_url(get_theme_mod('amaz_store_lay2_url'));?>"><img src="<?php echo esc_url(get_theme_mod('amaz_store_lay2_adimg'));?>"></a>
|
63 |
+
</div>
|
64 |
+
<div class="thunk-row"><a href="<?php echo esc_url(get_theme_mod('amaz_store_lay2_url2'));?>"><img src="<?php echo esc_url(get_theme_mod('amaz_store_lay2_adimg2'));?>"></a></div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
<div class="slider-content-2">
|
68 |
+
<div class="thunk-content-1">
|
69 |
+
<div class="thunk-top2-slide owl-carousel">
|
70 |
+
<?php amaz_store_top_slider_2_content('amaz_store_top_slide_content', ''); ?>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="slider-content-3">
|
75 |
+
<div class="thunk-content-1">
|
76 |
+
<a href="<?php echo esc_url(get_theme_mod('amaz_store_lay2_url3'));?>"><img src="<?php echo esc_url(get_theme_mod('amaz_store_lay2_adimg3'));?>"></a>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
<?php elseif($amaz_store_top_slide_layout == 'slide-layout-1'):?>
|
83 |
+
<div class="thunk-slider-content-wrap">
|
84 |
+
|
85 |
+
<div class="thunk-slider-content-bar">
|
86 |
+
<div class="thunk-slider-full-slide owl-carousel">
|
87 |
+
<?php amaz_store_top_slider_2_content('amaz_store_top_slide_content', ''); ?>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
</div>
|
92 |
+
<?php elseif($amaz_store_top_slide_layout == 'slide-layout-6'):?>
|
93 |
+
<div class="thunk-slider-content-wrap">
|
94 |
+
|
95 |
+
<div class="thunk-slider-content-bar">
|
96 |
+
<div class="thunk-slider-full-slide owl-carousel categoryinfo">
|
97 |
+
<?php amaz_store_top_slider_6_content('amaz_store_top_slide_content6', ''); ?>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
|
104 |
+
</div>
|
105 |
+
<?php elseif($amaz_store_top_slide_layout == 'slide-layout-9'):?>
|
106 |
+
<div class="thunk-slider-content-wrap">
|
107 |
+
|
108 |
+
<div class="thunk-slider-content-bar">
|
109 |
+
<div class="thunk-slider-full-slide owl-carousel slide-9">
|
110 |
+
<?php amaz_store_top_slider_9_content('amaz_store_top_slide_content', ''); ?>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
|
114 |
+
</div>
|
115 |
+
|
116 |
+
<?php endif; ?>
|
117 |
+
|
118 |
+
</section>
|
amaz-store/customizer/customizer.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* all customizer setting includeed
|
4 |
+
*
|
5 |
+
* @param
|
6 |
+
* @return mixed|string
|
7 |
+
*/
|
8 |
+
function amaz_store_plugin_customize_register( $wp_customize ){
|
9 |
+
//Front Page
|
10 |
+
// require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/top-slider.php';
|
11 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/category-tab.php';
|
12 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/product-slide.php';
|
13 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/category-slider.php';
|
14 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/product-list.php';
|
15 |
+
|
16 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/ribbon.php';
|
17 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/banner.php';
|
18 |
+
require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'amaz-store/customizer/section/frontpage/higlight.php';
|
19 |
+
|
20 |
+
// product shown in front Page
|
21 |
+
$wp_customize->add_setting('amaz_store_prd_shw_no', array(
|
22 |
+
'default' =>'20',
|
23 |
+
'capability' => 'edit_theme_options',
|
24 |
+
'sanitize_callback' =>'amaz_store_sanitize_number',
|
25 |
+
)
|
26 |
+
);
|
27 |
+
$wp_customize->add_control('amaz_store_prd_shw_no', array(
|
28 |
+
'type' => 'number',
|
29 |
+
'section' => 'amaz-store-woo-shop',
|
30 |
+
'label' => __( 'No. of product to show in Front Page', 'amaz-store' ),
|
31 |
+
'input_attrs' => array(
|
32 |
+
'min' => 10,
|
33 |
+
'step' => 1,
|
34 |
+
'max' => 1000,
|
35 |
+
),
|
36 |
+
)
|
37 |
+
);
|
38 |
+
|
39 |
+
}
|
40 |
+
add_action('customize_register','amaz_store_plugin_customize_register');
|
amaz-store/customizer/images/ribbon-layout-1.png
ADDED
Binary file
|
amaz-store/customizer/images/ribbon-layout-2.png
ADDED
Binary file
|
amaz-store/customizer/section/frontpage/banner.php
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_customize->add_setting( 'amaz_store_disable_banner_sec', array(
|
3 |
+
'default' => false,
|
4 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
5 |
+
) );
|
6 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_banner_sec', array(
|
7 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
8 |
+
'type' => 'checkbox',
|
9 |
+
'section' => 'amaz_store_banner',
|
10 |
+
'settings' => 'amaz_store_disable_banner_sec',
|
11 |
+
) ) );
|
12 |
+
// choose col layout
|
13 |
+
if(class_exists('amaz_store_WP_Customize_Control_Radio_Image')){
|
14 |
+
$wp_customize->add_setting(
|
15 |
+
'amaz_store_banner_layout', array(
|
16 |
+
'default' => 'bnr-two',
|
17 |
+
'sanitize_callback' => 'amaz_store_sanitize_radio',
|
18 |
+
)
|
19 |
+
);
|
20 |
+
$wp_customize->add_control(
|
21 |
+
new amaz_store_WP_Customize_Control_Radio_Image(
|
22 |
+
$wp_customize, 'amaz_store_banner_layout', array(
|
23 |
+
'label' => esc_html__( 'Layout', 'amaz-store' ),
|
24 |
+
'section' => 'amaz_store_banner',
|
25 |
+
'choices' => array(
|
26 |
+
'bnr-one' => array(
|
27 |
+
'url' => amaz_store_BANNER_IMG_LAYOUT_1,
|
28 |
+
),
|
29 |
+
'bnr-two' => array(
|
30 |
+
'url' => amaz_store_BANNER_IMG_LAYOUT_2,
|
31 |
+
),
|
32 |
+
'bnr-three' => array(
|
33 |
+
'url' => amaz_store_BANNER_IMG_LAYOUT_3,
|
34 |
+
),
|
35 |
+
'bnr-four' => array(
|
36 |
+
'url' => amaz_store_BANNER_IMG_LAYOUT_4,
|
37 |
+
),
|
38 |
+
'bnr-five' => array(
|
39 |
+
'url' => amaz_store_BANNER_IMG_LAYOUT_5,
|
40 |
+
),
|
41 |
+
'bnr-six' => array(
|
42 |
+
'url' => amaz_store_BANNER_IMG_LAYOUT_5,
|
43 |
+
),
|
44 |
+
|
45 |
+
),
|
46 |
+
)
|
47 |
+
)
|
48 |
+
);
|
49 |
+
}
|
50 |
+
// first image
|
51 |
+
$wp_customize->add_setting('amaz_store_bnr_1_img', array(
|
52 |
+
'default' => '',
|
53 |
+
'capability' => 'edit_theme_options',
|
54 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
55 |
+
));
|
56 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_bnr_1_img', array(
|
57 |
+
'label' => __('Image 1', 'amaz-store'),
|
58 |
+
'section' => 'amaz_store_banner',
|
59 |
+
'settings' => 'amaz_store_bnr_1_img',
|
60 |
+
)));
|
61 |
+
|
62 |
+
// first url
|
63 |
+
$wp_customize->add_setting('amaz_store_bnr_1_url', array(
|
64 |
+
'default' =>'',
|
65 |
+
'capability' => 'edit_theme_options',
|
66 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
67 |
+
));
|
68 |
+
$wp_customize->add_control( 'amaz_store_bnr_1_url', array(
|
69 |
+
'label' => __('url', 'amaz-store'),
|
70 |
+
'section' => 'amaz_store_banner',
|
71 |
+
'type' => 'text',
|
72 |
+
));
|
73 |
+
// second image
|
74 |
+
$wp_customize->add_setting('amaz_store_bnr_2_img', array(
|
75 |
+
'default' => '',
|
76 |
+
'capability' => 'edit_theme_options',
|
77 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
78 |
+
));
|
79 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_bnr_2_img', array(
|
80 |
+
'label' => __('Image 2', 'amaz-store'),
|
81 |
+
'section' => 'amaz_store_banner',
|
82 |
+
'settings' => 'amaz_store_bnr_2_img',
|
83 |
+
)));
|
84 |
+
|
85 |
+
// second url
|
86 |
+
$wp_customize->add_setting('amaz_store_bnr_2_url', array(
|
87 |
+
'default' =>'',
|
88 |
+
'capability' => 'edit_theme_options',
|
89 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
90 |
+
));
|
91 |
+
$wp_customize->add_control( 'amaz_store_bnr_2_url', array(
|
92 |
+
'label' => __('url', 'amaz-store'),
|
93 |
+
'section' => 'amaz_store_banner',
|
94 |
+
'type' => 'text',
|
95 |
+
));
|
96 |
+
|
97 |
+
// third image
|
98 |
+
$wp_customize->add_setting('amaz_store_bnr_3_img', array(
|
99 |
+
'default' => '',
|
100 |
+
'capability' => 'edit_theme_options',
|
101 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
102 |
+
));
|
103 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_bnr_3_img', array(
|
104 |
+
'label' => __('Image 3', 'amaz-store'),
|
105 |
+
'section' => 'amaz_store_banner',
|
106 |
+
'settings' => 'amaz_store_bnr_3_img',
|
107 |
+
)));
|
108 |
+
|
109 |
+
// third url
|
110 |
+
$wp_customize->add_setting('amaz_store_bnr_3_url', array(
|
111 |
+
'default' =>'',
|
112 |
+
'capability' => 'edit_theme_options',
|
113 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
114 |
+
));
|
115 |
+
$wp_customize->add_control( 'amaz_store_bnr_3_url', array(
|
116 |
+
'label' => __('url', 'amaz-store'),
|
117 |
+
'section' => 'amaz_store_banner',
|
118 |
+
'type' => 'text',
|
119 |
+
));
|
120 |
+
|
121 |
+
|
122 |
+
// fourth image
|
123 |
+
$wp_customize->add_setting('amaz_store_bnr_4_img', array(
|
124 |
+
'default' => '',
|
125 |
+
'capability' => 'edit_theme_options',
|
126 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
127 |
+
));
|
128 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_bnr_4_img', array(
|
129 |
+
'label' => __('Image 4', 'amaz-store'),
|
130 |
+
'section' => 'amaz_store_banner',
|
131 |
+
'settings' => 'amaz_store_bnr_4_img',
|
132 |
+
)));
|
133 |
+
$wp_customize->add_setting('amaz_store_bnr_4_url', array(
|
134 |
+
'default' =>'',
|
135 |
+
'capability' => 'edit_theme_options',
|
136 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
137 |
+
));
|
138 |
+
$wp_customize->add_control( 'amaz_store_bnr_4_url', array(
|
139 |
+
'label' => __('url', 'amaz-store'),
|
140 |
+
'section' => 'amaz_store_banner',
|
141 |
+
'type' => 'text',
|
142 |
+
));
|
143 |
+
|
144 |
+
// fifth image
|
145 |
+
$wp_customize->add_setting('amaz_store_bnr_5_img', array(
|
146 |
+
'default' => '',
|
147 |
+
'capability' => 'edit_theme_options',
|
148 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
149 |
+
));
|
150 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_bnr_5_img', array(
|
151 |
+
'label' => __('Image 5', 'amaz-store'),
|
152 |
+
'section' => 'amaz_store_banner',
|
153 |
+
'settings' => 'amaz_store_bnr_5_img',
|
154 |
+
)));
|
155 |
+
$wp_customize->add_setting('amaz_store_bnr_5_url', array(
|
156 |
+
'default' =>'',
|
157 |
+
'capability' => 'edit_theme_options',
|
158 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
159 |
+
));
|
160 |
+
$wp_customize->add_control( 'amaz_store_bnr_5_url', array(
|
161 |
+
'label' => __('url', 'amaz-store'),
|
162 |
+
'section' => 'amaz_store_banner',
|
163 |
+
'type' => 'text',
|
164 |
+
));
|
165 |
+
|
166 |
+
$wp_customize->add_setting('amaz_store_bnr_doc', array(
|
167 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
168 |
+
));
|
169 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_bnr_doc',
|
170 |
+
array(
|
171 |
+
'section' => 'amaz_store_banner',
|
172 |
+
'type' => 'doc-link',
|
173 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#banner-section',
|
174 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
175 |
+
'priority' =>100,
|
176 |
+
)));
|
amaz-store/customizer/section/frontpage/category-slider.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_customize->add_setting( 'amaz_store_disable_category_slide_sec', array(
|
3 |
+
'default' => false,
|
4 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
5 |
+
) );
|
6 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_category_slide_sec', array(
|
7 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
8 |
+
'type' => 'checkbox',
|
9 |
+
'section' => 'amaz_store_cat_slide_section',
|
10 |
+
'settings' => 'amaz_store_disable_category_slide_sec',
|
11 |
+
) ) );
|
12 |
+
|
13 |
+
// section heading
|
14 |
+
$wp_customize->add_setting('amaz_store_cat_slider_heading', array(
|
15 |
+
'default' => __('Woo Category','amaz-store'),
|
16 |
+
'capability' => 'edit_theme_options',
|
17 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
18 |
+
'transport' => 'postMessage',
|
19 |
+
));
|
20 |
+
$wp_customize->add_control( 'amaz_store_cat_slider_heading', array(
|
21 |
+
'label' => __('Section Heading', 'amaz-store'),
|
22 |
+
'section' => 'amaz_store_cat_slide_section',
|
23 |
+
'type' => 'text',
|
24 |
+
));
|
25 |
+
/*****************/
|
26 |
+
// category layout
|
27 |
+
/*****************/
|
28 |
+
if(class_exists('amaz_store_WP_Customize_Control_Radio_Image')){
|
29 |
+
$wp_customize->add_setting(
|
30 |
+
'amaz_store_cat_slide_layout', array(
|
31 |
+
'default' => 'cat-layout-3',
|
32 |
+
'sanitize_callback' => 'amaz_store_sanitize_radio',
|
33 |
+
)
|
34 |
+
);
|
35 |
+
$wp_customize->add_control(
|
36 |
+
new amaz_store_WP_Customize_Control_Radio_Image(
|
37 |
+
$wp_customize, 'amaz_store_cat_slide_layout', array(
|
38 |
+
'label' => esc_html__( 'Category Layout', 'amaz-store' ),
|
39 |
+
'section' => 'amaz_store_cat_slide_section',
|
40 |
+
'choices' => array(
|
41 |
+
'cat-layout-1' => array(
|
42 |
+
'url' => amaz_store_CAT_SLIDER_LAYOUT_1,
|
43 |
+
),
|
44 |
+
'cat-layout-2' => array(
|
45 |
+
'url' => amaz_store_CAT_SLIDER_LAYOUT_2,
|
46 |
+
),
|
47 |
+
'cat-layout-3' => array(
|
48 |
+
'url' => amaz_store_CAT_SLIDER_LAYOUT_3,
|
49 |
+
),
|
50 |
+
|
51 |
+
),
|
52 |
+
)
|
53 |
+
)
|
54 |
+
);
|
55 |
+
}
|
56 |
+
//= Choose All Category =
|
57 |
+
if (class_exists( 'amaz_store_Customize_Control_Checkbox_Multiple')) {
|
58 |
+
$wp_customize->add_setting('amaz_store_category_slide_list', array(
|
59 |
+
'default' => '',
|
60 |
+
'sanitize_callback' => 'amaz_store_checkbox_explode'
|
61 |
+
));
|
62 |
+
$wp_customize->add_control(new amaz_store_Customize_Control_Checkbox_Multiple(
|
63 |
+
$wp_customize,'amaz_store_category_slide_list', array(
|
64 |
+
'settings'=> 'amaz_store_category_slide_list',
|
65 |
+
'label' => __( 'Choose Categories To Show', 'amaz-store' ),
|
66 |
+
'section' => 'amaz_store_cat_slide_section',
|
67 |
+
'choices' => amaz_store_get_category_list(array('taxonomy' =>'product_cat'),true),
|
68 |
+
)
|
69 |
+
));
|
70 |
+
|
71 |
+
}
|
72 |
+
// $wp_customize->add_setting('amaz_store_cat_item_no', array(
|
73 |
+
// 'default' => 5,
|
74 |
+
// 'capability' => 'edit_theme_options',
|
75 |
+
// 'sanitize_callback' =>'amaz_store_sanitize_number',
|
76 |
+
// )
|
77 |
+
// );
|
78 |
+
// $wp_customize->add_control('amaz_store_cat_item_no', array(
|
79 |
+
// 'type' => 'number',
|
80 |
+
// 'section' => 'amaz_store_cat_slide_section',
|
81 |
+
// 'label' => __( 'No. of Column to show', 'amaz-store' ),
|
82 |
+
// 'input_attrs' => array(
|
83 |
+
// 'min' => 1,
|
84 |
+
// 'step' => 1,
|
85 |
+
// 'max' => 10,
|
86 |
+
// ),
|
87 |
+
// )
|
88 |
+
// );
|
89 |
+
// Add an option to disable the logo.
|
90 |
+
$wp_customize->add_setting( 'amaz_store_category_slider_optn', array(
|
91 |
+
'default' => false,
|
92 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
93 |
+
) );
|
94 |
+
$wp_customize->add_control( new amaz_store_Toggle_Control( $wp_customize, 'amaz_store_category_slider_optn', array(
|
95 |
+
'label' => esc_html__( 'Slide Auto Play', 'amaz-store' ),
|
96 |
+
'section' => 'amaz_store_cat_slide_section',
|
97 |
+
'type' => 'toggle',
|
98 |
+
'settings' => 'amaz_store_category_slider_optn',
|
99 |
+
) ) );
|
100 |
+
$wp_customize->add_setting('amaz_store_category_slider_speed', array(
|
101 |
+
'default' =>'3000',
|
102 |
+
'capability' => 'edit_theme_options',
|
103 |
+
'sanitize_callback' => 'amaz_store_sanitize_number',
|
104 |
+
));
|
105 |
+
$wp_customize->add_control( 'amaz_store_category_slider_speed', array(
|
106 |
+
'label' => __('Speed', 'amaz-store'),
|
107 |
+
'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','amaz-store'),
|
108 |
+
'section' => 'amaz_store_cat_slide_section',
|
109 |
+
'type' => 'number',
|
110 |
+
));
|
111 |
+
|
112 |
+
|
113 |
+
$wp_customize->add_setting('amaz_store_category_slider_doc', array(
|
114 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
115 |
+
));
|
116 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_category_slider_doc',
|
117 |
+
array(
|
118 |
+
'section' => 'amaz_store_cat_slide_section',
|
119 |
+
'type' => 'doc-link',
|
120 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#woo-category',
|
121 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
122 |
+
'priority' =>100,
|
123 |
+
)));
|
amaz-store/customizer/section/frontpage/category-tab.php
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_customize->add_setting( 'amaz_store_disable_cat_sec', array(
|
3 |
+
'default' => false,
|
4 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
5 |
+
) );
|
6 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_cat_sec', array(
|
7 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
8 |
+
'type' => 'checkbox',
|
9 |
+
'section' => 'amaz_store_category_tab_section',
|
10 |
+
'settings' => 'amaz_store_disable_cat_sec',
|
11 |
+
) ) );
|
12 |
+
// section heading
|
13 |
+
$wp_customize->add_setting('amaz_store_cat_tab_heading', array(
|
14 |
+
'default' => __('Tabbed Product Carousel','amaz-store'),
|
15 |
+
'capability' => 'edit_theme_options',
|
16 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
17 |
+
'transport' => 'postMessage',
|
18 |
+
));
|
19 |
+
$wp_customize->add_control( 'amaz_store_cat_tab_heading', array(
|
20 |
+
'label' => __('Section Heading', 'amaz-store'),
|
21 |
+
'section' => 'amaz_store_category_tab_section',
|
22 |
+
'type' => 'text',
|
23 |
+
));
|
24 |
+
//= Choose All Category =
|
25 |
+
if (class_exists( 'amaz_store_Customize_Control_Checkbox_Multiple')) {
|
26 |
+
$wp_customize->add_setting('amaz_store_category_tab_list', array(
|
27 |
+
'default' => '',
|
28 |
+
'sanitize_callback' => 'amaz_store_checkbox_explode'
|
29 |
+
));
|
30 |
+
$wp_customize->add_control(new amaz_store_Customize_Control_Checkbox_Multiple(
|
31 |
+
$wp_customize,'amaz_store_category_tab_list', array(
|
32 |
+
'settings'=> 'amaz_store_category_tab_list',
|
33 |
+
'label' => __( 'Choose Categories To Show', 'amaz-store' ),
|
34 |
+
'section' => 'amaz_store_category_tab_section',
|
35 |
+
'choices' => amaz_store_get_category_list(array('taxonomy' =>'product_cat'),true),
|
36 |
+
)
|
37 |
+
));
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
$wp_customize->add_setting('amaz_store_category_optn', array(
|
42 |
+
'default' => 'recent',
|
43 |
+
'capability' => 'edit_theme_options',
|
44 |
+
'sanitize_callback' => 'amaz_store_sanitize_select',
|
45 |
+
));
|
46 |
+
$wp_customize->add_control( 'amaz_store_category_optn', array(
|
47 |
+
'settings' => 'amaz_store_category_optn',
|
48 |
+
'label' => __('Choose Option','amaz-store'),
|
49 |
+
'section' => 'amaz_store_category_tab_section',
|
50 |
+
'type' => 'select',
|
51 |
+
'choices' => array(
|
52 |
+
'recent' => __('Recent','amaz-store'),
|
53 |
+
'featured' => __('Featured','amaz-store'),
|
54 |
+
'random' => __('Random','amaz-store'),
|
55 |
+
|
56 |
+
),
|
57 |
+
));
|
58 |
+
|
59 |
+
$wp_customize->add_setting( 'amaz_store_single_row_slide_cat', array(
|
60 |
+
'default' => false,
|
61 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
62 |
+
) );
|
63 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_single_row_slide_cat', array(
|
64 |
+
'label' => esc_html__('Enable Single Row Slide', 'amaz-store'),
|
65 |
+
'type' => 'checkbox',
|
66 |
+
'section' => 'amaz_store_category_tab_section',
|
67 |
+
'settings' => 'amaz_store_single_row_slide_cat',
|
68 |
+
) ) );
|
69 |
+
|
70 |
+
|
71 |
+
// Add an option to disable the logo.
|
72 |
+
$wp_customize->add_setting( 'amaz_store_cat_slider_optn', array(
|
73 |
+
'default' => false,
|
74 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
75 |
+
) );
|
76 |
+
$wp_customize->add_control( new amaz_store_Toggle_Control( $wp_customize, 'amaz_store_cat_slider_optn', array(
|
77 |
+
'label' => esc_html__( 'Slide Auto Play', 'amaz-store' ),
|
78 |
+
'section' => 'amaz_store_category_tab_section',
|
79 |
+
'type' => 'toggle',
|
80 |
+
'settings' => 'amaz_store_cat_slider_optn',
|
81 |
+
) ) );
|
82 |
+
$wp_customize->add_setting('amaz_store_cat_slider_speed', array(
|
83 |
+
'default' =>'3000',
|
84 |
+
'capability' => 'edit_theme_options',
|
85 |
+
'sanitize_callback' => 'amaz_store_sanitize_number',
|
86 |
+
));
|
87 |
+
$wp_customize->add_control( 'amaz_store_cat_slider_speed', array(
|
88 |
+
'label' => __('Speed', 'amaz-store'),
|
89 |
+
'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','amaz-store'),
|
90 |
+
'section' => 'amaz_store_category_tab_section',
|
91 |
+
'type' => 'number',
|
92 |
+
));
|
93 |
+
|
94 |
+
$wp_customize->add_setting('amaz_store_cat_tab_slider_doc', array(
|
95 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
96 |
+
));
|
97 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_cat_tab_slider_doc',
|
98 |
+
array(
|
99 |
+
'section' => 'amaz_store_category_tab_section',
|
100 |
+
'type' => 'doc-link',
|
101 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#tabbed-product',
|
102 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
103 |
+
'priority' =>100,
|
104 |
+
)));
|
amaz-store/customizer/section/frontpage/higlight.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_customize->add_setting( 'amaz_store_disable_highlight_sec', array(
|
3 |
+
'default' => false,
|
4 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
5 |
+
) );
|
6 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_highlight_sec', array(
|
7 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
8 |
+
'type' => 'checkbox',
|
9 |
+
'section' => 'amaz_store_highlight',
|
10 |
+
'settings' => 'amaz_store_disable_highlight_sec',
|
11 |
+
) ) );
|
12 |
+
|
13 |
+
// section heading
|
14 |
+
// $wp_customize->add_setting('amaz_store_hglgt_heading', array(
|
15 |
+
// 'default' => __('Highlight Feature','amaz-store'),
|
16 |
+
// 'capability' => 'edit_theme_options',
|
17 |
+
// 'sanitize_callback' => 'amaz_store_sanitize_text',
|
18 |
+
// 'transport' => 'postMessage',
|
19 |
+
// ));
|
20 |
+
// $wp_customize->add_control( 'amaz_store_hglgt_heading', array(
|
21 |
+
// 'label' => __('Section Heading', 'amaz-store'),
|
22 |
+
// 'section' => 'amaz_store_highlight',
|
23 |
+
// 'type' => 'text',
|
24 |
+
// ));
|
25 |
+
|
26 |
+
//Highlight Content Via Repeater
|
27 |
+
if ( class_exists( 'amaz_store_Repeater' ) ) {
|
28 |
+
$wp_customize->add_setting(
|
29 |
+
'amaz_store_highlight_content', array(
|
30 |
+
'sanitize_callback' => 'amaz_store_repeater_sanitize',
|
31 |
+
'default' => amaz_store_Defaults_Models::instance()->get_feature_default(),
|
32 |
+
)
|
33 |
+
);
|
34 |
+
|
35 |
+
$wp_customize->add_control(
|
36 |
+
new amaz_store_Repeater(
|
37 |
+
$wp_customize, 'amaz_store_highlight_content', array(
|
38 |
+
'label' => esc_html__( 'Highlight Content', 'amaz-store' ),
|
39 |
+
'section' => 'amaz_store_highlight',
|
40 |
+
'priority' => 15,
|
41 |
+
'add_field_label' => esc_html__( 'Add new Feature', 'amaz-store' ),
|
42 |
+
'item_name' => esc_html__( 'Feature', 'amaz-store' ),
|
43 |
+
|
44 |
+
'customizer_repeater_title_control' => true,
|
45 |
+
'customizer_repeater_color_control' => false,
|
46 |
+
'customizer_repeater_color2_control' => false,
|
47 |
+
'customizer_repeater_icon_control' => true,
|
48 |
+
'customizer_repeater_subtitle_control' => true,
|
49 |
+
|
50 |
+
'customizer_repeater_text_control' => false,
|
51 |
+
|
52 |
+
'customizer_repeater_image_control' => false,
|
53 |
+
'customizer_repeater_link_control' => false,
|
54 |
+
'customizer_repeater_repeater_control' => false,
|
55 |
+
|
56 |
+
|
57 |
+
),'amaz_store_Ship_Repeater'
|
58 |
+
)
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
$wp_customize->add_setting('amaz_store_highlight_doc', array(
|
64 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
65 |
+
));
|
66 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_highlight_doc',
|
67 |
+
array(
|
68 |
+
'section' => 'amaz_store_highlight',
|
69 |
+
'type' => 'doc-link',
|
70 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#highlight-section',
|
71 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
72 |
+
'priority' =>100,
|
73 |
+
)));
|
amaz-store/customizer/section/frontpage/product-list.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_customize->add_setting( 'amaz_store_disable_product_list_sec', array(
|
3 |
+
'default' => false,
|
4 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
5 |
+
) );
|
6 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_product_list_sec', array(
|
7 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
8 |
+
'type' => 'checkbox',
|
9 |
+
'section' => 'amaz_store_product_slide_list',
|
10 |
+
'settings' => 'amaz_store_disable_product_list_sec',
|
11 |
+
) ) );
|
12 |
+
// section heading
|
13 |
+
$wp_customize->add_setting('amaz_store_product_list_heading', array(
|
14 |
+
'default' => __('Product List Carousel','amaz-store'),
|
15 |
+
'capability' => 'edit_theme_options',
|
16 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
17 |
+
'transport' => 'postMessage',
|
18 |
+
));
|
19 |
+
$wp_customize->add_control( 'amaz_store_product_list_heading', array(
|
20 |
+
'label' => __('Section Heading', 'amaz-store'),
|
21 |
+
'section' => 'amaz_store_product_slide_list',
|
22 |
+
'type' => 'text',
|
23 |
+
));
|
24 |
+
//control setting for select options
|
25 |
+
$wp_customize->add_setting('amaz_store_product_list_cat', array(
|
26 |
+
'default' => 0,
|
27 |
+
'sanitize_callback' => 'amaz_store_sanitize_select',
|
28 |
+
) );
|
29 |
+
$wp_customize->add_control( 'amaz_store_product_list_cat', array(
|
30 |
+
'label' => __('Select Category','amaz-store'),
|
31 |
+
'section' => 'amaz_store_product_slide_list',
|
32 |
+
'type' => 'select',
|
33 |
+
'choices' => amaz_store_product_category_list(array('taxonomy' =>'product_cat'),true),
|
34 |
+
) );
|
35 |
+
|
36 |
+
$wp_customize->add_setting('amaz_store_product_list_optn', array(
|
37 |
+
'default' => 'recent',
|
38 |
+
'capability' => 'edit_theme_options',
|
39 |
+
'sanitize_callback' => 'amaz_store_sanitize_select',
|
40 |
+
));
|
41 |
+
$wp_customize->add_control('amaz_store_product_list_optn', array(
|
42 |
+
'settings' => 'amaz_store_product_list_optn',
|
43 |
+
'label' => __('Choose Option','amaz-store'),
|
44 |
+
'section' => 'amaz_store_product_slide_list',
|
45 |
+
'type' => 'select',
|
46 |
+
'choices' => array(
|
47 |
+
'recent' => __('Recent','amaz-store'),
|
48 |
+
'featured' => __('Featured','amaz-store'),
|
49 |
+
'random' => __('Random','amaz-store'),
|
50 |
+
),
|
51 |
+
));
|
52 |
+
|
53 |
+
$wp_customize->add_setting( 'amaz_store_single_row_prdct_list', array(
|
54 |
+
'default' => false,
|
55 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
56 |
+
) );
|
57 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_single_row_prdct_list', array(
|
58 |
+
'label' => esc_html__('Enable Single Row Slide', 'amaz-store'),
|
59 |
+
'type' => 'checkbox',
|
60 |
+
'section' => 'amaz_store_product_slide_list',
|
61 |
+
'settings' => 'amaz_store_single_row_prdct_list',
|
62 |
+
) ) );
|
63 |
+
|
64 |
+
|
65 |
+
// Add an option to disable the logo.
|
66 |
+
$wp_customize->add_setting( 'amaz_store_product_list_slide_optn', array(
|
67 |
+
'default' => false,
|
68 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
69 |
+
) );
|
70 |
+
$wp_customize->add_control( new amaz_store_Toggle_Control( $wp_customize, 'amaz_store_product_list_slide_optn', array(
|
71 |
+
'label' => esc_html__( 'Slide Auto Play', 'amaz-store' ),
|
72 |
+
'section' => 'amaz_store_product_slide_list',
|
73 |
+
'type' => 'toggle',
|
74 |
+
'settings' => 'amaz_store_product_list_slide_optn',
|
75 |
+
) ) );
|
76 |
+
$wp_customize->add_setting('amaz_store_product_list_slide_speed', array(
|
77 |
+
'default' =>'3000',
|
78 |
+
'capability' => 'edit_theme_options',
|
79 |
+
'sanitize_callback' => 'amaz_store_sanitize_number',
|
80 |
+
));
|
81 |
+
$wp_customize->add_control( 'amaz_store_product_list_slide_speed', array(
|
82 |
+
'label' => __('Speed', 'amaz-store'),
|
83 |
+
'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','amaz-store'),
|
84 |
+
'section' => 'amaz_store_product_slide_list',
|
85 |
+
'type' => 'number',
|
86 |
+
));
|
87 |
+
|
88 |
+
$wp_customize->add_setting('amaz_store_product_list_slide_doc', array(
|
89 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
90 |
+
));
|
91 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_product_list_slide_doc',
|
92 |
+
array(
|
93 |
+
'section' => 'amaz_store_product_slide_list',
|
94 |
+
'type' => 'doc-link',
|
95 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#product-list',
|
96 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
97 |
+
'priority' =>100,
|
98 |
+
)));
|
amaz-store/customizer/section/frontpage/product-slide.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!function_exists('amaz_store_product_category_list')){
|
3 |
+
function amaz_store_product_category_list($arr='',$all=true){
|
4 |
+
$cats = array();
|
5 |
+
if($all == true){
|
6 |
+
$cats[0] = 'All Categories';
|
7 |
+
}
|
8 |
+
foreach ( get_categories($arr) as $categories => $category ){
|
9 |
+
$cats[$category->slug] = $category->name;
|
10 |
+
}
|
11 |
+
return $cats;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
$wp_customize->add_setting( 'amaz_store_disable_product_slide_sec', array(
|
15 |
+
'default' => false,
|
16 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
17 |
+
) );
|
18 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_product_slide_sec', array(
|
19 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
20 |
+
'type' => 'checkbox',
|
21 |
+
'section' => 'amaz_store_product_slide_section',
|
22 |
+
'settings' => 'amaz_store_disable_product_slide_sec',
|
23 |
+
) ) );
|
24 |
+
// section heading
|
25 |
+
$wp_customize->add_setting('amaz_store_product_slider_heading', array(
|
26 |
+
'default' => __('Product Carousel','amaz-store'),
|
27 |
+
'capability' => 'edit_theme_options',
|
28 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
29 |
+
'transport' => 'postMessage',
|
30 |
+
));
|
31 |
+
$wp_customize->add_control( 'amaz_store_product_slider_heading', array(
|
32 |
+
'label' => __('Section Heading', 'amaz-store'),
|
33 |
+
'section' => 'amaz_store_product_slide_section',
|
34 |
+
'type' => 'text',
|
35 |
+
));
|
36 |
+
|
37 |
+
//control setting for select options
|
38 |
+
$wp_customize->add_setting('amaz_store_product_slider_cat', array(
|
39 |
+
'default' => 0,
|
40 |
+
'sanitize_callback' => 'amaz_store_sanitize_select',
|
41 |
+
) );
|
42 |
+
$wp_customize->add_control( 'amaz_store_product_slider_cat', array(
|
43 |
+
'label' => __('Select Category','amaz-store'),
|
44 |
+
'section' => 'amaz_store_product_slide_section',
|
45 |
+
'type' => 'select',
|
46 |
+
'choices' => amaz_store_product_category_list(array('taxonomy' =>'product_cat'),true),
|
47 |
+
) );
|
48 |
+
|
49 |
+
$wp_customize->add_setting('amaz_store_product_slide_optn', array(
|
50 |
+
'default' => 'recent',
|
51 |
+
'capability' => 'edit_theme_options',
|
52 |
+
'sanitize_callback' => 'amaz_store_sanitize_select',
|
53 |
+
));
|
54 |
+
$wp_customize->add_control( 'amaz_store_product_slide_optn', array(
|
55 |
+
'settings' => 'amaz_store_product_slide_optn',
|
56 |
+
'label' => __('Choose Option','amaz-store'),
|
57 |
+
'section' => 'amaz_store_product_slide_section',
|
58 |
+
'type' => 'select',
|
59 |
+
'choices' => array(
|
60 |
+
'recent' => __('Recent','amaz-store'),
|
61 |
+
'featured' => __('Featured','amaz-store'),
|
62 |
+
'random' => __('Random','amaz-store'),
|
63 |
+
|
64 |
+
),
|
65 |
+
));
|
66 |
+
|
67 |
+
$wp_customize->add_setting( 'amaz_store_single_row_prdct_slide', array(
|
68 |
+
'default' => false,
|
69 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
70 |
+
) );
|
71 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_single_row_prdct_slide', array(
|
72 |
+
'label' => esc_html__('Enable Single Row Slide', 'amaz-store'),
|
73 |
+
'type' => 'checkbox',
|
74 |
+
'section' => 'amaz_store_product_slide_section',
|
75 |
+
'settings' => 'amaz_store_single_row_prdct_slide',
|
76 |
+
) ) );
|
77 |
+
|
78 |
+
|
79 |
+
// Add an option to disable the logo.
|
80 |
+
$wp_customize->add_setting( 'amaz_store_product_slider_optn', array(
|
81 |
+
'default' => false,
|
82 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
83 |
+
) );
|
84 |
+
$wp_customize->add_control( new amaz_store_Toggle_Control( $wp_customize, 'amaz_store_product_slider_optn', array(
|
85 |
+
'label' => esc_html__( 'Slide Auto Play', 'amaz-store' ),
|
86 |
+
'section' => 'amaz_store_product_slide_section',
|
87 |
+
'type' => 'toggle',
|
88 |
+
'settings' => 'amaz_store_product_slider_optn',
|
89 |
+
) ) );
|
90 |
+
$wp_customize->add_setting('amaz_store_product_slider_speed', array(
|
91 |
+
'default' =>'3000',
|
92 |
+
'capability' => 'edit_theme_options',
|
93 |
+
'sanitize_callback' => 'amaz_store_sanitize_number',
|
94 |
+
));
|
95 |
+
$wp_customize->add_control( 'amaz_store_product_slider_speed', array(
|
96 |
+
'label' => __('Speed', 'amaz-store'),
|
97 |
+
'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','amaz-store'),
|
98 |
+
'section' => 'amaz_store_product_slide_section',
|
99 |
+
'type' => 'number',
|
100 |
+
));
|
101 |
+
|
102 |
+
|
103 |
+
$wp_customize->add_setting('amaz_store_product_slider_doc', array(
|
104 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
105 |
+
));
|
106 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_product_slider_doc',
|
107 |
+
array(
|
108 |
+
'section' => 'amaz_store_product_slide_section',
|
109 |
+
'type' => 'doc-link',
|
110 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#product-carousel',
|
111 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
112 |
+
'priority' =>100,
|
113 |
+
)));
|
amaz-store/customizer/section/frontpage/ribbon.php
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
define('AMAZ_STORE_RIBBON_LAYOUT_1', THEMEHUNK_CUSTOMIZER_PLUGIN_URL. "amaz-store/customizer/images/ribbon-layout-1.png");
|
3 |
+
define('AMAZ_STORE_RIBBON_LAYOUT_2', THEMEHUNK_CUSTOMIZER_PLUGIN_URL. "amaz-store/customizer/images/ribbon-layout-2.png");
|
4 |
+
$wp_customize->add_setting( 'amaz_store_disable_ribbon_sec', array(
|
5 |
+
'default' => false,
|
6 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
7 |
+
) );
|
8 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_ribbon_sec', array(
|
9 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
10 |
+
'type' => 'checkbox',
|
11 |
+
'priority' => 1,
|
12 |
+
'section' => 'amaz_store_ribbon',
|
13 |
+
'settings' => 'amaz_store_disable_ribbon_sec',
|
14 |
+
) ) );
|
15 |
+
|
16 |
+
// choose col layout
|
17 |
+
if(class_exists('amaz_store_WP_Customize_Control_Radio_Image')){
|
18 |
+
$wp_customize->add_setting(
|
19 |
+
'amaz_store_ribbon_layout', array(
|
20 |
+
'default' => 'mhdrthree',
|
21 |
+
'sanitize_callback' => 'amaz_store_sanitize_radio',
|
22 |
+
)
|
23 |
+
);
|
24 |
+
$wp_customize->add_control(
|
25 |
+
new amaz_store_WP_Customize_Control_Radio_Image(
|
26 |
+
$wp_customize, 'amaz_store_ribbon_layout', array(
|
27 |
+
'label' => esc_html__( 'Ribbon Layout', 'amaz-store' ),
|
28 |
+
'section' => 'amaz_store_ribbon',
|
29 |
+
'choices' => array(
|
30 |
+
'ribbonleft' => array(
|
31 |
+
'url' => AMAZ_STORE_RIBBON_LAYOUT_1,
|
32 |
+
),
|
33 |
+
'ribboncenter' => array(
|
34 |
+
'url' => AMAZ_STORE_RIBBON_LAYOUT_2,
|
35 |
+
),
|
36 |
+
|
37 |
+
),
|
38 |
+
'priority' => 1,
|
39 |
+
)
|
40 |
+
)
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
$wp_customize->add_setting('amaz_store_ribbon_background', array(
|
45 |
+
'default' => 'image',
|
46 |
+
'sanitize_callback' => 'amaz_store_sanitize_select',
|
47 |
+
) );
|
48 |
+
$wp_customize->add_control( new amaz_store_Customizer_Buttonset_Control( $wp_customize, 'amaz_store_ribbon_background', array(
|
49 |
+
'label' => esc_html__( 'Choose Ribbon Background', 'amaz-store' ),
|
50 |
+
'priority' => 2,
|
51 |
+
'section' => 'amaz_store_ribbon',
|
52 |
+
'settings' => 'amaz_store_ribbon_background',
|
53 |
+
'choices' => array(
|
54 |
+
'image' => esc_html__( 'Image', 'amaz-store' ),
|
55 |
+
'video' => esc_html__( 'Video (Pro)', 'amaz-store' ),
|
56 |
+
),
|
57 |
+
) ) );
|
58 |
+
$wp_customize->add_setting( 'amaz_store_ribbon_bg_img_url', array(
|
59 |
+
'sanitize_callback' => 'esc_url',
|
60 |
+
'transport' => 'postMessage',
|
61 |
+
) );
|
62 |
+
$wp_customize->add_setting( 'amaz_store_ribbon_bg_img_id', array(
|
63 |
+
'sanitize_callback' => 'absint',
|
64 |
+
'transport' => 'postMessage',
|
65 |
+
) );
|
66 |
+
|
67 |
+
$wp_customize->add_setting( 'amaz_store_ribbon_bg_background_repeat', array(
|
68 |
+
'default' => 'no-repeat',
|
69 |
+
'sanitize_callback' => 'sanitize_text_field',
|
70 |
+
'transport' => 'postMessage',
|
71 |
+
) );
|
72 |
+
|
73 |
+
$wp_customize->add_setting( 'amaz_store_ribbon_bg_background_size', array(
|
74 |
+
'default' => 'auto',
|
75 |
+
'sanitize_callback' => 'sanitize_text_field',
|
76 |
+
'transport' => 'postMessage',
|
77 |
+
) );
|
78 |
+
|
79 |
+
$wp_customize->add_setting( 'amaz_store_ribbon_bg_background_attach', array(
|
80 |
+
'default' => 'scroll',
|
81 |
+
'sanitize_callback' => 'sanitize_text_field',
|
82 |
+
'transport' => 'postMessage',
|
83 |
+
) );
|
84 |
+
|
85 |
+
$wp_customize->add_setting( 'amaz_store_ribbon_bg_background_position', array(
|
86 |
+
'default' => 'center center',
|
87 |
+
'sanitize_callback' => 'sanitize_text_field',
|
88 |
+
) );
|
89 |
+
// Registers example_background control
|
90 |
+
$wp_customize->add_control(
|
91 |
+
new amaz_store_Customize_Custom_Background_Control(
|
92 |
+
$wp_customize,
|
93 |
+
'amaz_store_ribbon_bg_background_image',
|
94 |
+
array(
|
95 |
+
'label' => esc_html__( 'Background Image', 'amaz-store' ),
|
96 |
+
'section' => 'amaz_store_ribbon',
|
97 |
+
'priority' => 2,
|
98 |
+
'settings' => array(
|
99 |
+
'image_url' => 'amaz_store_ribbon_bg_img_url',
|
100 |
+
'image_id' => 'amaz_store_ribbon_bg_img_id',
|
101 |
+
'repeat' => 'amaz_store_ribbon_bg_background_repeat', // Use false to hide the field
|
102 |
+
'size' => 'amaz_store_ribbon_bg_background_size',
|
103 |
+
'position' => 'amaz_store_ribbon_bg_background_position',
|
104 |
+
'attach' => 'amaz_store_ribbon_bg_background_attach'
|
105 |
+
)
|
106 |
+
)
|
107 |
+
)
|
108 |
+
);
|
109 |
+
|
110 |
+
$wp_customize->add_setting('amaz_store_ribbon_bg_video', array(
|
111 |
+
'default' => '',
|
112 |
+
'sanitize_callback' => 'sanitize_text_field'
|
113 |
+
));
|
114 |
+
$wp_customize->add_control( new WP_Customize_Image_Control(
|
115 |
+
$wp_customize, 'amaz_store_ribbon_bg_video', array(
|
116 |
+
'label' => __('Upload Background Video', 'oneline'),
|
117 |
+
'section' => 'amaz_store_ribbon',
|
118 |
+
'settings' => 'amaz_store_ribbon_bg_video',
|
119 |
+
)));
|
120 |
+
$wp_customize->add_setting('amaz_store_ribbon_video_poster_image', array(
|
121 |
+
'default' => '',
|
122 |
+
'sanitize_callback' => 'sanitize_text_field'
|
123 |
+
));
|
124 |
+
$wp_customize->add_control( new WP_Customize_Image_Control(
|
125 |
+
$wp_customize, 'amaz_store_ribbon_video_poster_image', array(
|
126 |
+
'label' => __('Upload Video Poster Image', 'oneline'),
|
127 |
+
'section' => 'amaz_store_ribbon',
|
128 |
+
'settings' => 'amaz_store_ribbon_video_poster_image',
|
129 |
+
)));
|
130 |
+
|
131 |
+
$wp_customize->add_setting( 'amaz_store_enable_youtube_video', array(
|
132 |
+
'default' => false,
|
133 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
134 |
+
) );
|
135 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_enable_youtube_video', array(
|
136 |
+
'label' => esc_html__('Check to upload youtube video link', 'amaz-store'),
|
137 |
+
'type' => 'checkbox',
|
138 |
+
'section' => 'amaz_store_ribbon',
|
139 |
+
'settings' => 'amaz_store_enable_youtube_video',
|
140 |
+
) ) );
|
141 |
+
|
142 |
+
$wp_customize->add_setting('amaz_store_youtube_video_link', array(
|
143 |
+
'default' => '',
|
144 |
+
'capability' => 'edit_theme_options',
|
145 |
+
'sanitize_callback' => 'amaz_store_sanitize_textarea',
|
146 |
+
|
147 |
+
));
|
148 |
+
$wp_customize->add_control('amaz_store_youtube_video_link', array(
|
149 |
+
'label' => __('Enter youtube video embeded Url', 'amaz-store'),
|
150 |
+
'section' => 'amaz_store_ribbon',
|
151 |
+
'settings' => 'amaz_store_youtube_video_link',
|
152 |
+
'type' => 'textarea',
|
153 |
+
));
|
154 |
+
|
155 |
+
if ( class_exists( 'amaz_store_WP_Customizer_Range_Value_Control' ) ){
|
156 |
+
$wp_customize->add_setting(
|
157 |
+
'amaz_store_ribbon_margin', array(
|
158 |
+
'sanitize_callback' => 'amaz_store_sanitize_range_value',
|
159 |
+
'default' => '178',
|
160 |
+
)
|
161 |
+
);
|
162 |
+
$wp_customize->add_control(
|
163 |
+
new amaz_store_WP_Customizer_Range_Value_Control(
|
164 |
+
$wp_customize, 'amaz_store_ribbon_margin', array(
|
165 |
+
'label' => esc_html__( 'Ribbon Margin (Pro)', 'amaz-store' ),
|
166 |
+
'section' => 'amaz_store_ribbon',
|
167 |
+
'type' => 'range-value',
|
168 |
+
'input_attr' => array(
|
169 |
+
'min' => 1,
|
170 |
+
'max' => 1000,
|
171 |
+
'step' => 1,
|
172 |
+
),
|
173 |
+
'media_query' => true,
|
174 |
+
'sum_type' => true,
|
175 |
+
)
|
176 |
+
)
|
177 |
+
);
|
178 |
+
}
|
179 |
+
|
180 |
+
$wp_customize->add_setting('amaz_store_ribbon_text', array(
|
181 |
+
'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.',
|
182 |
+
'capability' => 'edit_theme_options',
|
183 |
+
'sanitize_callback' => 'amaz_store_sanitize_textarea',
|
184 |
+
'transport' => 'postMessage',
|
185 |
+
|
186 |
+
));
|
187 |
+
$wp_customize->add_control('amaz_store_ribbon_text', array(
|
188 |
+
'label' => __('Text', 'amaz-store'),
|
189 |
+
'section' => 'amaz_store_ribbon',
|
190 |
+
'settings' => 'amaz_store_ribbon_text',
|
191 |
+
'type' => 'textarea',
|
192 |
+
));
|
193 |
+
|
194 |
+
$wp_customize->add_setting('amaz_store_ribbon_btn_text', array(
|
195 |
+
'default' => 'Call To Action',
|
196 |
+
'capability' => 'edit_theme_options',
|
197 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
198 |
+
'transport' => 'postMessage',
|
199 |
+
|
200 |
+
));
|
201 |
+
$wp_customize->add_control('amaz_store_ribbon_btn_text', array(
|
202 |
+
'label' => __('Button Text', 'amaz-store'),
|
203 |
+
'section' => 'amaz_store_ribbon',
|
204 |
+
'settings' => 'amaz_store_ribbon_btn_text',
|
205 |
+
'type' => 'text',
|
206 |
+
));
|
207 |
+
|
208 |
+
$wp_customize->add_setting('amaz_store_ribbon_btn_link', array(
|
209 |
+
'default' => '#',
|
210 |
+
'capability' => 'edit_theme_options',
|
211 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
212 |
+
|
213 |
+
));
|
214 |
+
$wp_customize->add_control('amaz_store_ribbon_btn_link', array(
|
215 |
+
'label' => __('Button Link', 'amaz-store'),
|
216 |
+
'section' => 'amaz_store_ribbon',
|
217 |
+
'settings' => 'amaz_store_ribbon_btn_link',
|
218 |
+
'type' => 'text',
|
219 |
+
));
|
220 |
+
|
221 |
+
|
222 |
+
$wp_customize->add_setting('amaz_store_ribbon_doc', array(
|
223 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
224 |
+
));
|
225 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_ribbon_doc',
|
226 |
+
array(
|
227 |
+
'section' => 'amaz_store_ribbon',
|
228 |
+
'type' => 'doc-link',
|
229 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#ribbon-section',
|
230 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
231 |
+
'priority' =>100,
|
232 |
+
)));
|
233 |
+
|
234 |
+
/*************************/
|
235 |
+
/* Typography Section for Pro*/
|
236 |
+
/*************************/
|
237 |
+
$wp_customize->add_section( 'amaz-typography-pro-show' , array(
|
238 |
+
'title' => __('Typography (Pro)','amaz-store'),
|
239 |
+
'priority' => 30,
|
240 |
+
) );
|
241 |
+
|
242 |
+
$wp_customize->add_setting('amaz-typography-pro-link', array(
|
243 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
244 |
+
));
|
245 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz-typography-pro-link',
|
246 |
+
array(
|
247 |
+
'section' => 'amaz-typography-pro-show',
|
248 |
+
'type' => 'pro-link',
|
249 |
+
'url' => '#',
|
250 |
+
'label' => esc_html__( 'Get Pro', 'amaz-store' ),
|
251 |
+
'priority' =>100,
|
252 |
+
)));
|
amaz-store/customizer/section/frontpage/top-slider.php
ADDED
@@ -0,0 +1,425 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_customize->add_setting( 'amaz_store_disable_top_slider_sec', array(
|
3 |
+
'default' => false,
|
4 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
5 |
+
) );
|
6 |
+
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'amaz_store_disable_top_slider_sec', array(
|
7 |
+
'label' => esc_html__('Disable Section', 'amaz-store'),
|
8 |
+
'type' => 'checkbox',
|
9 |
+
'section' => 'amaz_store_top_slider_section',
|
10 |
+
'settings' => 'amaz_store_disable_top_slider_sec',
|
11 |
+
) ) );
|
12 |
+
|
13 |
+
if(class_exists('amaz_store_WP_Customize_Control_Radio_Image')){
|
14 |
+
$wp_customize->add_setting(
|
15 |
+
'amaz_store_top_slide_layout', array(
|
16 |
+
'default' => 'slide-layout-1',
|
17 |
+
'sanitize_callback' => 'amaz_store_sanitize_radio',
|
18 |
+
)
|
19 |
+
);
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
$wp_customize->add_control(
|
24 |
+
new amaz_store_WP_Customize_Control_Radio_Image(
|
25 |
+
$wp_customize, 'amaz_store_top_slide_layout', array(
|
26 |
+
'label' => esc_html__( 'Slider Layout', 'amaz-store' ),
|
27 |
+
'section' => 'amaz_store_top_slider_section',
|
28 |
+
'choices' => array(
|
29 |
+
'slide-layout-1' => array(
|
30 |
+
'url' => amaz_store_SLIDER_LAYOUT_1,
|
31 |
+
),
|
32 |
+
'slide-layout-2' => array(
|
33 |
+
'url' =>amaz_store_SLIDER_LAYOUT_2,
|
34 |
+
),
|
35 |
+
'slide-layout-3' => array(
|
36 |
+
'url' => amaz_store_SLIDER_LAYOUT_3,
|
37 |
+
),
|
38 |
+
'slide-layout-4' => array(
|
39 |
+
'url' => amaz_store_SLIDER_LAYOUT_4,
|
40 |
+
),
|
41 |
+
|
42 |
+
|
43 |
+
),
|
44 |
+
)
|
45 |
+
)
|
46 |
+
);
|
47 |
+
}
|
48 |
+
|
49 |
+
//Slider Content Via Repeater
|
50 |
+
if ( class_exists( 'amaz_store_Repeater' ) ){
|
51 |
+
$wp_customize->add_setting(
|
52 |
+
'amaz_store_top_slide_content', array(
|
53 |
+
'sanitize_callback' => 'amaz_store_repeater_sanitize',
|
54 |
+
'default' => '',
|
55 |
+
)
|
56 |
+
);
|
57 |
+
$wp_customize->add_control(
|
58 |
+
new amaz_store_Repeater(
|
59 |
+
$wp_customize, 'amaz_store_top_slide_content', array(
|
60 |
+
'label' => esc_html__( 'Slide Content', 'amaz-store' ),
|
61 |
+
'section' => 'amaz_store_top_slider_section',
|
62 |
+
'add_field_label' => esc_html__( 'Add new Slide', 'amaz-store' ),
|
63 |
+
'item_name' => esc_html__( 'Slide', 'amaz-store' ),
|
64 |
+
|
65 |
+
'customizer_repeater_title_control' => true,
|
66 |
+
'customizer_repeater_subtitle_control' => true,
|
67 |
+
'customizer_repeater_text_control' => true,
|
68 |
+
'customizer_repeater_image_control' => true,
|
69 |
+
'customizer_repeater_logo_image_control' => false,
|
70 |
+
'customizer_repeater_link_control' => true,
|
71 |
+
'customizer_repeater_repeater_control' => false,
|
72 |
+
|
73 |
+
|
74 |
+
),'amaz_store_top_slide_content'
|
75 |
+
)
|
76 |
+
);
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
//Slider Content Via Repeater for slider-layout-6
|
82 |
+
if ( class_exists( 'amaz_store_Repeater' ) ){
|
83 |
+
$wp_customize->add_setting(
|
84 |
+
'amaz_store_top_slide_content6', array(
|
85 |
+
'sanitize_callback' => 'amaz_store_repeater_sanitize',
|
86 |
+
'default' => '',
|
87 |
+
)
|
88 |
+
);
|
89 |
+
$wp_customize->add_control(
|
90 |
+
new amaz_store_Repeater(
|
91 |
+
$wp_customize, 'amaz_store_top_slide_content6', array(
|
92 |
+
'label' => esc_html__( 'Slide Content', 'amaz-store' ),
|
93 |
+
'section' => 'amaz_store_top_slider_section',
|
94 |
+
'add_field_label' => esc_html__( 'Add new Slide', 'amaz-store' ),
|
95 |
+
'item_name' => esc_html__( 'Slide', 'amaz-store' ),
|
96 |
+
|
97 |
+
'customizer_repeater_title_control' => true,
|
98 |
+
'customizer_repeater_subtitle_control' => false,
|
99 |
+
'customizer_repeater_text_control' => true,
|
100 |
+
'customizer_repeater_image_control' => true,
|
101 |
+
'customizer_repeater_logo_image_control' => false,
|
102 |
+
'customizer_repeater_link_control' => true,
|
103 |
+
'customizer_repeater_repeater_control' => false,
|
104 |
+
|
105 |
+
|
106 |
+
),'amaz_store_top_slide_content6'
|
107 |
+
)
|
108 |
+
);
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
// Add an option to disable the logo.
|
117 |
+
$wp_customize->add_setting( 'amaz_store_top_slider_optn', array(
|
118 |
+
'default' => false,
|
119 |
+
'sanitize_callback' => 'amaz_store_sanitize_checkbox',
|
120 |
+
) );
|
121 |
+
$wp_customize->add_control( new amaz_store_Toggle_Control( $wp_customize, 'amaz_store_top_slider_optn', array(
|
122 |
+
'label' => esc_html__( 'Slide Auto Play', 'amaz-store' ),
|
123 |
+
'section' => 'amaz_store_top_slider_section',
|
124 |
+
'type' => 'toggle',
|
125 |
+
'settings' => 'amaz_store_top_slider_optn',
|
126 |
+
) ) );
|
127 |
+
|
128 |
+
$wp_customize->add_setting('amaz_store_slider_speed', array(
|
129 |
+
'default' =>'3000',
|
130 |
+
'capability' => 'edit_theme_options',
|
131 |
+
'sanitize_callback' => 'amaz_store_sanitize_number',
|
132 |
+
));
|
133 |
+
$wp_customize->add_control( 'amaz_store_slider_speed', array(
|
134 |
+
'label' => __('Speed', 'amaz-store'),
|
135 |
+
'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','amaz-store'),
|
136 |
+
'section' => 'amaz_store_top_slider_section',
|
137 |
+
'type' => 'number',
|
138 |
+
));
|
139 |
+
|
140 |
+
|
141 |
+
//slider-layout-6
|
142 |
+
|
143 |
+
$wp_customize->add_setting('amaz_store_discount_offer_txt', array(
|
144 |
+
'default' =>__('Discount Up To 50%','amaz-store'),
|
145 |
+
'capability' => 'edit_theme_options',
|
146 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
147 |
+
'transport' => 'postMessage',
|
148 |
+
));
|
149 |
+
$wp_customize->add_control( 'amaz_store_discount_offer_txt', array(
|
150 |
+
'label' => __('Discount Offer Heading', 'amaz-store'),
|
151 |
+
'section' => 'amaz_store_top_slider_section',
|
152 |
+
'type' => 'text',
|
153 |
+
));
|
154 |
+
|
155 |
+
$wp_customize->add_setting('amaz_store_cat_url', array(
|
156 |
+
'default' =>'',
|
157 |
+
'capability' => 'edit_theme_options',
|
158 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
159 |
+
));
|
160 |
+
$wp_customize->add_control( 'amaz_store_cat_url', array(
|
161 |
+
'label' => __('Category Url', 'amaz-store'),
|
162 |
+
'section' => 'amaz_store_top_slider_section',
|
163 |
+
'type' => 'text',
|
164 |
+
));
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
|
169 |
+
// slider-layout-2
|
170 |
+
$wp_customize->add_setting('amaz_store_top_slider_2_title', array(
|
171 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
172 |
+
));
|
173 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_top_slider_2_title',
|
174 |
+
array(
|
175 |
+
'section' => 'amaz_store_top_slider_section',
|
176 |
+
'type' => 'pro-text',
|
177 |
+
'label' => esc_html__( 'First Column', 'amaz-store' ),
|
178 |
+
)));
|
179 |
+
$wp_customize->add_setting('amaz_store_lay2_adimg', array(
|
180 |
+
'default' => '',
|
181 |
+
'capability' => 'edit_theme_options',
|
182 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
183 |
+
));
|
184 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay2_adimg', array(
|
185 |
+
'label' => __('Image 1', 'amaz-store'),
|
186 |
+
'section' => 'amaz_store_top_slider_section',
|
187 |
+
'settings' => 'amaz_store_lay2_adimg',
|
188 |
+
)));
|
189 |
+
$wp_customize->add_setting('amaz_store_lay2_url', array(
|
190 |
+
'default' =>'',
|
191 |
+
'capability' => 'edit_theme_options',
|
192 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
193 |
+
));
|
194 |
+
$wp_customize->add_control( 'amaz_store_lay2_url', array(
|
195 |
+
'label' => __('url', 'amaz-store'),
|
196 |
+
'section' => 'amaz_store_top_slider_section',
|
197 |
+
'type' => 'text',
|
198 |
+
));
|
199 |
+
$wp_customize->add_setting('amaz_store_lay2_adimg2', array(
|
200 |
+
'default' => '',
|
201 |
+
'capability' => 'edit_theme_options',
|
202 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
203 |
+
));
|
204 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay2_adimg2', array(
|
205 |
+
'label' => __('Image 2', 'amaz-store'),
|
206 |
+
'section' => 'amaz_store_top_slider_section',
|
207 |
+
'settings' => 'amaz_store_lay2_adimg2',
|
208 |
+
)));
|
209 |
+
$wp_customize->add_setting('amaz_store_lay2_url2', array(
|
210 |
+
'default' =>'',
|
211 |
+
'capability' => 'edit_theme_options',
|
212 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
213 |
+
));
|
214 |
+
$wp_customize->add_control( 'amaz_store_lay2_url2', array(
|
215 |
+
'label' => __('url', 'amaz-store'),
|
216 |
+
'section' => 'amaz_store_top_slider_section',
|
217 |
+
'type' => 'text',
|
218 |
+
));
|
219 |
+
// third coloum image
|
220 |
+
$wp_customize->add_setting('amaz_store_top_slider_2_title2', array(
|
221 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
222 |
+
));
|
223 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_top_slider_2_title2',
|
224 |
+
array(
|
225 |
+
'section' => 'amaz_store_top_slider_section',
|
226 |
+
'type' => 'pro-text',
|
227 |
+
'label' => esc_html__( 'Third Column', 'amaz-store' ),
|
228 |
+
)));
|
229 |
+
$wp_customize->add_setting('amaz_store_lay2_adimg3', array(
|
230 |
+
'default' => '',
|
231 |
+
'capability' => 'edit_theme_options',
|
232 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
233 |
+
));
|
234 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay2_adimg3', array(
|
235 |
+
'label' => __('Image', 'amaz-store'),
|
236 |
+
'section' => 'amaz_store_top_slider_section',
|
237 |
+
'settings' => 'amaz_store_lay2_adimg3',
|
238 |
+
)));
|
239 |
+
$wp_customize->add_setting('amaz_store_lay2_url3', array(
|
240 |
+
'default' =>'',
|
241 |
+
'capability' => 'edit_theme_options',
|
242 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
243 |
+
));
|
244 |
+
$wp_customize->add_control( 'amaz_store_lay2_url3', array(
|
245 |
+
'label' => __('url', 'amaz-store'),
|
246 |
+
'section' => 'amaz_store_top_slider_section',
|
247 |
+
'type' => 'text',
|
248 |
+
));
|
249 |
+
|
250 |
+
|
251 |
+
// third coloum image
|
252 |
+
$wp_customize->add_setting('amaz_store_top_slider_3_title2', array(
|
253 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
254 |
+
));
|
255 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_top_slider_3_title2',
|
256 |
+
array(
|
257 |
+
'section' => 'amaz_store_top_slider_section',
|
258 |
+
'type' => 'pro-text',
|
259 |
+
'label' => esc_html__( 'Third Column', 'amaz-store' ),
|
260 |
+
)));
|
261 |
+
$wp_customize->add_setting('amaz_store_lay3_adimg3', array(
|
262 |
+
'default' => '',
|
263 |
+
'capability' => 'edit_theme_options',
|
264 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
265 |
+
));
|
266 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay3_adimg3', array(
|
267 |
+
'label' => __('Image', 'amaz-store'),
|
268 |
+
'section' => 'amaz_store_top_slider_section',
|
269 |
+
'settings' => 'amaz_store_lay3_adimg3',
|
270 |
+
)));
|
271 |
+
$wp_customize->add_setting('amaz_store_lay3_url3', array(
|
272 |
+
'default' =>'',
|
273 |
+
'capability' => 'edit_theme_options',
|
274 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
275 |
+
));
|
276 |
+
$wp_customize->add_control( 'amaz_store_lay3_url3', array(
|
277 |
+
'label' => __('url', 'amaz-store'),
|
278 |
+
'section' => 'amaz_store_top_slider_section',
|
279 |
+
'type' => 'text',
|
280 |
+
));
|
281 |
+
|
282 |
+
|
283 |
+
|
284 |
+
// slider-layout-3
|
285 |
+
$wp_customize->add_setting('amaz_store_lay3_adimg', array(
|
286 |
+
'default' => '',
|
287 |
+
'capability' => 'edit_theme_options',
|
288 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
289 |
+
));
|
290 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay3_adimg', array(
|
291 |
+
'label' => __('Image 1', 'amaz-store'),
|
292 |
+
'section' => 'amaz_store_top_slider_section',
|
293 |
+
'settings' => 'amaz_store_lay3_adimg',
|
294 |
+
)));
|
295 |
+
$wp_customize->add_setting('amaz_store_lay3_url', array(
|
296 |
+
'default' =>'',
|
297 |
+
'capability' => 'edit_theme_options',
|
298 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
299 |
+
));
|
300 |
+
$wp_customize->add_control( 'amaz_store_lay3_url', array(
|
301 |
+
'label' => __('url', 'amaz-store'),
|
302 |
+
'section' => 'amaz_store_top_slider_section',
|
303 |
+
'type' => 'text',
|
304 |
+
));
|
305 |
+
$wp_customize->add_setting('amaz_store_lay3_adimg2', array(
|
306 |
+
'default' => '',
|
307 |
+
'capability' => 'edit_theme_options',
|
308 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
309 |
+
));
|
310 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay3_adimg2', array(
|
311 |
+
'label' => __('Image 2', 'amaz-store'),
|
312 |
+
'section' => 'amaz_store_top_slider_section',
|
313 |
+
'settings' => 'amaz_store_lay3_adimg2',
|
314 |
+
)));
|
315 |
+
$wp_customize->add_setting('amaz_store_lay3_2url', array(
|
316 |
+
'default' =>'',
|
317 |
+
'capability' => 'edit_theme_options',
|
318 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
319 |
+
));
|
320 |
+
$wp_customize->add_control( 'amaz_store_lay3_2url', array(
|
321 |
+
'label' => __('url', 'amaz-store'),
|
322 |
+
'section' => 'amaz_store_top_slider_section',
|
323 |
+
'type' => 'text',
|
324 |
+
));
|
325 |
+
|
326 |
+
$wp_customize->add_setting('amaz_store_lay3_adimg3', array(
|
327 |
+
'default' => '',
|
328 |
+
'capability' => 'edit_theme_options',
|
329 |
+
'sanitize_callback' => 'amaz_store_sanitize_upload',
|
330 |
+
));
|
331 |
+
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'amaz_store_lay3_adimg3', array(
|
332 |
+
'label' => __('Image 3', 'amaz-store'),
|
333 |
+
'section' => 'amaz_store_top_slider_section',
|
334 |
+
'settings' => 'amaz_store_lay3_adimg3',
|
335 |
+
)));
|
336 |
+
$wp_customize->add_setting('amaz_store_lay3_3url', array(
|
337 |
+
'default' =>'',
|
338 |
+
'capability' => 'edit_theme_options',
|
339 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
340 |
+
));
|
341 |
+
$wp_customize->add_control( 'amaz_store_lay3_3url', array(
|
342 |
+
'label' => __('url', 'amaz-store'),
|
343 |
+
'section' => 'amaz_store_top_slider_section',
|
344 |
+
'type' => 'text',
|
345 |
+
));
|
346 |
+
// Include category
|
347 |
+
if (class_exists( 'amaz_store_Customize_Control_Checkbox_Multiple')) {
|
348 |
+
$wp_customize->add_setting('amaz_store_include_category_slider', array(
|
349 |
+
'default' => '',
|
350 |
+
'sanitize_callback' => 'amaz_store_checkbox_explode'
|
351 |
+
));
|
352 |
+
$wp_customize->add_control(new amaz_store_Customize_Control_Checkbox_Multiple(
|
353 |
+
$wp_customize,'amaz_store_include_category_slider', array(
|
354 |
+
'settings'=> 'amaz_store_include_category_slider',
|
355 |
+
'label' => __( 'Choose Categories To Include', 'amaz-store' ),
|
356 |
+
'section' => 'amaz_store_top_slider_section',
|
357 |
+
'choices' => amaz_store_get_category_id(array('taxonomy' =>'product_cat'),false),
|
358 |
+
)
|
359 |
+
));
|
360 |
+
|
361 |
+
}
|
362 |
+
|
363 |
+
$wp_customize->add_setting( 'amaz_store_lay3_bg_background_image_url', array(
|
364 |
+
'sanitize_callback' => 'esc_url',
|
365 |
+
'transport' => 'postMessage',
|
366 |
+
) );
|
367 |
+
$wp_customize->add_setting( 'amaz_store_lay3_bg_background_image_id', array(
|
368 |
+
'sanitize_callback' => 'absint',
|
369 |
+
'transport' => 'postMessage',
|
370 |
+
) );
|
371 |
+
|
372 |
+
$wp_customize->add_setting( 'amaz_store_lay3_bg_background_repeat', array(
|
373 |
+
'default' => 'no-repeat',
|
374 |
+
'sanitize_callback' => 'sanitize_text_field',
|
375 |
+
'transport' => 'postMessage',
|
376 |
+
) );
|
377 |
+
|
378 |
+
$wp_customize->add_setting( 'amaz_store_lay3_bg_background_size', array(
|
379 |
+
'default' => 'auto',
|
380 |
+
'sanitize_callback' => 'sanitize_text_field',
|
381 |
+
'transport' => 'postMessage',
|
382 |
+
) );
|
383 |
+
|
384 |
+
$wp_customize->add_setting( 'amaz_store_lay3_bg_background_attach', array(
|
385 |
+
'default' => 'scroll',
|
386 |
+
'sanitize_callback' => 'sanitize_text_field',
|
387 |
+
'transport' => 'postMessage',
|
388 |
+
) );
|
389 |
+
|
390 |
+
$wp_customize->add_setting( 'amaz_store_lay3_bg_background_position', array(
|
391 |
+
'default' => 'center center',
|
392 |
+
'sanitize_callback' => 'sanitize_text_field',
|
393 |
+
'transport' => 'postMessage',
|
394 |
+
) );
|
395 |
+
// Registers example_background control
|
396 |
+
$wp_customize->add_control(
|
397 |
+
new amaz_store_Customize_Custom_Background_Control(
|
398 |
+
$wp_customize,
|
399 |
+
'amaz_store_lay3_bg_img',
|
400 |
+
array(
|
401 |
+
'label' => esc_html__( 'Background Image', 'amaz-store' ),
|
402 |
+
'section' => 'amaz_store_top_slider_section',
|
403 |
+
'settings' => array(
|
404 |
+
'image_url' => 'amaz_store_lay3_bg_background_image_url',
|
405 |
+
'image_id' => 'amaz_store_lay3_bg_background_image_id',
|
406 |
+
'repeat' => 'amaz_store_lay3_bg_background_repeat', // Use false to hide the field
|
407 |
+
'size' => 'amaz_store_lay3_bg_background_size',
|
408 |
+
'position' => 'amaz_store_lay3_bg_background_position',
|
409 |
+
'attach' => 'amaz_store_lay3_bg_background_attach'
|
410 |
+
)
|
411 |
+
)
|
412 |
+
)
|
413 |
+
);
|
414 |
+
$wp_customize->add_setting('amaz_store_top_slider_doc', array(
|
415 |
+
'sanitize_callback' => 'amaz_store_sanitize_text',
|
416 |
+
));
|
417 |
+
$wp_customize->add_control(new amaz_store_Misc_Control( $wp_customize, 'amaz_store_top_slider_doc',
|
418 |
+
array(
|
419 |
+
'section' => 'amaz_store_top_slider_section',
|
420 |
+
'type' => 'doc-link',
|
421 |
+
'url' => 'https://themehunk.com/docs/amaz-store/#top-slider',
|
422 |
+
'description' => esc_html__( 'To know more go with this', 'amaz-store' ),
|
423 |
+
'priority' =>100,
|
424 |
+
)));
|
425 |
+
|
amaz-store/demo/import.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' );
|
3 |
+
add_filter( 'pt-ocdi/regenerate_thumbnails_in_content_import', '__return_false' );
|
4 |
+
|
5 |
+
function amaz_store_import_files(){
|
6 |
+
$file_url = 'https://themehunk.com/wp-content/uploads/sites-demo/jotshop/';
|
7 |
+
return apply_filters(
|
8 |
+
'amaz_store_demo_site', array(
|
9 |
+
array(
|
10 |
+
'import_file_name' => esc_html__('Amaz Store Default','amaz-store'),
|
11 |
+
'import_file_url'=> esc_url($file_url.'default/blog.xml'),
|
12 |
+
'import_customizer_file_url'=> esc_url($file_url.'default/customizer.dat'),
|
13 |
+
'import_widget_file_url'=> esc_url($file_url.'default/widgets.wie'),
|
14 |
+
'import_preview_image_url'=> esc_url($file_url.'default/thumb.png'),
|
15 |
+
'preview_url'=> esc_url('https://wpthemes.themehunk.com/jotshop/'),
|
16 |
+
'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'amaz-store' ),
|
17 |
+
),
|
18 |
+
array(
|
19 |
+
'import_file_name' => esc_html__('Amaz Store Groceries','amaz-store'),
|
20 |
+
'import_file_url'=> esc_url($file_url.'groceries/blog.xml'),
|
21 |
+
'import_customizer_file_url'=> esc_url($file_url.'groceries/customizer.dat'),
|
22 |
+
'import_widget_file_url'=> esc_url($file_url.'groceries/widgets.wie'),
|
23 |
+
'import_preview_image_url'=> esc_url($file_url.'groceries/thumb.png'),
|
24 |
+
'preview_url'=> esc_url('https://wpthemes.themehunk.com/groceries-shop/'),
|
25 |
+
'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'amaz-store' ),
|
26 |
+
),
|
27 |
+
array(
|
28 |
+
'import_file_name' => esc_html__('Amaz Store Electro','amaz-store'),
|
29 |
+
'import_file_url'=> esc_url($file_url.'electro/blog.xml'),
|
30 |
+
'import_customizer_file_url'=> esc_url($file_url.'electro/customizer.dat'),
|
31 |
+
'import_widget_file_url'=> esc_url($file_url.'electro/widgets.wie'),
|
32 |
+
'import_preview_image_url'=> esc_url($file_url.'electro/thumb.png'),
|
33 |
+
'preview_url'=> esc_url('https://wpthemes.themehunk.com/electro-shop/'),
|
34 |
+
'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'amaz-store' ),
|
35 |
+
),
|
36 |
+
)
|
37 |
+
);
|
38 |
+
}
|
39 |
+
add_filter( 'pt-ocdi/import_files', 'amaz_store_import_files');
|
40 |
+
|
41 |
+
/**
|
42 |
+
* OCDI after import.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
*/
|
46 |
+
function amaz_store_after_import(){
|
47 |
+
|
48 |
+
// Assign front page and posts page (blog page).
|
49 |
+
$front_page_id = null;
|
50 |
+
$blog_page_id = null;
|
51 |
+
|
52 |
+
$front_page = get_page_by_title( 'home' );
|
53 |
+
|
54 |
+
if ( $front_page ) {
|
55 |
+
if ( is_array( $front_page ) ){
|
56 |
+
$first_page = array_shift( $front_page );
|
57 |
+
$front_page_id = $first_page->ID;
|
58 |
+
} else {
|
59 |
+
$front_page_id = $front_page->ID;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
$blog_page = get_page_by_title( 'blog' );
|
64 |
+
|
65 |
+
if ( $blog_page ) {
|
66 |
+
if ( is_array( $blog_page ) ) {
|
67 |
+
$first_page = array_shift( $blog_page );
|
68 |
+
$blog_page_id = $first_page->ID;
|
69 |
+
} else {
|
70 |
+
$blog_page_id = $blog_page->ID;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( $front_page_id ) {
|
75 |
+
update_option( 'page_on_front', $front_page_id );
|
76 |
+
update_option( 'show_on_front', 'page' );
|
77 |
+
|
78 |
+
}
|
79 |
+
if ($blog_page_id) {
|
80 |
+
update_option( 'page_for_posts', $blog_page_id );
|
81 |
+
}
|
82 |
+
|
83 |
+
// Assign navigation menu locations.
|
84 |
+
$menu_location_details = array(
|
85 |
+
'amaz-store-above-menu' => 'frontpage',
|
86 |
+
'amaz-store-main-menu' => 'frontpage',
|
87 |
+
'amaz-store-footer-menu' => 'footer',
|
88 |
+
);
|
89 |
+
|
90 |
+
if ( ! empty( $menu_location_details ) ){
|
91 |
+
$navigation_settings = array();
|
92 |
+
$current_navigation_menus = wp_get_nav_menus();
|
93 |
+
if ( ! empty( $current_navigation_menus ) && ! is_wp_error( $current_navigation_menus ) ) {
|
94 |
+
foreach ( $current_navigation_menus as $menu ) {
|
95 |
+
foreach ( $menu_location_details as $location => $menu_slug ) {
|
96 |
+
if ( $menu->slug === $menu_slug ) {
|
97 |
+
$navigation_settings[ $location ] = $menu->term_id;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
set_theme_mod( 'nav_menu_locations', $navigation_settings );
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
add_action( 'pt-ocdi/after_import', 'amaz_store_after_import' );
|
amaz-store/include.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store-admin/amaz-store-shortcode.php' );
|
3 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store-admin/woo/amaz-store-admin.php' );
|
4 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store-admin/woo/woo-ajax.php' );
|
5 |
+
include_once( plugin_dir_path(__FILE__) . 'customizer/customizer.php' );
|
6 |
+
|
7 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store-admin/widget/widget-input.php' );
|
8 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store-admin/widget/about-us-widget.php' );
|
9 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store-admin/widget/post-single-slide-widget.php' );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: ThemeHunk
|
|
3 |
Author URI: : https://www.themehunk.com/
|
4 |
Tags: themehunk, customizer, oneline-lite,Testimonial,Team, service
|
5 |
Requires at least: 5.5
|
6 |
-
Tested up to: 5.8.
|
7 |
-
Stable tag: 2.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,6 +29,9 @@ Just upload the `themehunk-customizer.zip` to the `/wp-content/plugins/` directo
|
|
29 |
== Screenshots ==
|
30 |
|
31 |
== Changelog ==
|
|
|
|
|
|
|
32 |
= 2.5.8 =
|
33 |
* Jotshop - Jot Shop Pro Plugin compatibility added.
|
34 |
* Jotshop - Slider Overlay Settings Removed.
|
3 |
Author URI: : https://www.themehunk.com/
|
4 |
Tags: themehunk, customizer, oneline-lite,Testimonial,Team, service
|
5 |
Requires at least: 5.5
|
6 |
+
Tested up to: 5.8.2
|
7 |
+
Stable tag: 2.5.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
== Screenshots ==
|
30 |
|
31 |
== Changelog ==
|
32 |
+
= 2.5.9 =
|
33 |
+
* Amaz Store - Initial Released.
|
34 |
+
|
35 |
= 2.5.8 =
|
36 |
* Jotshop - Jot Shop Pro Plugin compatibility added.
|
37 |
* Jotshop - Slider Overlay Settings Removed.
|
themehunk-customizer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: ThemeHunk Customizer
|
4 |
Description: With the help of ThemeHunk unlimited addon you can add unlimited number of columns for services, Testimonial, and Team with color options for each.
|
5 |
-
Version: 2.5.
|
6 |
Author: ThemeHunk
|
7 |
Text Domain: themehunk-customizer
|
8 |
Author URI: http://www.themehunk.com/
|
@@ -38,13 +38,21 @@ elseif(in_array("jot-shop", $theme)){
|
|
38 |
register_activation_hook( __FILE__, 'jot_shop_pro_deactivate' );
|
39 |
include_once( plugin_dir_path(__FILE__) . 'jot-shop/demo/import.php' );
|
40 |
}
|
|
|
|
|
|
|
|
|
41 |
|
42 |
function jot_shop_pro_deactivate() {
|
43 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
44 |
deactivate_plugins( plugin_basename('jot-shop-pro/jot-shop-pro.php' ) );
|
45 |
|
46 |
}
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
function themehunk_customizer_load_file(){
|
49 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-font-selector/class/class-oneline-font-selector.php' );
|
50 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-range-value/class/class-oneline-customizer-range-value-control.php' );
|
@@ -89,5 +97,8 @@ function themehunk_customizer_load_plugin() {
|
|
89 |
elseif(in_array("jot-shop", $theme)){
|
90 |
include_once( plugin_dir_path(__FILE__) . 'jot-shop/include.php' );
|
91 |
}
|
|
|
|
|
|
|
92 |
}
|
93 |
?>
|
2 |
/*
|
3 |
Plugin Name: ThemeHunk Customizer
|
4 |
Description: With the help of ThemeHunk unlimited addon you can add unlimited number of columns for services, Testimonial, and Team with color options for each.
|
5 |
+
Version: 2.5.9
|
6 |
Author: ThemeHunk
|
7 |
Text Domain: themehunk-customizer
|
8 |
Author URI: http://www.themehunk.com/
|
38 |
register_activation_hook( __FILE__, 'jot_shop_pro_deactivate' );
|
39 |
include_once( plugin_dir_path(__FILE__) . 'jot-shop/demo/import.php' );
|
40 |
}
|
41 |
+
elseif(in_array("amaz-store", $theme)){
|
42 |
+
// register_activation_hook( __FILE__, 'themehunk_pro_plugin_deactivate' );
|
43 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store/demo/import.php' );
|
44 |
+
}
|
45 |
|
46 |
function jot_shop_pro_deactivate() {
|
47 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
48 |
deactivate_plugins( plugin_basename('jot-shop-pro/jot-shop-pro.php' ) );
|
49 |
|
50 |
}
|
51 |
+
function themehunk_pro_plugin_deactivate(){
|
52 |
+
global $theme;
|
53 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
54 |
+
deactivate_plugins( plugin_basename($theme[0].'-pro/'.$theme[0].'-pro.php' ) );
|
55 |
+
}
|
56 |
function themehunk_customizer_load_file(){
|
57 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-font-selector/class/class-oneline-font-selector.php' );
|
58 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-range-value/class/class-oneline-customizer-range-value-control.php' );
|
97 |
elseif(in_array("jot-shop", $theme)){
|
98 |
include_once( plugin_dir_path(__FILE__) . 'jot-shop/include.php' );
|
99 |
}
|
100 |
+
elseif(in_array("amaz-store", $theme)){
|
101 |
+
include_once( plugin_dir_path(__FILE__) . 'amaz-store/include.php' );
|
102 |
+
}
|
103 |
}
|
104 |
?>
|