ThemeHunk Customizer - Version 2.5.1

Version Description

  • Jot-Shop Theme Added.
Download this release

Release Info

Developer themehunk
Plugin Icon 128x128 ThemeHunk Customizer
Version 2.5.1
Comparing to
See all releases

Code changes from version 1.2.9 to 2.5.1

Files changed (183) hide show
  1. big-store/big-store-admin/big-store-shortcode.php +32 -0
  2. big-store/big-store-admin/woo/big-store-admin.php +486 -0
  3. big-store/big-store-admin/woo/woo-ajax.php +17 -0
  4. big-store/big-store-front-page/front-banner.php +13 -0
  5. big-store/big-store-front-page/front-categoryslider.php +162 -0
  6. big-store/big-store-front-page/front-highlight.php +18 -0
  7. big-store/big-store-front-page/front-productlist.php +26 -0
  8. big-store/big-store-front-page/front-productslider.php +27 -0
  9. big-store/big-store-front-page/front-ribbon.php +38 -0
  10. big-store/big-store-front-page/front-tabproduct.php +36 -0
  11. big-store/big-store-front-page/front-tabproductimage.php +48 -0
  12. big-store/big-store-front-page/front-topslider.php +97 -0
  13. big-store/customizer/customizer.php +41 -0
  14. big-store/customizer/section/frontpage/banner.php +176 -0
  15. big-store/customizer/section/frontpage/category-slider.php +123 -0
  16. big-store/customizer/section/frontpage/category-tab.php +104 -0
  17. big-store/customizer/section/frontpage/higlight.php +73 -0
  18. big-store/customizer/section/frontpage/product-list.php +98 -0
  19. big-store/customizer/section/frontpage/product-slide.php +111 -0
  20. big-store/customizer/section/frontpage/ribbon.php +154 -0
  21. big-store/customizer/section/frontpage/tab-productimage.php +120 -0
  22. big-store/customizer/section/frontpage/top-slider.php +341 -0
  23. big-store/demo/import.php +111 -0
  24. big-store/include.php +5 -0
  25. elanzalite/assets/css/owl.carousel.css +0 -0
  26. elanzalite/assets/js/jquery.flexslider.js +0 -0
  27. elanzalite/assets/js/owl.carousel.js +0 -0
  28. elanzalite/customizer/custom-customizer.php +0 -0
  29. elanzalite/customizer/customizer_styles.css +0 -0
  30. elanzalite/customizer/js/customizer.js +0 -0
  31. elanzalite/customizer/js/widget.js +0 -0
  32. elanzalite/images/style1.png +0 -0
  33. elanzalite/images/style2.png +0 -0
  34. elanzalite/images/style3.png +0 -0
  35. elanzalite/images/style4.png +0 -0
  36. elanzalite/images/style5.png +0 -0
  37. elanzalite/inc/constant.php +0 -0
  38. elanzalite/inc/install.php +0 -0
  39. elanzalite/inc/shortcode.php +0 -0
  40. elanzalite/include.php +0 -0
  41. elanzalite/widget/about-widget.php +0 -0
  42. elanzalite/widget/recent-post.php +1 -0
  43. elanzalite/widget/section-ad.php +0 -0
  44. elanzalite/widget/section-five.php +238 -236
  45. elanzalite/widget/section-four.php +134 -133
  46. elanzalite/widget/section-news.php +1 -0
  47. elanzalite/widget/section-one.php +2 -0
  48. elanzalite/widget/section-three.php +150 -149
  49. elanzalite/widget/section-two.php +126 -125
  50. elanzalite/widget/social-widget.php +0 -0
  51. featuredlite/customizer/custom-customizer.php +0 -0
  52. featuredlite/customizer/js/customizer.js +0 -0
  53. featuredlite/images/team.jpg +0 -0
  54. featuredlite/images/testimonia.png +0 -0
  55. featuredlite/inc/shortcode.php +0 -0
  56. jot-shop/customizer/customizer.php +40 -0
  57. jot-shop/customizer/section/frontpage/banner.php +176 -0
  58. jot-shop/customizer/section/frontpage/category-slider.php +123 -0
  59. jot-shop/customizer/section/frontpage/category-tab.php +104 -0
  60. jot-shop/customizer/section/frontpage/higlight.php +73 -0
  61. jot-shop/customizer/section/frontpage/product-list.php +98 -0
  62. jot-shop/customizer/section/frontpage/product-slide.php +113 -0
  63. jot-shop/customizer/section/frontpage/ribbon.php +178 -0
  64. jot-shop/customizer/section/frontpage/top-slider.php +456 -0
  65. jot-shop/demo/import.php +111 -0
  66. jot-shop/include.php +5 -0
  67. jot-shop/jot-shop-admin/jot-shop-shortcode.php +30 -0
  68. jot-shop/jot-shop-admin/woo/jot-shop-admin.php +472 -0
  69. jot-shop/jot-shop-admin/woo/woo-ajax.php +17 -0
  70. jot-shop/jot-shop-front-page/front-banner.php +11 -0
  71. jot-shop/jot-shop-front-page/front-categoryslider.php +157 -0
  72. jot-shop/jot-shop-front-page/front-highlight.php +16 -0
  73. jot-shop/jot-shop-front-page/front-productlist.php +24 -0
  74. jot-shop/jot-shop-front-page/front-productslider.php +25 -0
  75. jot-shop/jot-shop-front-page/front-ribbon.php +38 -0
  76. jot-shop/jot-shop-front-page/front-tabproduct.php +35 -0
  77. jot-shop/jot-shop-front-page/front-topslider.php +118 -0
  78. m-shop/customizer/customizer.php +23 -0
  79. m-shop/customizer/section/frontpage/banner.php +176 -0
  80. m-shop/customizer/section/frontpage/blog.php +59 -0
  81. m-shop/customizer/section/frontpage/category-slider.php +123 -0
  82. m-shop/customizer/section/frontpage/category-tab.php +104 -0
  83. m-shop/customizer/section/frontpage/higlight.php +73 -0
  84. m-shop/customizer/section/frontpage/product-list.php +98 -0
  85. m-shop/customizer/section/frontpage/product-slide.php +111 -0
  86. m-shop/customizer/section/frontpage/ribbon.php +201 -0
  87. m-shop/customizer/section/frontpage/tab-productimage.php +120 -0
  88. m-shop/customizer/section/frontpage/testimonial.php +43 -0
  89. m-shop/customizer/section/frontpage/top-slider.php +114 -0
  90. m-shop/demo/import.php +94 -0
  91. m-shop/include.php +5 -0
  92. m-shop/m-shop-admin/m-shop-shortcode.php +35 -0
  93. m-shop/m-shop-admin/woo/m-shop-admin.php +777 -0
  94. m-shop/m-shop-admin/woo/woo-ajax.php +18 -0
  95. m-shop/m-shop-front-page/front-banner.php +13 -0
  96. m-shop/m-shop-front-page/front-blog.php +54 -0
  97. m-shop/m-shop-front-page/front-categoryslider.php +162 -0
  98. m-shop/m-shop-front-page/front-highlight.php +18 -0
  99. m-shop/m-shop-front-page/front-productlist.php +27 -0
  100. m-shop/m-shop-front-page/front-productslider.php +26 -0
  101. m-shop/m-shop-front-page/front-ribbon.php +41 -0
  102. m-shop/m-shop-front-page/front-tabproduct.php +34 -0
  103. m-shop/m-shop-front-page/front-tabproductimage.php +45 -0
  104. m-shop/m-shop-front-page/front-testimonial.php +21 -0
  105. m-shop/m-shop-front-page/front-topslider.php +33 -0
  106. notify/assets/css/notice.css +42 -0
  107. notify/assets/images/m-shop.png +0 -0
  108. notify/notify-html.php +44 -0
  109. notify/notify.php +75 -0
  110. oneline-lite/customizer/custom-customizer.php +0 -0
  111. oneline-lite/customizer/customizer.php +0 -0
  112. oneline-lite/customizer/customizer_styles.css +0 -0
  113. oneline-lite/customizer/js/customizer.js +0 -0
  114. oneline-lite/customizer/js/widget.js +0 -0
  115. oneline-lite/demo/import-data.php +9 -1
  116. oneline-lite/images/slider.jpeg +0 -0
  117. oneline-lite/images/team.jpg +0 -0
  118. oneline-lite/images/testimonia.png +0 -0
  119. oneline-lite/inc/constant.php +0 -0
  120. oneline-lite/inc/custom-style.php +0 -0
  121. oneline-lite/inc/install.php +0 -0
  122. oneline-lite/inc/shortcode.php +1 -1
  123. oneline-lite/widget/services.php +0 -0
  124. oneline-lite/widget/team.php +0 -0
  125. oneline-lite/widget/testimonial.php +0 -0
  126. readme.txt +360 -256
  127. shopline/customizer/custom-customizer.php +0 -0
  128. shopline/customizer/customizer.php +11 -11
  129. shopline/customizer/customizer_styles.css +1 -1
  130. shopline/customizer/images/th-logo.png +0 -0
  131. shopline/customizer/js/customizer.js +0 -0
  132. shopline/customizer/js/pe-customize-controls.js +0 -0
  133. shopline/customizer/js/widget.js +0 -0
  134. shopline/customizer/pe-customize-controls.css +0 -0
  135. shopline/demo/import-shopline-data.php +4 -4
  136. shopline/inc/constant.php +0 -0
  137. shopline/inc/custom-style.php +3 -3
  138. shopline/inc/image-crop.php +0 -0
  139. shopline/inc/service.php +0 -0
  140. shopline/inc/shortcode.php +0 -0
  141. shopline/inc/testimonial.php +0 -0
  142. shopline/include.php +0 -0
  143. shopline/woo/ajax-woocommerce.php +193 -192
  144. shopline/woo/filter-woocommerce.php +0 -0
  145. shopline/woo/hooks-function.php +0 -0
  146. shopline/woo/hooks.php +0 -0
  147. shopline/woo/woo-inc.php +0 -0
  148. shopline/woo/woocommerce.php +751 -745
  149. themehunk-customizer.php +20 -2
  150. themehunk/custom-customizer.php +0 -0
  151. themehunk/customizer-font-selector/class/class-oneline-font-selector.php +0 -0
  152. themehunk/customizer-font-selector/css/select.css +0 -0
  153. themehunk/customizer-font-selector/css/typography.css +0 -0
  154. themehunk/customizer-font-selector/functions.php +0 -0
  155. themehunk/customizer-font-selector/js/select.js +0 -0
  156. themehunk/customizer-font-selector/js/typography.js +0 -0
  157. themehunk/customizer-radio-image/class/class-themehunk-customize-control-radio-image.php +0 -0
  158. themehunk/customizer-radio-image/img/download.png +0 -0
  159. themehunk/customizer-radio-image/img/gradient-1.png +0 -0
  160. themehunk/customizer-radio-image/img/gradient-2.png +0 -0
  161. themehunk/customizer-radio-image/img/gradient-3.png +0 -0
  162. themehunk/customizer-radio-image/img/gradientovly-1.png +0 -0
  163. themehunk/customizer-radio-image/img/gradientovly-2.png +0 -0
  164. themehunk/customizer-radio-image/img/gradientovly-3.png +0 -0
  165. themehunk/customizer-radio-image/img/gradientovly-4.png +0 -0
  166. themehunk/customizer-radio-image/img/gradientovly-5.png +0 -0
  167. themehunk/customizer-radio-image/img/gradientovly-6.png +0 -0
  168. themehunk/customizer-radio-image/img/svg1.jpg +0 -0
  169. themehunk/customizer-radio-image/img/svg2.jpg +0 -0
  170. themehunk/customizer-range-value/class/class-oneline-customizer-range-value-control.php +0 -0
  171. themehunk/customizer-range-value/css/customizer-range-value-control.css +0 -0
  172. themehunk/customizer-range-value/js/customizer-range-value-control.js +0 -0
  173. themehunk/customizer-scroll/class/class-themehunk-customize-control-scroll.php +0 -0
  174. themehunk/customizer-scroll/js/customizer-addon-script.js +0 -0
  175. themehunk/customizer-scroll/js/script.js +0 -0
  176. themehunk/customizer-tabs/class/class-themehunk-customize-control-tabs.php +0 -0
  177. themehunk/customizer-tabs/css/style.css +0 -0
  178. themehunk/customizer-tabs/js/customizer-addon-script.js +1 -1
  179. themehunk/customizer-tabs/js/script.js +0 -0
  180. themehunk/images/lrg.png +0 -0
  181. themehunk/images/sml.png +0 -0
  182. themehunk/js/customizer.js +0 -0
  183. themehunk/js/widget.js +0 -0
big-store/big-store-admin/big-store-shortcode.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+ function big_store_shortcode_template($section_name=''){
4
+ switch ($section_name){
5
+ case 'big_store_show_frontpage':
6
+ $section = array(
7
+ 'front-topslider',
8
+ 'front-tabproduct',
9
+ 'front-categoryslider',
10
+ 'front-tabproductimage',
11
+ 'front-ribbon',
12
+ 'front-productslider',
13
+ 'front-banner',
14
+ 'front-productlist',
15
+ 'front-highlight',
16
+ );
17
+ foreach($section as $value):
18
+ require_once (THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/big-store-front-page/'.$value.'.php');
19
+ endforeach;
20
+ break;
21
+ }
22
+ }
23
+ function big_store_shortcodeid_data($atts){
24
+ $output = '';
25
+ $pull_quote_atts = shortcode_atts(array(
26
+ 'section' => ''
27
+ ), $atts);
28
+ $section_name = wp_kses_post($pull_quote_atts['section']);
29
+ $output = big_store_shortcode_template($section_name);
30
+ return $output;
31
+ }
32
+ add_shortcode('big-store', 'big_store_shortcodeid_data');
big-store/big-store-admin/woo/big-store-admin.php ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'WooCommerce' ) ){
3
+ return;
4
+ }
5
+
6
+ if(!function_exists('big_store_product_query')){
7
+ function big_store_product_query($term_id,$prdct_optn){
8
+ $limit_product = get_theme_mod('big_store_prd_shw_no','20');
9
+ // product filter
10
+ $args = array('limit' => $limit_product, 'visibility' => 'catalog');
11
+ if($term_id){
12
+ $term_args = array('hide_empty' => 1,'slug' => $term_id);
13
+ $product_categories = get_terms( 'product_cat', $term_args);
14
+ //$product_cat_slug = $product_categories[0]->slug;
15
+ $product_cat_slug = isset($product_categories[0]->slug)? $product_categories[0]->slug:0;
16
+ $args['category'] = $product_cat_slug;
17
+ }
18
+ if($prdct_optn=='random'){
19
+ $args['orderby'] = 'rand';
20
+ }elseif($prdct_optn=='featured'){
21
+ $args['featured'] = true;
22
+ }
23
+ if(get_option('woocommerce_hide_out_of_stock_items')=='yes'){
24
+ $args['stock_status'] = 'instock';
25
+ }
26
+ return $args;
27
+ }
28
+ }
29
+
30
+
31
+ function big_store_product_slide_list_loop($term_id,$prdct_optn){
32
+ $args = big_store_product_query($term_id,$prdct_optn);
33
+ $products = wc_get_products( $args );
34
+ if (!empty($products)) {
35
+ foreach ($products as $product) {
36
+ $pid = $product->get_id();
37
+ ?>
38
+ <div <?php post_class('product'); ?>>
39
+ <div class="thunk-list">
40
+ <div class="thunk-product-image">
41
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
42
+ <?php echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' ); ?>
43
+ </a>
44
+ </div>
45
+ <div class="thunk-product-content">
46
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-title woocommerce-loop-product__link"><?php echo $product->get_title(); ?></a>
47
+ <?php
48
+ $rat_product = wc_get_product($pid);
49
+ $rating_count = $rat_product->get_rating_count();
50
+ $average = $rat_product->get_average_rating();
51
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
52
+ ?>
53
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <?php };
58
+ } else {
59
+ echo __( 'No products found','big-store' );
60
+ }
61
+ wp_reset_query();
62
+ }
63
+
64
+ /**********************************************
65
+ //Funtion Category list show
66
+ **********************************************/
67
+ if(!function_exists('big_store_category_tab_list')){
68
+ function big_store_category_tab_list( $term_id ){
69
+ if( taxonomy_exists( 'product_cat' ) && !empty($term_id)){
70
+ // category filter
71
+ $args = array(
72
+ 'orderby' => 'menu_order',
73
+ 'order' => 'ASC',
74
+ 'hide_empty' => 1,
75
+ 'slug' => $term_id
76
+ );
77
+ $product_categories = get_terms( 'product_cat', $args );
78
+ $count = count($product_categories);
79
+ $cat_list = $cate_product = '';
80
+ $cat_list_drop = '';
81
+ $i=1;
82
+ $dl=0;
83
+ ?>
84
+ <?php
85
+ //Detect special conditions devices
86
+ $iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
87
+ $iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
88
+ $iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
89
+ $Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
90
+ $webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
91
+
92
+ //do something with this information
93
+ if( $iPod || $iPhone ){
94
+ $device_cat = '1';
95
+ //browser reported as an iPhone/iPod touch -- do something here
96
+ }else if($iPad){
97
+ $device_cat = '3';
98
+ //browser reported as an iPad -- do something here
99
+ }else if($Android){
100
+ $device_cat = '2';
101
+ //browser reported as an Android device -- do something here
102
+ }else if($webOS){
103
+ $device_cat = '4';
104
+ //browser reported as a webOS device -- do something here
105
+ }else{
106
+ $device_cat = '5';
107
+ }
108
+ if ( $count > 0 ){
109
+ foreach ( $product_categories as $product_category ){
110
+ //global $product;
111
+ $category_product = array();
112
+ $current_class = '';
113
+ $cat_list .='
114
+ <li>
115
+ <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).'">
116
+ '.esc_html($product_category->name).'</a>
117
+ </li>';
118
+ if ($i++ == $device_cat) break;
119
+ }
120
+ if($count > $device_cat){
121
+ foreach ( $product_categories as $product_category ){
122
+ //global $product;
123
+ $dl++;
124
+ if($dl <= $device_cat) continue;
125
+ $category_product = array();
126
+ $current_class = '';
127
+ $cat_list_drop .='
128
+ <li>
129
+ <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).'">
130
+ '.esc_html($product_category->name).'</a>
131
+ </li>';
132
+ }
133
+ }
134
+ $return = '<div class="tab-head" catlist="'.esc_attr($i).'" >
135
+ <div class="tab-link-wrap">
136
+ <ul class="tab-link">';
137
+ $return .= $cat_list;
138
+ $return .= '</ul>';
139
+ if($count > $device_cat){
140
+ $return .= '<div class="header__cat__item dropdown"><a href="#" class="more-cat" title="More categories...">•••</a><ul class="dropdown-link">';
141
+ $return .= $cat_list_drop;
142
+ $return .= '</ul></div>';
143
+ }
144
+ $return .= '</div></div>';
145
+
146
+ echo $return;
147
+ }
148
+ }
149
+ }
150
+ }
151
+ /********************************/
152
+ //product cat filter loop
153
+ /********************************/
154
+ if(!function_exists('big_store_product_cat_filter_default_loop')){
155
+ function big_store_product_cat_filter_default_loop($term_id,$prdct_optn){
156
+ $args = big_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'); ?>>
163
+ <div class="thunk-product-wrap">
164
+ <div class="thunk-product">
165
+ <div class="thunk-product-image">
166
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
167
+ <?php $sale = get_post_meta( $pid, '_sale_price', true);
168
+ if( $sale) {
169
+ // Get product prices
170
+ $regular_price = (float) $product->get_regular_price(); // Regular price
171
+ $sale_price = (float) $product->get_price(); // Sale price
172
+ $saving_price = wc_price( $regular_price - $sale_price );
173
+ echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
174
+ }?>
175
+ <?php
176
+ echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' );
177
+ $hover_style = get_theme_mod( 'big_store_woo_product_animation' );
178
+ // the_post_thumbnail();
179
+ if ( 'swap' === $hover_style ){
180
+ $attachment_ids = $product->get_gallery_image_ids($pid);
181
+ if(!empty($attachment_ids)){
182
+
183
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
184
+ echo $category_product['glr'] = $glr;
185
+
186
+ }
187
+
188
+ }
189
+ if ( 'slide' === $hover_style ){
190
+ $attachment_ids = $product->get_gallery_image_ids($pid);
191
+ if(!empty($attachment_ids)){
192
+
193
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
194
+ echo $category_product['glr'] = $glr;
195
+
196
+ }
197
+
198
+ }
199
+ ?>
200
+ </a>
201
+
202
+ </div>
203
+ <div class="thunk-product-content">
204
+ <?php
205
+ $rat_product = wc_get_product($pid);
206
+ $rating_count = $rat_product->get_rating_count();
207
+ $average = $rat_product->get_average_rating();
208
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
209
+ ?>
210
+ <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></h2>
211
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
212
+ </div>
213
+ <div class="thunk-product-hover">
214
+ <?php
215
+ echo big_store_add_to_cart_url($product);
216
+ if( class_exists( 'YITH_WCWL' ) && (! class_exists( 'WPCleverWoosw' ))){
217
+ echo big_store_whish_list($pid);
218
+ }
219
+ if( ( class_exists( 'WPCleverWoosw' ))){
220
+ echo do_shortcode('[woosw id='.$pid.']');
221
+ }
222
+ if(get_theme_mod( 'big_store_woo_quickview_enable', true )){
223
+ ?>
224
+ <div class="thunk-quickview">
225
+ <span class="quik-view">
226
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
227
+ <span><?php _e('Quick View','big-store');?></span>
228
+ </a>
229
+ </span>
230
+ </div>
231
+ <?php }
232
+ if( ( class_exists( 'YITH_Woocompare' )) && (! class_exists( 'WPCleverWooscp' ))){
233
+ echo big_store_add_to_compare_fltr($pid);
234
+ }
235
+ if( ( class_exists( 'WPCleverWooscp' ))){
236
+ echo do_shortcode('[wooscp id='.$pid.']');
237
+ }
238
+ ?>
239
+
240
+ </div>
241
+ </div>
242
+ </div>
243
+ </div>
244
+ <?php }
245
+ } else {
246
+ echo __( 'No products found','big-store' );
247
+ }
248
+ wp_reset_query();
249
+ }
250
+ }
251
+
252
+
253
+ if(!function_exists('big_store_product_filter_loop')){
254
+ function big_store_product_filter_loop($args){
255
+ $products = wc_get_products( $args );
256
+ if (!empty($products)) {
257
+ foreach ($products as $product) {
258
+ $pid = $product->get_id();
259
+ $hover_style = get_theme_mod( 'big_store_woo_product_animation' );
260
+ if('swap' === $hover_style){
261
+
262
+ $attachment_ids = $product->get_gallery_image_ids();
263
+ if(count($attachment_ids) > '0'){
264
+ $swapclasses='big-store-swap-item-hover';
265
+ }
266
+ }elseif('slide' === $hover_style){
267
+
268
+ $attachment_ids = $product->get_gallery_image_ids();
269
+ if(count($attachment_ids) > '0'){
270
+ $swapclasses='big-store-slide-item-hover';
271
+ }
272
+ } else{
273
+ $swapclasses='';
274
+ }
275
+ ?>
276
+ <div <?php post_class( $swapclasses, $pid ); ?>>
277
+ <div class="thunk-product-wrap">
278
+ <div class="thunk-product">
279
+ <div class="thunk-product-image">
280
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
281
+ <?php $sale = get_post_meta( $pid, '_sale_price', true);
282
+ if( $sale) {
283
+ // Get product prices
284
+ $regular_price = (float) $product->get_regular_price(); // Regular price
285
+ $sale_price = (float) $product->get_price(); // Sale price
286
+ $saving_price = wc_price( $regular_price - $sale_price );
287
+ echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
288
+ }?>
289
+ <?php
290
+ echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' );
291
+ $hover_style = get_theme_mod( 'big_store_woo_product_animation' );
292
+ // the_post_thumbnail();
293
+ if ( 'swap' === $hover_style ){
294
+ $attachment_ids = $product->get_gallery_image_ids($pid);
295
+ if(!empty($attachment_ids)){
296
+
297
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
298
+ echo $category_product['glr'] = $glr;
299
+
300
+ }
301
+
302
+ }
303
+ if ( 'slide' === $hover_style ){
304
+ $attachment_ids = $product->get_gallery_image_ids($pid);
305
+ if(!empty($attachment_ids)){
306
+
307
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
308
+ echo $category_product['glr'] = $glr;
309
+
310
+ }
311
+
312
+ }
313
+ ?>
314
+ </a>
315
+
316
+ </div>
317
+ <div class="thunk-product-content">
318
+ <?php
319
+ $rat_product = wc_get_product($pid);
320
+ $rating_count = $rat_product->get_rating_count();
321
+ $average = $rat_product->get_average_rating();
322
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
323
+ ?>
324
+ <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></h2>
325
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
326
+ </div>
327
+ <div class="thunk-product-hover">
328
+ <?php
329
+ echo big_store_add_to_cart_url($product);
330
+ if( class_exists( 'YITH_WCWL' ) && (! class_exists( 'WPCleverWoosw' ))){
331
+ echo big_store_whish_list($pid);
332
+ }
333
+ if( ( class_exists( 'WPCleverWoosw' ))){
334
+ echo do_shortcode('[woosw id='.$pid.']');
335
+ }
336
+ if(get_theme_mod( 'big_store_woo_quickview_enable', true )){
337
+ ?>
338
+ <div class="thunk-quickview">
339
+ <span class="quik-view">
340
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
341
+ <span><?php _e('Quick View','big-store');?></span>
342
+ </a>
343
+ </span>
344
+ </div>
345
+ <?php }
346
+ if( ( class_exists( 'YITH_Woocompare' )) && (! class_exists( 'WPCleverWooscp' ))){
347
+ echo big_store_add_to_compare_fltr($pid);
348
+ }
349
+ if( ( class_exists( 'WPCleverWooscp' ))){
350
+ echo do_shortcode('[wooscp id='.$pid.']');
351
+ }
352
+ ?>
353
+
354
+ </div>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ <?php }
359
+ } else {
360
+ echo __( 'No products found','big-store' );
361
+ }
362
+ wp_reset_postdata();
363
+ }
364
+ }
365
+ /*********************/
366
+ // Product for list view
367
+ /********************/
368
+ if(!function_exists('big_store_product_list_filter_loop')){
369
+ function big_store_product_list_filter_loop($args){
370
+ $products = wc_get_products( $args );
371
+ if (!empty($products)) {
372
+ foreach ($products as $product) {
373
+ $pid = $product->get_id();
374
+ ?>
375
+ <div <?php post_class(); ?>>
376
+ <div class="thunk-list">
377
+ <div class="thunk-product-image">
378
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
379
+ <?php echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' ); ?>
380
+ </a>
381
+ </div>
382
+ <div class="thunk-product-content">
383
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-title woocommerce-loop-product__link"><?php echo $product->get_title(); ?></a>
384
+ <?php
385
+ $rat_product = wc_get_product($pid);
386
+ $rating_count = $rat_product->get_rating_count();
387
+ $average = $rat_product->get_average_rating();
388
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
389
+ ?>
390
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
391
+ </div>
392
+ </div>
393
+ </div>
394
+ <?php }
395
+ } else {
396
+ echo __( 'No products found','big-store' );
397
+ }
398
+ wp_reset_postdata();
399
+ }
400
+ }
401
+
402
+
403
+ if ( ! function_exists( 'big_store_product_list_categories_slider' ) ) {
404
+ function big_store_product_list_categories_slider( $args = '' ){
405
+ $term = get_theme_mod('big_store_include_category_slider','0');
406
+ if(!empty($term['0'])){
407
+ $include_id = $term;
408
+ }else{
409
+ $include_id = '';
410
+ }
411
+ $defaults = array(
412
+ 'child_of' => 0,
413
+ 'current_category' => 0,
414
+ 'depth' => 2,
415
+ 'echo' => 0,
416
+ 'exclude' => '',
417
+ 'exclude_tree' => '',
418
+ 'include' => $include_id,
419
+ 'feed' => '',
420
+ 'feed_image' => '',
421
+ 'feed_type' => '',
422
+ 'hide_empty' => 1,
423
+ 'hide_title_if_empty' => false,
424
+ 'hierarchical' => true,
425
+ 'order' => 'ASC',
426
+ 'orderby' => 'menu_order',
427
+ 'separator' => '<br />',
428
+ 'show_count' => 0,
429
+ 'show_option_all' => '',
430
+ 'show_option_none' => __( 'No categories','big-store' ),
431
+ 'style' => 'list',
432
+ 'taxonomy' => 'product_cat',
433
+ 'title_li' => '',
434
+ 'use_desc_for_title' => 0,
435
+ 'walker' => new Big_Store_List_Category_Images
436
+ );
437
+ $html = wp_list_categories($defaults);
438
+ echo '<ul class="thunk-product-cat-list slider" data-menu-style="vertical">'.$html.'</ul>';
439
+ }
440
+ }
441
+
442
+ // cLASS To fetch cat image
443
+ class Big_Store_List_Category_Images extends Walker_Category {
444
+ function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
445
+ $saved_data = get_term_meta( $category->term_id, 'thumbnail_id', true );
446
+ $image = wp_get_attachment_url( $saved_data);
447
+ $cat_name = apply_filters(
448
+ 'list_cats',
449
+ esc_attr( $category->name ),
450
+ $category
451
+ );
452
+ $link='';
453
+
454
+ $link.= '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
455
+ if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
456
+ $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
457
+ }
458
+
459
+ $link .= '>';
460
+ if(!empty($image)){
461
+ $link .='<img src="' . $image . '">';
462
+ }
463
+ $link .= $cat_name . '</a>';
464
+
465
+
466
+ if ( ! empty( $args['show_count'] ) ) {
467
+ $link .= ' (' . number_format_i18n( $category->count ) . ')';
468
+ }
469
+ if ( 'list' == $args['style'] ) {
470
+ $output .= "\t<li";
471
+ $class = 'cat-item cat-item-' . $category->term_id;
472
+ if ( ! empty( $args['current_category'] ) ) {
473
+ $_current_category = get_term( $args['current_category'], $category->taxonomy );
474
+ if ( $category->term_id == $args['current_category'] ) {
475
+ $class .= ' current-cat';
476
+ } elseif ( $category->term_id == $_current_category->parent ) {
477
+ $class .= ' current-cat-parent';
478
+ }
479
+ }
480
+ $output .= ' class="' . $class . '"';
481
+ $output .= ">$link\n";
482
+ } else {
483
+ $output .= "\t$link<br />\n";
484
+ }
485
+ }
486
+ }
big-store/big-store-admin/woo/woo-ajax.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!function_exists('big_store_cat_filter_ajax')){
3
+ /***************************/
4
+ //category product section product ajax filter
5
+ /***************************/
6
+
7
+ add_action('wp_ajax_big_store_cat_filter_ajax', 'big_store_cat_filter_ajax');
8
+ add_action('wp_ajax_nopriv_big_store_cat_filter_ajax', 'big_store_cat_filter_ajax');
9
+ function big_store_cat_filter_ajax(){
10
+ if(isset($_POST['data_cat_slug'])){
11
+ $prdct_optn = get_theme_mod('big_store_category_optn','recent');
12
+ $args = big_store_product_query(sanitize_key($_POST['data_cat_slug']),$prdct_optn);
13
+ big_store_product_filter_loop($args);
14
+ }
15
+ exit;
16
+ }
17
+ }
big-store/big-store-front-page/front-banner.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_banner_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-banner-section">
7
+ <div class="container">
8
+ <?php big_store_display_customizer_shortcut( 'big_store_banner' );?>
9
+ <div class="content-wrap">
10
+ <?php big_store_front_banner(); ?>
11
+ </div>
12
+ </div>
13
+ </section>
big-store/big-store-front-page/front-categoryslider.php ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_category_slide_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+
7
+ <section class="thunk-category-slide-section">
8
+ <div class="container">
9
+
10
+ <?php big_store_display_customizer_shortcut( 'big_store_cat_slide_section' );?>
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('big_store_cat_slider_heading','Woo Category'));?></span>
15
+ </h4>
16
+ </div>
17
+ </div>
18
+ <div class="content-wrap">
19
+ <?php if(get_theme_mod('big_store_cat_slide_layout','cat-layout-1')=='cat-layout-1'):?>
20
+ <div class="thunk-slide thunk-cat-slide owl-carousel">
21
+ <?php
22
+ if( taxonomy_exists( 'product_cat' ) ){
23
+ $term_id = get_theme_mod('big_store_category_slide_list');
24
+ // category filter
25
+ $args = array(
26
+
27
+ 'orderby' => 'menu_order',
28
+ 'order' => 'ASC',
29
+ 'hide_empty' => 1,
30
+ 'slug' => $term_id
31
+ );
32
+
33
+ $product_categories = get_terms( 'product_cat', $args );
34
+
35
+ $count = count($product_categories);
36
+
37
+ $category_list = $cate_product = '';
38
+ if ( $count > 0 ){
39
+ foreach ( $product_categories as $product_category ){
40
+ //global $product;
41
+ $category_product = array();
42
+ $term_link = get_term_link( $product_category, 'product_cat' );
43
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
44
+ $image = wp_get_attachment_url( $thumbnail_id );
45
+
46
+ $current_class = '';
47
+
48
+ $category_list .='<div class="thunk-category">';
49
+ if(!empty($image)){
50
+ $category_list .='<div class="thunk-cat-box">
51
+ <a href="'.$term_link.'">';
52
+ $category_list .=' <img src="' . $image . '" alt="" />';
53
+ $category_list .='</a>
54
+ </div>';
55
+ }
56
+ $category_list .='<div class="thunk-cat-text">
57
+ <div class="thunk-cat-title">
58
+ <a href="'.$term_link.'"><span class="title">'.$product_category->name. '</span></a>
59
+ </div>
60
+
61
+ </div>
62
+
63
+ </div>';
64
+ }
65
+ echo $category_list;
66
+ }
67
+ }
68
+
69
+ ?>
70
+ </div>
71
+ <?php elseif(get_theme_mod('big_store_cat_slide_layout')=='cat-layout-2'):?>
72
+ <div class="cat-wrap cat-layout-2">
73
+ <div class="cat-content">
74
+ <?php
75
+ if( taxonomy_exists( 'product_cat' ) ){
76
+ $term_id = get_theme_mod('big_store_category_slide_list');
77
+ // category filter
78
+ $args = array(
79
+
80
+ 'orderby' => 'title',
81
+ 'order' => 'ASC',
82
+ 'hide_empty' => 1,
83
+ 'slug' => $term_id
84
+ );
85
+
86
+ $product_categories = get_terms( 'product_cat', $args );
87
+
88
+ $count = count($product_categories);
89
+
90
+ $category_list = $cate_product = '';
91
+ if ( $count > 0 ){
92
+ foreach ( $product_categories as $product_category ){
93
+ //global $product;
94
+ $category_product = array();
95
+ $term_link = get_term_link( $product_category, 'product_cat' );
96
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
97
+ $image = wp_get_attachment_url( $thumbnail_id );
98
+ $current_class = '';
99
+ $category_list .='<div class="cat-list">
100
+ <a href="'.esc_url($term_link).'">
101
+ <img src="'.esc_url($image).'">
102
+ <span>'.esc_html($product_category->name).'</span>
103
+ </a>
104
+ </div>';
105
+ }
106
+ echo $category_list;
107
+ }
108
+ }
109
+ ?>
110
+ </div>
111
+ </div>
112
+ <?php elseif(get_theme_mod('big_store_cat_slide_layout')=='cat-layout-3'):?>
113
+ <div class="cat-wrap cat-layout-3">
114
+ <div class="cat-content-3">
115
+
116
+
117
+
118
+ <?php
119
+ if( taxonomy_exists( 'product_cat' ) ){
120
+ $term_id = get_theme_mod('big_store_category_slide_list');
121
+ // category filter
122
+ $args = array(
123
+
124
+ 'orderby' => 'title',
125
+ 'order' => 'ASC',
126
+ 'hide_empty' => 1,
127
+ 'slug' => $term_id
128
+ );
129
+
130
+ $product_categories = get_terms( 'product_cat', $args );
131
+
132
+ $count = count($product_categories);
133
+
134
+ $category_list = $cate_product = '';
135
+ if ( $count > 0 ){
136
+ foreach ( $product_categories as $product_category ){
137
+ //global $product;
138
+ $category_product = array();
139
+ $term_link = get_term_link( $product_category, 'product_cat' );
140
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
141
+ $image = wp_get_attachment_url( $thumbnail_id );
142
+ $current_class = '';
143
+ $category_list .='<div class="cat-col">
144
+ <div class="cat-col-wrap">
145
+ <img src="'.esc_url($image).'">
146
+ <div class="hover-area">
147
+ <span class="cat-title">'.esc_html($product_category->name).'</span>
148
+ <div class="prd-total-number"><span class="item">'.$product_category->count.esc_html('Product','big-store').'</span></div>
149
+ </div>
150
+ <a href="'.esc_url($term_link).'"> </a>
151
+ </div></div>';
152
+ }
153
+ echo $category_list;
154
+ }
155
+ }
156
+ ?>
157
+ </div>
158
+ </div>
159
+ <?php endif;?>
160
+ </div>
161
+ </div>
162
+ </section>
big-store/big-store-front-page/front-highlight.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_highlight_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-highlight-section">
7
+ <div class="container">
8
+ <?php big_store_display_customizer_shortcut( 'big_store_highlight' );?>
9
+ <div class="content-wrap">
10
+ <div class="thunk-highlight-feature-wrap">
11
+ <?php
12
+ $default = Big_Store_Defaults_Models::instance()->get_feature_default();
13
+ big_store_highlight_content('big_store_highlight_content', $default);
14
+ ?>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </section>
big-store/big-store-front-page/front-productlist.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_product_list_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-list-section">
7
+ <div class="container">
8
+ <?php big_store_display_customizer_shortcut( 'big_store_product_slide_list' );?>
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('big_store_product_list_heading','Product List Carousel'));?></span>
13
+ </h4>
14
+ </div>
15
+ </div>
16
+ <div class="content-wrap">
17
+ <div class="thunk-slide thunk-product-list owl-carousel">
18
+ <?php
19
+ $term_id = get_theme_mod('big_store_product_list_cat');
20
+ $prdct_optn = get_theme_mod('big_store_product_list_optn','recent');
21
+ big_store_product_slide_list_loop($term_id,$prdct_optn);
22
+ ?>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </section>
big-store/big-store-front-page/front-productslider.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_product_slide_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+
7
+ <section class="thunk-product-slide-section">
8
+ <div class="container">
9
+ <?php big_store_display_customizer_shortcut( 'big_store_product_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('big_store_product_slider_heading','Product Carousel'));?></span>
14
+ </h4>
15
+ </div>
16
+ </div>
17
+ <div class="content-wrap">
18
+ <div class="thunk-slide thunk-product-slide owl-carousel">
19
+ <?php
20
+ $term_id = get_theme_mod('big_store_product_slider_cat');
21
+ $prdct_optn = get_theme_mod('big_store_product_slide_optn','recent');
22
+ big_store_product_cat_filter_default_loop($term_id,$prdct_optn);
23
+ ?>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </section>
big-store/big-store-front-page/front-ribbon.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_ribbon_sec',false) == true){
3
+ return;
4
+ }
5
+ if(get_theme_mod('big_store_ribbon_background','image')=='image'){
6
+ ?>
7
+ <section class="thunk-ribbon-section bg-image">
8
+
9
+ <?php big_store_display_customizer_shortcut( 'big_store_ribbon' );?>
10
+ <div class="content-wrap">
11
+ <div class="thunk-ribbon-content">
12
+ <div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('big_store_ribbon_text','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.')); ?></h3></div>
13
+ <?php if(get_theme_mod('big_store_ribbon_btn_text','Call To Action')!==''):?>
14
+ <div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('big_store_ribbon_btn_link','#'));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('big_store_ribbon_btn_text','Call To Action'));?></a></div>
15
+ <?php endif; ?>
16
+ </div>
17
+ </div>
18
+
19
+ </section>
20
+ <?php }elseif(get_theme_mod('big_store_ribbon_background')=='video'){?>
21
+ <section class="thunk-ribbon-section">
22
+ <video autoplay="autoplay" loop playsinline id="bgvid" muted poster="<?php echo get_theme_mod( 'big_store_ribbon_video_poster_image'); ?>">
23
+ <source src="<?php echo get_theme_mod( 'big_store_ribbon_bg_video'); ?>" type="video/mp4" />
24
+ </video>
25
+
26
+ <?php big_store_display_customizer_shortcut( 'big_store_ribbon' );?>
27
+ <div class="content-wrap">
28
+ <div class="container">
29
+ <div class="thunk-ribbon-content">
30
+ <div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('big_store_ribbon_text','')); ?></h3></div>
31
+ <?php if(get_theme_mod('big_store_ribbon_btn_text','')!==''):?>
32
+ <div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('big_store_ribbon_btn_link',''));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('big_store_ribbon_btn_text',''));?></a></div>
33
+ <?php endif; ?>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </section>
38
+ <?php }?>
big-store/big-store-front-page/front-tabproduct.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_cat_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-tab-section">
7
+ <div class="container">
8
+ <?php big_store_display_customizer_shortcut( 'big_store_category_tab_section' );?>
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('big_store_cat_tab_heading','Tabbed Product Carousel'));?></span>
15
+ </h4>
16
+ </div>
17
+ <!-- tab head start -->
18
+ <?php $term_id = get_theme_mod('big_store_category_tab_list');
19
+ big_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('big_store_category_tab_list');
28
+ $prdct_optn = get_theme_mod('big_store_category_optn','recent');
29
+ big_store_product_cat_filter_default_loop($term_id,$prdct_optn);
30
+ ?>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </section>
big-store/big-store-front-page/front-tabproductimage.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_product_img_sec',false) == true){
3
+ return;
4
+ }
5
+ if (get_theme_mod('big_store_product_img_sec_adimg','') != '') {
6
+ $banner_img = 'image-enable';
7
+ }
8
+ else{
9
+ $banner_img = 'image-disable';
10
+ }
11
+ ?>
12
+
13
+ <section class="thunk-product-image-tab-section">
14
+ <div class="container">
15
+ <?php big_store_display_customizer_shortcut( 'big_store_product_tab_image' );?>
16
+ <!-- thunk head start -->
17
+ <div id="thunk-cat-tab" class="thunk-cat-tab">
18
+ <div class="thunk-heading-wrap">
19
+ <div class="thunk-heading">
20
+ <h4 class="thunk-title">
21
+ <span class="title"><?php echo esc_html(get_theme_mod('big_store_product_img_sec_heading','Product Tab Image Carousel'));?></span>
22
+ </h4>
23
+ </div>
24
+ <!-- tab head start -->
25
+ <?php $term_id = get_theme_mod('big_store_product_img_sec_cat_list');
26
+ big_store_category_tab_list($term_id);
27
+ ?>
28
+ </div>
29
+ <!-- tab head end -->
30
+ <div class="content-wrap <?php echo esc_attr(get_theme_mod('big_store_product_img_sec_side')); ?>">
31
+ <?php if (get_theme_mod('big_store_product_img_sec_adimg','') != '') { ?>
32
+ <div class="tab-image">
33
+ <img src="<?php echo esc_url(get_theme_mod('big_store_product_img_sec_adimg','')); ?>">
34
+ </div>
35
+ <?php } ?>
36
+ <div class="tab-content <?php echo esc_attr($banner_img); ?>">
37
+ <div class="thunk-slide thunk-product-image-cat-slide owl-carousel">
38
+ <?php
39
+ $term_id = get_theme_mod('big_store_product_img_sec_cat_list');
40
+ $prdct_optn = get_theme_mod('big_store_product_img_sec_optn','recent');
41
+ big_store_product_cat_filter_default_loop($term_id,$prdct_optn);
42
+ ?>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </section>
big-store/big-store-front-page/front-topslider.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('big_store_disable_top_slider_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-slider-section <?php echo esc_attr(get_theme_mod('big_store_top_slide_layout','slide-layout-1'));?>">
7
+
8
+ <?php
9
+ big_store_display_customizer_shortcut( 'big_store_top_slider_section' );
10
+ if(get_theme_mod('big_store_top_slide_layout','slide-layout-3')=='slide-layout-3'):
11
+ ?>
12
+ <div class="container">
13
+ <div class="thunk-slider-content-wrap">
14
+ <div class="thunk-slider-content-bar">
15
+ <div class="thunk-slider-col thunk-slider-col-1">
16
+ <div class="slider-cat-title">
17
+ <a href="#"><?php echo esc_html(get_theme_mod('big_store_lay3_heading_txt','Market'));?></a>
18
+ </div>
19
+ <?php big_store_product_list_categories_slider(); ?>
20
+
21
+ </div>
22
+ <div class="thunk-slider-col thunk-slider-col-2"><div class="thunk-3col-slider-wrap">
23
+ <div class="thunk-slider-content">
24
+ <div class="thunk-top2-slide owl-carousel">
25
+ <?php big_store_top_slider_2_content('big_store_top_slide_content', ''); ?>
26
+ </div>
27
+ </div>
28
+ <div class="thunk-add-content">
29
+ <div class="thunk-3-add-content">
30
+ <div class="thunk-row">
31
+ <a href="<?php echo esc_url(get_theme_mod('big_store_lay3_url'));?>"><img src="<?php echo esc_url(get_theme_mod('big_store_lay3_adimg'));?>"></a>
32
+ </div>
33
+ <div class="thunk-row">
34
+ <a href="<?php echo esc_url(get_theme_mod('big_store_lay3_2url'));?>"><img src="<?php echo esc_url(get_theme_mod('big_store_lay3_adimg2'));?>"></a>
35
+ </div>
36
+ <div class="thunk-row"><a href="<?php echo esc_url(get_theme_mod('big_store_lay3_3url'));?>"><img src="<?php echo esc_url(get_theme_mod('big_store_lay3_adimg3'));?>"></a>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <?php elseif(get_theme_mod('big_store_top_slide_layout','slide-layout-4')=='slide-layout-4'):?>
47
+ <div class="thunk-slider-content-wrap">
48
+ <div class="container">
49
+ <div class="thunk-slider-content-bar">
50
+ <div class="thunk-slider-multi-slide owl-carousel">
51
+ <?php big_store_top_slider_multi_content('big_store_top_slide_content', ''); ?>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <?php elseif(get_theme_mod('big_store_top_slide_layout','slide-layout-2')=='slide-layout-2'):?>
57
+ <div class="thunk-slider-content-wrap">
58
+ <div class="container">
59
+ <div class="thunk-slider-content-bar">
60
+ <div class="thunk-3col-slider-wrap">
61
+ <div class="slider-content-1">
62
+ <div class="thunk-content-2">
63
+ <div class="thunk-row">
64
+ <a href="<?php echo esc_url(get_theme_mod('big_store_lay2_url'));?>"><img src="<?php echo esc_url(get_theme_mod('big_store_lay2_adimg'));?>"></a>
65
+ </div>
66
+ <div class="thunk-row"><a href="<?php echo esc_url(get_theme_mod('big_store_lay2_url2'));?>"><img src="<?php echo esc_url(get_theme_mod('big_store_lay2_adimg2'));?>"></a></div>
67
+ </div>
68
+ </div>
69
+ <div class="slider-content-2">
70
+ <div class="thunk-content-1">
71
+ <div class="thunk-top2-slide owl-carousel">
72
+ <?php big_store_top_slider_2_content('big_store_top_slide_content', ''); ?>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ <div class="slider-content-3">
77
+ <div class="thunk-content-1">
78
+ <a href="<?php echo esc_url(get_theme_mod('big_store_lay2_url3'));?>"><img src="<?php echo esc_url(get_theme_mod('big_store_lay2_adimg3'));?>"></a>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ <?php elseif(get_theme_mod('big_store_top_slide_layout','slide-layout-1')=='slide-layout-1'):?>
86
+ <div class="thunk-slider-content-wrap">
87
+
88
+ <div class="thunk-slider-content-bar">
89
+ <div class="thunk-slider-full-slide owl-carousel">
90
+ <?php big_store_top_slider_2_content('big_store_top_slide_content', ''); ?>
91
+ </div>
92
+ </div>
93
+
94
+ </div>
95
+ <?php endif; ?>
96
+
97
+ </section>
big-store/customizer/customizer.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * all customizer setting includeed
4
+ *
5
+ * @param
6
+ * @return mixed|string
7
+ */
8
+ function big_store_plugin_customize_register( $wp_customize ){
9
+ //Front Page
10
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/top-slider.php';
11
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/category-tab.php';
12
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/product-slide.php';
13
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/category-slider.php';
14
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/product-list.php';
15
+
16
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/ribbon.php';
17
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/banner.php';
18
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/higlight.php';
19
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'big-store/customizer/section/frontpage/tab-productimage.php';
20
+
21
+ // product shown in front Page
22
+ $wp_customize->add_setting('big_store_prd_shw_no', array(
23
+ 'default' =>'20',
24
+ 'capability' => 'edit_theme_options',
25
+ 'sanitize_callback' =>'big_store_sanitize_number',
26
+ )
27
+ );
28
+ $wp_customize->add_control('big_store_prd_shw_no', array(
29
+ 'type' => 'number',
30
+ 'section' => 'big-store-woo-shop',
31
+ 'label' => __( 'No. of product to show in Front Page', 'big-store' ),
32
+ 'input_attrs' => array(
33
+ 'min' => 10,
34
+ 'step' => 1,
35
+ 'max' => 1000,
36
+ ),
37
+ )
38
+ );
39
+
40
+ }
41
+ add_action('customize_register','big_store_plugin_customize_register');
big-store/customizer/section/frontpage/banner.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_banner_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_banner_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_banner',
10
+ 'settings' => 'big_store_disable_banner_sec',
11
+ ) ) );
12
+ // choose col layout
13
+ if(class_exists('Big_Store_WP_Customize_Control_Radio_Image')){
14
+ $wp_customize->add_setting(
15
+ 'big_store_banner_layout', array(
16
+ 'default' => 'bnr-two',
17
+ 'sanitize_callback' => 'big_store_sanitize_radio',
18
+ )
19
+ );
20
+ $wp_customize->add_control(
21
+ new Big_Store_WP_Customize_Control_Radio_Image(
22
+ $wp_customize, 'big_store_banner_layout', array(
23
+ 'label' => esc_html__( 'Layout', 'big-store' ),
24
+ 'section' => 'big_store_banner',
25
+ 'choices' => array(
26
+ 'bnr-one' => array(
27
+ 'url' => BIG_STORE_BANNER_IMG_LAYOUT_1,
28
+ ),
29
+ 'bnr-two' => array(
30
+ 'url' => BIG_STORE_BANNER_IMG_LAYOUT_2,
31
+ ),
32
+ 'bnr-three' => array(
33
+ 'url' => BIG_STORE_BANNER_IMG_LAYOUT_3,
34
+ ),
35
+ 'bnr-four' => array(
36
+ 'url' => BIG_STORE_BANNER_IMG_LAYOUT_4,
37
+ ),
38
+ 'bnr-five' => array(
39
+ 'url' => BIG_STORE_BANNER_IMG_LAYOUT_5,
40
+ ),
41
+ 'bnr-six' => array(
42
+ 'url' => BIG_STORE_BANNER_IMG_LAYOUT_5,
43
+ ),
44
+
45
+ ),
46
+ )
47
+ )
48
+ );
49
+ }
50
+ // first image
51
+ $wp_customize->add_setting('big_store_bnr_1_img', array(
52
+ 'default' => '',
53
+ 'capability' => 'edit_theme_options',
54
+ 'sanitize_callback' => 'big_store_sanitize_upload',
55
+ ));
56
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_bnr_1_img', array(
57
+ 'label' => __('Image 1', 'big-store'),
58
+ 'section' => 'big_store_banner',
59
+ 'settings' => 'big_store_bnr_1_img',
60
+ )));
61
+
62
+ // first url
63
+ $wp_customize->add_setting('big_store_bnr_1_url', array(
64
+ 'default' =>'',
65
+ 'capability' => 'edit_theme_options',
66
+ 'sanitize_callback' => 'big_store_sanitize_text',
67
+ ));
68
+ $wp_customize->add_control( 'big_store_bnr_1_url', array(
69
+ 'label' => __('url', 'big-store'),
70
+ 'section' => 'big_store_banner',
71
+ 'type' => 'text',
72
+ ));
73
+ // second image
74
+ $wp_customize->add_setting('big_store_bnr_2_img', array(
75
+ 'default' => '',
76
+ 'capability' => 'edit_theme_options',
77
+ 'sanitize_callback' => 'big_store_sanitize_upload',
78
+ ));
79
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_bnr_2_img', array(
80
+ 'label' => __('Image 2', 'big-store'),
81
+ 'section' => 'big_store_banner',
82
+ 'settings' => 'big_store_bnr_2_img',
83
+ )));
84
+
85
+ // second url
86
+ $wp_customize->add_setting('big_store_bnr_2_url', array(
87
+ 'default' =>'',
88
+ 'capability' => 'edit_theme_options',
89
+ 'sanitize_callback' => 'big_store_sanitize_text',
90
+ ));
91
+ $wp_customize->add_control( 'big_store_bnr_2_url', array(
92
+ 'label' => __('url', 'big-store'),
93
+ 'section' => 'big_store_banner',
94
+ 'type' => 'text',
95
+ ));
96
+
97
+ // third image
98
+ $wp_customize->add_setting('big_store_bnr_3_img', array(
99
+ 'default' => '',
100
+ 'capability' => 'edit_theme_options',
101
+ 'sanitize_callback' => 'big_store_sanitize_upload',
102
+ ));
103
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_bnr_3_img', array(
104
+ 'label' => __('Image 3', 'big-store'),
105
+ 'section' => 'big_store_banner',
106
+ 'settings' => 'big_store_bnr_3_img',
107
+ )));
108
+
109
+ // third url
110
+ $wp_customize->add_setting('big_store_bnr_3_url', array(
111
+ 'default' =>'',
112
+ 'capability' => 'edit_theme_options',
113
+ 'sanitize_callback' => 'big_store_sanitize_text',
114
+ ));
115
+ $wp_customize->add_control( 'big_store_bnr_3_url', array(
116
+ 'label' => __('url', 'big-store'),
117
+ 'section' => 'big_store_banner',
118
+ 'type' => 'text',
119
+ ));
120
+
121
+
122
+ // fourth image
123
+ $wp_customize->add_setting('big_store_bnr_4_img', array(
124
+ 'default' => '',
125
+ 'capability' => 'edit_theme_options',
126
+ 'sanitize_callback' => 'big_store_sanitize_upload',
127
+ ));
128
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_bnr_4_img', array(
129
+ 'label' => __('Image 4', 'big-store'),
130
+ 'section' => 'big_store_banner',
131
+ 'settings' => 'big_store_bnr_4_img',
132
+ )));
133
+ $wp_customize->add_setting('big_store_bnr_4_url', array(
134
+ 'default' =>'',
135
+ 'capability' => 'edit_theme_options',
136
+ 'sanitize_callback' => 'big_store_sanitize_text',
137
+ ));
138
+ $wp_customize->add_control( 'big_store_bnr_4_url', array(
139
+ 'label' => __('url', 'big-store'),
140
+ 'section' => 'big_store_banner',
141
+ 'type' => 'text',
142
+ ));
143
+
144
+ // fifth image
145
+ $wp_customize->add_setting('big_store_bnr_5_img', array(
146
+ 'default' => '',
147
+ 'capability' => 'edit_theme_options',
148
+ 'sanitize_callback' => 'big_store_sanitize_upload',
149
+ ));
150
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_bnr_5_img', array(
151
+ 'label' => __('Image 5', 'big-store'),
152
+ 'section' => 'big_store_banner',
153
+ 'settings' => 'big_store_bnr_5_img',
154
+ )));
155
+ $wp_customize->add_setting('big_store_bnr_5_url', array(
156
+ 'default' =>'',
157
+ 'capability' => 'edit_theme_options',
158
+ 'sanitize_callback' => 'big_store_sanitize_text',
159
+ ));
160
+ $wp_customize->add_control( 'big_store_bnr_5_url', array(
161
+ 'label' => __('url', 'big-store'),
162
+ 'section' => 'big_store_banner',
163
+ 'type' => 'text',
164
+ ));
165
+
166
+ $wp_customize->add_setting('big_store_bnr_doc', array(
167
+ 'sanitize_callback' => 'big_store_sanitize_text',
168
+ ));
169
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_bnr_doc',
170
+ array(
171
+ 'section' => 'big_store_banner',
172
+ 'type' => 'doc-link',
173
+ 'url' => 'https://themehunk.com/docs/big-store/#banner-section',
174
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
175
+ 'priority' =>100,
176
+ )));
big-store/customizer/section/frontpage/category-slider.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_category_slide_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_category_slide_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_cat_slide_section',
10
+ 'settings' => 'big_store_disable_category_slide_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ $wp_customize->add_setting('big_store_cat_slider_heading', array(
15
+ 'default' => __('Woo Category','big-store'),
16
+ 'capability' => 'edit_theme_options',
17
+ 'sanitize_callback' => 'big_store_sanitize_text',
18
+ 'transport' => 'postMessage',
19
+ ));
20
+ $wp_customize->add_control( 'big_store_cat_slider_heading', array(
21
+ 'label' => __('Section Heading', 'big-store'),
22
+ 'section' => 'big_store_cat_slide_section',
23
+ 'type' => 'text',
24
+ ));
25
+ /*****************/
26
+ // category layout
27
+ /*****************/
28
+ if(class_exists('Big_Store_WP_Customize_Control_Radio_Image')){
29
+ $wp_customize->add_setting(
30
+ 'big_store_cat_slide_layout', array(
31
+ 'default' => 'cat-layout-1',
32
+ 'sanitize_callback' => 'big_store_sanitize_radio',
33
+ )
34
+ );
35
+ $wp_customize->add_control(
36
+ new Big_Store_WP_Customize_Control_Radio_Image(
37
+ $wp_customize, 'big_store_cat_slide_layout', array(
38
+ 'label' => esc_html__( 'Category Layout', 'big-store' ),
39
+ 'section' => 'big_store_cat_slide_section',
40
+ 'choices' => array(
41
+ 'cat-layout-1' => array(
42
+ 'url' => BIG_STORE_CAT_SLIDER_LAYOUT_1,
43
+ ),
44
+ 'cat-layout-2' => array(
45
+ 'url' => BIG_STORE_CAT_SLIDER_LAYOUT_2,
46
+ ),
47
+ 'cat-layout-3' => array(
48
+ 'url' => BIG_STORE_CAT_SLIDER_LAYOUT_3,
49
+ ),
50
+
51
+ ),
52
+ )
53
+ )
54
+ );
55
+ }
56
+ //= Choose All Category =
57
+ if (class_exists( 'Big_Store_Customize_Control_Checkbox_Multiple')) {
58
+ $wp_customize->add_setting('big_store_category_slide_list', array(
59
+ 'default' => '',
60
+ 'sanitize_callback' => 'big_store_checkbox_explode'
61
+ ));
62
+ $wp_customize->add_control(new Big_Store_Customize_Control_Checkbox_Multiple(
63
+ $wp_customize,'big_store_category_slide_list', array(
64
+ 'settings'=> 'big_store_category_slide_list',
65
+ 'label' => __( 'Choose Categories To Show', 'big-store' ),
66
+ 'section' => 'big_store_cat_slide_section',
67
+ 'choices' => big_store_get_category_list(array('taxonomy' =>'product_cat'),true),
68
+ )
69
+ ));
70
+
71
+ }
72
+ $wp_customize->add_setting('big_store_cat_item_no', array(
73
+ 'default' =>10,
74
+ 'capability' => 'edit_theme_options',
75
+ 'sanitize_callback' =>'big_store_sanitize_number',
76
+ )
77
+ );
78
+ $wp_customize->add_control('big_store_cat_item_no', array(
79
+ 'type' => 'number',
80
+ 'section' => 'big_store_cat_slide_section',
81
+ 'label' => __( 'No. of Column to show', 'big-store' ),
82
+ 'input_attrs' => array(
83
+ 'min' => 4,
84
+ 'step' => 1,
85
+ 'max' => 10,
86
+ ),
87
+ )
88
+ );
89
+ // Add an option to disable the logo.
90
+ $wp_customize->add_setting( 'big_store_category_slider_optn', array(
91
+ 'default' => false,
92
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
93
+ ) );
94
+ $wp_customize->add_control( new Big_Store_Toggle_Control( $wp_customize, 'big_store_category_slider_optn', array(
95
+ 'label' => esc_html__( 'Slide Auto Play', 'big-store' ),
96
+ 'section' => 'big_store_cat_slide_section',
97
+ 'type' => 'toggle',
98
+ 'settings' => 'big_store_category_slider_optn',
99
+ ) ) );
100
+ $wp_customize->add_setting('big_store_category_slider_speed', array(
101
+ 'default' =>'3000',
102
+ 'capability' => 'edit_theme_options',
103
+ 'sanitize_callback' => 'big_store_sanitize_number',
104
+ ));
105
+ $wp_customize->add_control( 'big_store_category_slider_speed', array(
106
+ 'label' => __('Speed', 'big-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','big-store'),
108
+ 'section' => 'big_store_cat_slide_section',
109
+ 'type' => 'number',
110
+ ));
111
+
112
+
113
+ $wp_customize->add_setting('big_store_category_slider_doc', array(
114
+ 'sanitize_callback' => 'big_store_sanitize_text',
115
+ ));
116
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_category_slider_doc',
117
+ array(
118
+ 'section' => 'big_store_cat_slide_section',
119
+ 'type' => 'doc-link',
120
+ 'url' => 'https://themehunk.com/docs/big-store/#woo-category',
121
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
122
+ 'priority' =>100,
123
+ )));
big-store/customizer/section/frontpage/category-tab.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_cat_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_cat_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_category_tab_section',
10
+ 'settings' => 'big_store_disable_cat_sec',
11
+ ) ) );
12
+ // section heading
13
+ $wp_customize->add_setting('big_store_cat_tab_heading', array(
14
+ 'default' => __('Tabbed Product Carousel','big-store'),
15
+ 'capability' => 'edit_theme_options',
16
+ 'sanitize_callback' => 'big_store_sanitize_text',
17
+ 'transport' => 'postMessage',
18
+ ));
19
+ $wp_customize->add_control( 'big_store_cat_tab_heading', array(
20
+ 'label' => __('Section Heading', 'big-store'),
21
+ 'section' => 'big_store_category_tab_section',
22
+ 'type' => 'text',
23
+ ));
24
+ //= Choose All Category =
25
+ if (class_exists( 'Big_Store_Customize_Control_Checkbox_Multiple')) {
26
+ $wp_customize->add_setting('big_store_category_tab_list', array(
27
+ 'default' => '',
28
+ 'sanitize_callback' => 'big_store_checkbox_explode'
29
+ ));
30
+ $wp_customize->add_control(new Big_Store_Customize_Control_Checkbox_Multiple(
31
+ $wp_customize,'big_store_category_tab_list', array(
32
+ 'settings'=> 'big_store_category_tab_list',
33
+ 'label' => __( 'Choose Categories To Show', 'big-store' ),
34
+ 'section' => 'big_store_category_tab_section',
35
+ 'choices' => big_store_get_category_list(array('taxonomy' =>'product_cat'),true),
36
+ )
37
+ ));
38
+
39
+ }
40
+
41
+ $wp_customize->add_setting('big_store_category_optn', array(
42
+ 'default' => 'recent',
43
+ 'capability' => 'edit_theme_options',
44
+ 'sanitize_callback' => 'big_store_sanitize_select',
45
+ ));
46
+ $wp_customize->add_control( 'big_store_category_optn', array(
47
+ 'settings' => 'big_store_category_optn',
48
+ 'label' => __('Choose Option','big-store'),
49
+ 'section' => 'big_store_category_tab_section',
50
+ 'type' => 'select',
51
+ 'choices' => array(
52
+ 'recent' => __('Recent','big-store'),
53
+ 'featured' => __('Featured','big-store'),
54
+ 'random' => __('Random','big-store'),
55
+
56
+ ),
57
+ ));
58
+
59
+ $wp_customize->add_setting( 'big_store_single_row_slide_cat', array(
60
+ 'default' => false,
61
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
62
+ ) );
63
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_single_row_slide_cat', array(
64
+ 'label' => esc_html__('Enable Single Row Slide', 'big-store'),
65
+ 'type' => 'checkbox',
66
+ 'section' => 'big_store_category_tab_section',
67
+ 'settings' => 'big_store_single_row_slide_cat',
68
+ ) ) );
69
+
70
+
71
+ // Add an option to disable the logo.
72
+ $wp_customize->add_setting( 'big_store_cat_slider_optn', array(
73
+ 'default' => false,
74
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
75
+ ) );
76
+ $wp_customize->add_control( new Big_Store_Toggle_Control( $wp_customize, 'big_store_cat_slider_optn', array(
77
+ 'label' => esc_html__( 'Slide Auto Play', 'big-store' ),
78
+ 'section' => 'big_store_category_tab_section',
79
+ 'type' => 'toggle',
80
+ 'settings' => 'big_store_cat_slider_optn',
81
+ ) ) );
82
+ $wp_customize->add_setting('big_store_cat_slider_speed', array(
83
+ 'default' =>'3000',
84
+ 'capability' => 'edit_theme_options',
85
+ 'sanitize_callback' => 'big_store_sanitize_number',
86
+ ));
87
+ $wp_customize->add_control( 'big_store_cat_slider_speed', array(
88
+ 'label' => __('Speed', 'big-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','big-store'),
90
+ 'section' => 'big_store_category_tab_section',
91
+ 'type' => 'number',
92
+ ));
93
+
94
+ $wp_customize->add_setting('big_store_cat_tab_slider_doc', array(
95
+ 'sanitize_callback' => 'big_store_sanitize_text',
96
+ ));
97
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_cat_tab_slider_doc',
98
+ array(
99
+ 'section' => 'big_store_category_tab_section',
100
+ 'type' => 'doc-link',
101
+ 'url' => 'https://themehunk.com/docs/big-store/#tabbed-product',
102
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
103
+ 'priority' =>100,
104
+ )));
big-store/customizer/section/frontpage/higlight.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_highlight_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_highlight_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_highlight',
10
+ 'settings' => 'big_store_disable_highlight_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ // $wp_customize->add_setting('big_store_hglgt_heading', array(
15
+ // 'default' => __('Highlight Feature','big-store'),
16
+ // 'capability' => 'edit_theme_options',
17
+ // 'sanitize_callback' => 'big_store_sanitize_text',
18
+ // 'transport' => 'postMessage',
19
+ // ));
20
+ // $wp_customize->add_control( 'big_store_hglgt_heading', array(
21
+ // 'label' => __('Section Heading', 'big-store'),
22
+ // 'section' => 'big_store_highlight',
23
+ // 'type' => 'text',
24
+ // ));
25
+
26
+ //Highlight Content Via Repeater
27
+ if ( class_exists( 'Big_Store_Repeater' ) ) {
28
+ $wp_customize->add_setting(
29
+ 'big_store_highlight_content', array(
30
+ 'sanitize_callback' => 'big_store_repeater_sanitize',
31
+ 'default' => Big_Store_Defaults_Models::instance()->get_feature_default(),
32
+ )
33
+ );
34
+
35
+ $wp_customize->add_control(
36
+ new Big_Store_Repeater(
37
+ $wp_customize, 'big_store_highlight_content', array(
38
+ 'label' => esc_html__( 'Highlight Content', 'big-store' ),
39
+ 'section' => 'big_store_highlight',
40
+ 'priority' => 15,
41
+ 'add_field_label' => esc_html__( 'Add new Feature', 'big-store' ),
42
+ 'item_name' => esc_html__( 'Feature', 'big-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
+ ),'Big_Store_Ship_Repeater'
58
+ )
59
+ );
60
+ }
61
+
62
+
63
+ $wp_customize->add_setting('big_store_highlight_doc', array(
64
+ 'sanitize_callback' => 'big_store_sanitize_text',
65
+ ));
66
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_highlight_doc',
67
+ array(
68
+ 'section' => 'big_store_highlight',
69
+ 'type' => 'doc-link',
70
+ 'url' => 'https://themehunk.com/docs/big-store/#highlight-section',
71
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
72
+ 'priority' =>100,
73
+ )));
big-store/customizer/section/frontpage/product-list.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_product_list_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_product_list_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_product_slide_list',
10
+ 'settings' => 'big_store_disable_product_list_sec',
11
+ ) ) );
12
+ // section heading
13
+ $wp_customize->add_setting('big_store_product_list_heading', array(
14
+ 'default' => __('Product List Carousel','big-store'),
15
+ 'capability' => 'edit_theme_options',
16
+ 'sanitize_callback' => 'big_store_sanitize_text',
17
+ 'transport' => 'postMessage',
18
+ ));
19
+ $wp_customize->add_control( 'big_store_product_list_heading', array(
20
+ 'label' => __('Section Heading', 'big-store'),
21
+ 'section' => 'big_store_product_slide_list',
22
+ 'type' => 'text',
23
+ ));
24
+ //control setting for select options
25
+ $wp_customize->add_setting('big_store_product_list_cat', array(
26
+ 'default' => 0,
27
+ 'sanitize_callback' => 'big_store_sanitize_select',
28
+ ) );
29
+ $wp_customize->add_control( 'big_store_product_list_cat', array(
30
+ 'label' => __('Select Category','big-store'),
31
+ 'section' => 'big_store_product_slide_list',
32
+ 'type' => 'select',
33
+ 'choices' => big_store_product_category_list(array('taxonomy' =>'product_cat'),true),
34
+ ) );
35
+
36
+ $wp_customize->add_setting('big_store_product_list_optn', array(
37
+ 'default' => 'recent',
38
+ 'capability' => 'edit_theme_options',
39
+ 'sanitize_callback' => 'big_store_sanitize_select',
40
+ ));
41
+ $wp_customize->add_control('big_store_product_list_optn', array(
42
+ 'settings' => 'big_store_product_list_optn',
43
+ 'label' => __('Choose Option','big-store'),
44
+ 'section' => 'big_store_product_slide_list',
45
+ 'type' => 'select',
46
+ 'choices' => array(
47
+ 'recent' => __('Recent','big-store'),
48
+ 'featured' => __('Featured','big-store'),
49
+ 'random' => __('Random','big-store'),
50
+ ),
51
+ ));
52
+
53
+ $wp_customize->add_setting( 'big_store_single_row_prdct_list', array(
54
+ 'default' => false,
55
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
56
+ ) );
57
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_single_row_prdct_list', array(
58
+ 'label' => esc_html__('Enable Single Row Slide', 'big-store'),
59
+ 'type' => 'checkbox',
60
+ 'section' => 'big_store_product_slide_list',
61
+ 'settings' => 'big_store_single_row_prdct_list',
62
+ ) ) );
63
+
64
+
65
+ // Add an option to disable the logo.
66
+ $wp_customize->add_setting( 'big_store_product_list_slide_optn', array(
67
+ 'default' => false,
68
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
69
+ ) );
70
+ $wp_customize->add_control( new Big_Store_Toggle_Control( $wp_customize, 'big_store_product_list_slide_optn', array(
71
+ 'label' => esc_html__( 'Slide Auto Play', 'big-store' ),
72
+ 'section' => 'big_store_product_slide_list',
73
+ 'type' => 'toggle',
74
+ 'settings' => 'big_store_product_list_slide_optn',
75
+ ) ) );
76
+ $wp_customize->add_setting('big_store_product_list_slide_speed', array(
77
+ 'default' =>'3000',
78
+ 'capability' => 'edit_theme_options',
79
+ 'sanitize_callback' => 'big_store_sanitize_number',
80
+ ));
81
+ $wp_customize->add_control( 'big_store_product_list_slide_speed', array(
82
+ 'label' => __('Speed', 'big-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','big-store'),
84
+ 'section' => 'big_store_product_slide_list',
85
+ 'type' => 'number',
86
+ ));
87
+
88
+ $wp_customize->add_setting('big_store_product_list_slide_doc', array(
89
+ 'sanitize_callback' => 'big_store_sanitize_text',
90
+ ));
91
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_product_list_slide_doc',
92
+ array(
93
+ 'section' => 'big_store_product_slide_list',
94
+ 'type' => 'doc-link',
95
+ 'url' => 'https://themehunk.com/docs/big-store/#product-list',
96
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
97
+ 'priority' =>100,
98
+ )));
big-store/customizer/section/frontpage/product-slide.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function big_store_product_category_list($arr='',$all=true){
3
+ $cats = array();
4
+ if($all == true){
5
+ $cats[0] = 'All Categories';
6
+ }
7
+ foreach ( get_categories($arr) as $categories => $category ){
8
+ $cats[$category->slug] = $category->name;
9
+ }
10
+ return $cats;
11
+ }
12
+ $wp_customize->add_setting( 'big_store_disable_product_slide_sec', array(
13
+ 'default' => false,
14
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
15
+ ) );
16
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_product_slide_sec', array(
17
+ 'label' => esc_html__('Disable Section', 'big-store'),
18
+ 'type' => 'checkbox',
19
+ 'section' => 'big_store_product_slide_section',
20
+ 'settings' => 'big_store_disable_product_slide_sec',
21
+ ) ) );
22
+ // section heading
23
+ $wp_customize->add_setting('big_store_product_slider_heading', array(
24
+ 'default' => __('Product Carousel','big-store'),
25
+ 'capability' => 'edit_theme_options',
26
+ 'sanitize_callback' => 'big_store_sanitize_text',
27
+ 'transport' => 'postMessage',
28
+ ));
29
+ $wp_customize->add_control( 'big_store_product_slider_heading', array(
30
+ 'label' => __('Section Heading', 'big-store'),
31
+ 'section' => 'big_store_product_slide_section',
32
+ 'type' => 'text',
33
+ ));
34
+
35
+ //control setting for select options
36
+ $wp_customize->add_setting('big_store_product_slider_cat', array(
37
+ 'default' => 0,
38
+ 'sanitize_callback' => 'big_store_sanitize_select',
39
+ ) );
40
+ $wp_customize->add_control( 'big_store_product_slider_cat', array(
41
+ 'label' => __('Select Category','big-store'),
42
+ 'section' => 'big_store_product_slide_section',
43
+ 'type' => 'select',
44
+ 'choices' => big_store_product_category_list(array('taxonomy' =>'product_cat'),true),
45
+ ) );
46
+
47
+ $wp_customize->add_setting('big_store_product_slide_optn', array(
48
+ 'default' => 'recent',
49
+ 'capability' => 'edit_theme_options',
50
+ 'sanitize_callback' => 'big_store_sanitize_select',
51
+ ));
52
+ $wp_customize->add_control( 'big_store_product_slide_optn', array(
53
+ 'settings' => 'big_store_product_slide_optn',
54
+ 'label' => __('Choose Option','big-store'),
55
+ 'section' => 'big_store_product_slide_section',
56
+ 'type' => 'select',
57
+ 'choices' => array(
58
+ 'recent' => __('Recent','big-store'),
59
+ 'featured' => __('Featured','big-store'),
60
+ 'random' => __('Random','big-store'),
61
+
62
+ ),
63
+ ));
64
+
65
+ $wp_customize->add_setting( 'big_store_single_row_prdct_slide', array(
66
+ 'default' => false,
67
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
68
+ ) );
69
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_single_row_prdct_slide', array(
70
+ 'label' => esc_html__('Enable Single Row Slide', 'big-store'),
71
+ 'type' => 'checkbox',
72
+ 'section' => 'big_store_product_slide_section',
73
+ 'settings' => 'big_store_single_row_prdct_slide',
74
+ ) ) );
75
+
76
+
77
+ // Add an option to disable the logo.
78
+ $wp_customize->add_setting( 'big_store_product_slider_optn', array(
79
+ 'default' => false,
80
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
81
+ ) );
82
+ $wp_customize->add_control( new Big_Store_Toggle_Control( $wp_customize, 'big_store_product_slider_optn', array(
83
+ 'label' => esc_html__( 'Slide Auto Play', 'big-store' ),
84
+ 'section' => 'big_store_product_slide_section',
85
+ 'type' => 'toggle',
86
+ 'settings' => 'big_store_product_slider_optn',
87
+ ) ) );
88
+ $wp_customize->add_setting('big_store_product_slider_speed', array(
89
+ 'default' =>'3000',
90
+ 'capability' => 'edit_theme_options',
91
+ 'sanitize_callback' => 'big_store_sanitize_number',
92
+ ));
93
+ $wp_customize->add_control( 'big_store_product_slider_speed', array(
94
+ 'label' => __('Speed', 'big-store'),
95
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','big-store'),
96
+ 'section' => 'big_store_product_slide_section',
97
+ 'type' => 'number',
98
+ ));
99
+
100
+
101
+ $wp_customize->add_setting('big_store_product_slider_doc', array(
102
+ 'sanitize_callback' => 'big_store_sanitize_text',
103
+ ));
104
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_product_slider_doc',
105
+ array(
106
+ 'section' => 'big_store_product_slide_section',
107
+ 'type' => 'doc-link',
108
+ 'url' => 'https://themehunk.com/docs/big-store/#product-carousel',
109
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
110
+ 'priority' =>100,
111
+ )));
big-store/customizer/section/frontpage/ribbon.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_ribbon_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_ribbon_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'priority' => 1,
10
+ 'section' => 'big_store_ribbon',
11
+ 'settings' => 'big_store_disable_ribbon_sec',
12
+ ) ) );
13
+
14
+ $wp_customize->add_setting('big_store_ribbon_background', array(
15
+ 'default' => 'image',
16
+ 'sanitize_callback' => 'big_store_sanitize_select',
17
+ ) );
18
+ $wp_customize->add_control( new Big_Store_Customizer_Buttonset_Control( $wp_customize, 'big_store_ribbon_background', array(
19
+ 'label' => esc_html__( 'Choose Ribbon Background', 'big-store' ),
20
+ 'priority' => 2,
21
+ 'section' => 'big_store_ribbon',
22
+ 'settings' => 'big_store_ribbon_background',
23
+ 'choices' => array(
24
+ 'image' => esc_html__( 'Image', 'big-store' ),
25
+ 'video' => esc_html__( 'Video', 'big-store' ),
26
+ ),
27
+ ) ) );
28
+ $wp_customize->add_setting( 'big_store_ribbon_bg_img_url', array(
29
+ 'sanitize_callback' => 'esc_url',
30
+ 'transport' => 'postMessage',
31
+ ) );
32
+ $wp_customize->add_setting( 'big_store_ribbon_bg_img_id', array(
33
+ 'sanitize_callback' => 'absint',
34
+ 'transport' => 'postMessage',
35
+ ) );
36
+
37
+ $wp_customize->add_setting( 'big_store_ribbon_bg_background_repeat', array(
38
+ 'default' => 'no-repeat',
39
+ 'sanitize_callback' => 'sanitize_text_field',
40
+ 'transport' => 'postMessage',
41
+ ) );
42
+
43
+ $wp_customize->add_setting( 'big_store_ribbon_bg_background_size', array(
44
+ 'default' => 'auto',
45
+ 'sanitize_callback' => 'sanitize_text_field',
46
+ 'transport' => 'postMessage',
47
+ ) );
48
+
49
+ $wp_customize->add_setting( 'big_store_ribbon_bg_background_attach', array(
50
+ 'default' => 'scroll',
51
+ 'sanitize_callback' => 'sanitize_text_field',
52
+ 'transport' => 'postMessage',
53
+ ) );
54
+
55
+ $wp_customize->add_setting( 'big_store_ribbon_bg_background_position', array(
56
+ 'default' => 'center center',
57
+ 'sanitize_callback' => 'sanitize_text_field',
58
+ 'transport' => 'postMessage',
59
+ ) );
60
+ // Registers example_background control
61
+ $wp_customize->add_control(
62
+ new Big_Store_Customize_Custom_Background_Control(
63
+ $wp_customize,
64
+ 'big_store_ribbon_bg_background_image',
65
+ array(
66
+ 'label' => esc_html__( 'Background Image', 'big-store' ),
67
+ 'section' => 'big_store_ribbon',
68
+ 'priority' => 2,
69
+ 'settings' => array(
70
+ 'image_url' => 'big_store_ribbon_bg_img_url',
71
+ 'image_id' => 'big_store_ribbon_bg_img_id',
72
+ 'repeat' => 'big_store_ribbon_bg_background_repeat', // Use false to hide the field
73
+ 'size' => 'big_store_ribbon_bg_background_size',
74
+ 'position' => 'big_store_ribbon_bg_background_position',
75
+ 'attach' => 'big_store_ribbon_bg_background_attach'
76
+ )
77
+ )
78
+ )
79
+ );
80
+
81
+ $wp_customize->add_setting('big_store_ribbon_bg_video', array(
82
+ 'default' => '',
83
+ 'sanitize_callback' => 'sanitize_text_field'
84
+ ));
85
+ $wp_customize->add_control( new WP_Customize_Image_Control(
86
+ $wp_customize, 'big_store_ribbon_bg_video', array(
87
+ 'label' => __('Upload Background Video', 'oneline'),
88
+ 'section' => 'big_store_ribbon',
89
+ 'settings' => 'big_store_ribbon_bg_video',
90
+ )));
91
+ $wp_customize->add_setting('big_store_ribbon_video_poster_image', array(
92
+ 'default' => '',
93
+ 'sanitize_callback' => 'sanitize_text_field'
94
+ ));
95
+ $wp_customize->add_control( new WP_Customize_Image_Control(
96
+ $wp_customize, 'big_store_ribbon_video_poster_image', array(
97
+ 'label' => __('Upload Video Poster Image', 'oneline'),
98
+ 'section' => 'big_store_ribbon',
99
+ 'settings' => 'big_store_ribbon_video_poster_image',
100
+ )));
101
+
102
+ $wp_customize->add_setting('big_store_ribbon_text', array(
103
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.',
104
+ 'capability' => 'edit_theme_options',
105
+ 'sanitize_callback' => 'big_store_sanitize_textarea',
106
+ 'transport' => 'postMessage',
107
+
108
+ ));
109
+ $wp_customize->add_control('big_store_ribbon_text', array(
110
+ 'label' => __('Text', 'big-store'),
111
+ 'section' => 'big_store_ribbon',
112
+ 'settings' => 'big_store_ribbon_text',
113
+ 'type' => 'textarea',
114
+ ));
115
+
116
+ $wp_customize->add_setting('big_store_ribbon_btn_text', array(
117
+ 'default' => 'Call To Action',
118
+ 'capability' => 'edit_theme_options',
119
+ 'sanitize_callback' => 'big_store_sanitize_text',
120
+ 'transport' => 'postMessage',
121
+
122
+ ));
123
+ $wp_customize->add_control('big_store_ribbon_btn_text', array(
124
+ 'label' => __('Button Text', 'big-store'),
125
+ 'section' => 'big_store_ribbon',
126
+ 'settings' => 'big_store_ribbon_btn_text',
127
+ 'type' => 'text',
128
+ ));
129
+
130
+ $wp_customize->add_setting('big_store_ribbon_btn_link', array(
131
+ 'default' => '#',
132
+ 'capability' => 'edit_theme_options',
133
+ 'sanitize_callback' => 'big_store_sanitize_text',
134
+
135
+ ));
136
+ $wp_customize->add_control('big_store_ribbon_btn_link', array(
137
+ 'label' => __('Button Link', 'big-store'),
138
+ 'section' => 'big_store_ribbon',
139
+ 'settings' => 'big_store_ribbon_btn_link',
140
+ 'type' => 'text',
141
+ ));
142
+
143
+
144
+ $wp_customize->add_setting('big_store_ribbon_doc', array(
145
+ 'sanitize_callback' => 'big_store_sanitize_text',
146
+ ));
147
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_ribbon_doc',
148
+ array(
149
+ 'section' => 'big_store_ribbon',
150
+ 'type' => 'doc-link',
151
+ 'url' => 'https://themehunk.com/docs/big-store/#ribbon-section',
152
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
153
+ 'priority' =>100,
154
+ )));
big-store/customizer/section/frontpage/tab-productimage.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_product_img_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_product_img_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_product_tab_image',
10
+ 'settings' => 'big_store_disable_product_img_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ $wp_customize->add_setting('big_store_product_img_sec_heading', array(
15
+ 'default' => __('Product Tab Image Carousel','big-store'),
16
+ 'capability' => 'edit_theme_options',
17
+ 'sanitize_callback' => 'big_store_sanitize_text',
18
+ 'transport' => 'postMessage',
19
+ ));
20
+ $wp_customize->add_control( 'big_store_product_img_sec_heading', array(
21
+ 'label' => __('Section Heading', 'big-store'),
22
+ 'section' => 'big_store_product_tab_image',
23
+ 'type' => 'text',
24
+ ));
25
+
26
+ //= Choose All Category =
27
+ if (class_exists( 'Big_Store_Customize_Control_Checkbox_Multiple')){
28
+ $wp_customize->add_setting('big_store_product_img_sec_cat_list', array(
29
+ 'default' => '',
30
+ 'sanitize_callback' => 'big_store_checkbox_explode'
31
+ ));
32
+ $wp_customize->add_control(new Big_Store_Customize_Control_Checkbox_Multiple(
33
+ $wp_customize,'big_store_product_img_sec_cat_list', array(
34
+ 'settings'=> 'big_store_product_img_sec_cat_list',
35
+ 'label' => __( 'Choose Categories To Show', 'big-store' ),
36
+ 'section' => 'big_store_product_tab_image',
37
+ 'choices' => big_store_get_category_list(array('taxonomy' =>'product_cat'),true),
38
+ )
39
+ ));
40
+
41
+ }
42
+
43
+ $wp_customize->add_setting('big_store_product_img_sec_optn', array(
44
+ 'default' => 'recent',
45
+ 'capability' => 'edit_theme_options',
46
+ 'sanitize_callback' => 'big_store_sanitize_select',
47
+ ));
48
+ $wp_customize->add_control( 'big_store_product_img_sec_optn', array(
49
+ 'settings' => 'big_store_product_img_sec_optn',
50
+ 'label' => __('Choose Option','open-mart'),
51
+ 'section' => 'big_store_product_tab_image',
52
+ 'type' => 'select',
53
+ 'choices' => array(
54
+ 'recent' => __('Recent','big-store'),
55
+ 'featured' => __('Featured','big-store'),
56
+ 'random' => __('Random','big-store'),
57
+
58
+ ),
59
+ ));
60
+
61
+ // Add an option to disable the logo.
62
+ $wp_customize->add_setting( 'big_store_product_img_sec_slider_optn', array(
63
+ 'default' => false,
64
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
65
+ ) );
66
+ $wp_customize->add_control( new big_store_Toggle_Control( $wp_customize, 'big_store_product_img_sec_slider_optn', array(
67
+ 'label' => esc_html__( 'Slide Auto Play', 'big-store' ),
68
+ 'section' => 'big_store_product_tab_image',
69
+ 'type' => 'toggle',
70
+ 'settings' => 'big_store_product_img_sec_slider_optn',
71
+ ) ) );
72
+
73
+ $wp_customize->add_setting('big_store_product_img_sec_adimg', array(
74
+ 'default' => '',
75
+ 'capability' => 'edit_theme_options',
76
+ 'sanitize_callback' => 'big_store_sanitize_upload',
77
+ ));
78
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_product_img_sec_adimg', array(
79
+ 'label' => __('Upload Image', 'big-store'),
80
+ 'section' => 'big_store_product_tab_image',
81
+ 'settings' => 'big_store_product_img_sec_adimg',
82
+ )));
83
+
84
+ $wp_customize->add_setting('big_store_product_img_sec_side', array(
85
+ 'default' => 'left',
86
+ 'capability' => 'edit_theme_options',
87
+ 'sanitize_callback' => 'big_store_sanitize_select',
88
+ ));
89
+ $wp_customize->add_control( 'big_store_product_img_sec_side', array(
90
+ 'settings' => 'big_store_product_img_sec_side',
91
+ 'label' => __('PLace Image On','big-store'),
92
+ 'section' => 'big_store_product_tab_image',
93
+ 'type' => 'select',
94
+ 'choices' => array(
95
+ 'left' => __('Left','big-store'),
96
+ 'right' => __('Right','big-store'),
97
+
98
+ ),
99
+ ));
100
+ $wp_customize->add_setting( 'big_store_product_img_sec_single_row_slide', array(
101
+ 'default' => true,
102
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
103
+ ) );
104
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_product_img_sec_single_row_slide', array(
105
+ 'label' => esc_html__('Enable Single Row Slide', 'big-store'),
106
+ 'type' => 'checkbox',
107
+ 'section' => 'big_store_product_tab_image',
108
+ 'settings' => 'big_store_product_img_sec_single_row_slide',
109
+ ) ) );
110
+ $wp_customize->add_setting('big_store_product_img_sec_doc', array(
111
+ 'sanitize_callback' => 'big_store_sanitize_text',
112
+ ));
113
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_product_img_sec_doc',
114
+ array(
115
+ 'section' => 'big_store_product_tab_image',
116
+ 'type' => 'doc-link',
117
+ 'url' => 'https://themehunk.com/docs/big-store/#product-tab',
118
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
119
+ 'priority' =>100,
120
+ )));
big-store/customizer/section/frontpage/top-slider.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'big_store_disable_top_slider_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_store_disable_top_slider_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'big-store'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'big_store_top_slider_section',
10
+ 'settings' => 'big_store_disable_top_slider_sec',
11
+ ) ) );
12
+
13
+ if(class_exists('Big_Store_WP_Customize_Control_Radio_Image')){
14
+ $wp_customize->add_setting(
15
+ 'big_store_top_slide_layout', array(
16
+ 'default' => 'slide-layout-1',
17
+ 'sanitize_callback' => 'big_store_sanitize_radio',
18
+ )
19
+ );
20
+ $wp_customize->add_control(
21
+ new Big_Store_WP_Customize_Control_Radio_Image(
22
+ $wp_customize, 'big_store_top_slide_layout', array(
23
+ 'label' => esc_html__( 'Slider Layout', 'big-store' ),
24
+ 'section' => 'big_store_top_slider_section',
25
+ 'choices' => array(
26
+ 'slide-layout-1' => array(
27
+ 'url' => BIG_STORE_SLIDER_LAYOUT_1,
28
+ ),
29
+ 'slide-layout-2' => array(
30
+ 'url' =>BIG_STORE_SLIDER_LAYOUT_3,
31
+ ),
32
+ 'slide-layout-3' => array(
33
+ 'url' => BIG_STORE_SLIDER_LAYOUT_2,
34
+ ),
35
+ 'slide-layout-4' => array(
36
+ 'url' => BIG_STORE_SLIDER_LAYOUT_4,
37
+ ),
38
+
39
+ ),
40
+ )
41
+ )
42
+ );
43
+ }
44
+ //Slider Content Via Repeater
45
+ if ( class_exists( 'Big_Store_Repeater' ) ){
46
+ $wp_customize->add_setting(
47
+ 'big_store_top_slide_content', array(
48
+ 'sanitize_callback' => 'big_store_repeater_sanitize',
49
+ 'default' => '',
50
+ )
51
+ );
52
+ $wp_customize->add_control(
53
+ new Big_Store_Repeater(
54
+ $wp_customize, 'big_store_top_slide_content', array(
55
+ 'label' => esc_html__( 'Slide Content', 'big-store' ),
56
+ 'section' => 'big_store_top_slider_section',
57
+ 'add_field_label' => esc_html__( 'Add new Slide', 'big-store' ),
58
+ 'item_name' => esc_html__( 'Slide', 'big-store' ),
59
+
60
+ 'customizer_repeater_title_control' => true,
61
+ 'customizer_repeater_subtitle_control' => true,
62
+ 'customizer_repeater_text_control' => true,
63
+ 'customizer_repeater_image_control' => true,
64
+ 'customizer_repeater_logo_image_control' => false,
65
+ 'customizer_repeater_link_control' => true,
66
+ 'customizer_repeater_repeater_control' => false,
67
+
68
+
69
+ ),'big_store_top_slide_content'
70
+ )
71
+ );
72
+ }
73
+
74
+ // Add an option to disable the logo.
75
+ $wp_customize->add_setting( 'big_store_top_slider_optn', array(
76
+ 'default' => false,
77
+ 'sanitize_callback' => 'big_store_sanitize_checkbox',
78
+ ) );
79
+ $wp_customize->add_control( new Big_Store_Toggle_Control( $wp_customize, 'big_store_top_slider_optn', array(
80
+ 'label' => esc_html__( 'Slide Auto Play', 'big-store' ),
81
+ 'section' => 'big_store_top_slider_section',
82
+ 'type' => 'toggle',
83
+ 'settings' => 'big_store_top_slider_optn',
84
+ ) ) );
85
+
86
+ $wp_customize->add_setting('big_store_slider_speed', array(
87
+ 'default' =>'3000',
88
+ 'capability' => 'edit_theme_options',
89
+ 'sanitize_callback' => 'big_store_sanitize_number',
90
+ ));
91
+ $wp_customize->add_control( 'big_store_slider_speed', array(
92
+ 'label' => __('Speed', 'big-store'),
93
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','big-store'),
94
+ 'section' => 'big_store_top_slider_section',
95
+ 'type' => 'number',
96
+ ));
97
+ // slider-layout-2
98
+ $wp_customize->add_setting('big_store_top_slider_2_title', array(
99
+ 'sanitize_callback' => 'big_store_sanitize_text',
100
+ ));
101
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_top_slider_2_title',
102
+ array(
103
+ 'section' => 'big_store_top_slider_section',
104
+ 'type' => 'pro-text',
105
+ 'label' => esc_html__( 'First Column', 'big-store' ),
106
+ )));
107
+ $wp_customize->add_setting('big_store_lay2_adimg', array(
108
+ 'default' => '',
109
+ 'capability' => 'edit_theme_options',
110
+ 'sanitize_callback' => 'big_store_sanitize_upload',
111
+ ));
112
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_lay2_adimg', array(
113
+ 'label' => __('Image 1', 'big-store'),
114
+ 'section' => 'big_store_top_slider_section',
115
+ 'settings' => 'big_store_lay2_adimg',
116
+ )));
117
+ $wp_customize->add_setting('big_store_lay2_url', array(
118
+ 'default' =>'',
119
+ 'capability' => 'edit_theme_options',
120
+ 'sanitize_callback' => 'big_store_sanitize_text',
121
+ ));
122
+ $wp_customize->add_control( 'big_store_lay2_url', array(
123
+ 'label' => __('url', 'big-store'),
124
+ 'section' => 'big_store_top_slider_section',
125
+ 'type' => 'text',
126
+ ));
127
+ $wp_customize->add_setting('big_store_lay2_adimg2', array(
128
+ 'default' => '',
129
+ 'capability' => 'edit_theme_options',
130
+ 'sanitize_callback' => 'big_store_sanitize_upload',
131
+ ));
132
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_lay2_adimg2', array(
133
+ 'label' => __('Image 2', 'big-store'),
134
+ 'section' => 'big_store_top_slider_section',
135
+ 'settings' => 'big_store_lay2_adimg2',
136
+ )));
137
+ $wp_customize->add_setting('big_store_lay2_url2', array(
138
+ 'default' =>'',
139
+ 'capability' => 'edit_theme_options',
140
+ 'sanitize_callback' => 'big_store_sanitize_text',
141
+ ));
142
+ $wp_customize->add_control( 'big_store_lay2_url2', array(
143
+ 'label' => __('url', 'big-store'),
144
+ 'section' => 'big_store_top_slider_section',
145
+ 'type' => 'text',
146
+ ));
147
+ // third coloum image
148
+ $wp_customize->add_setting('big_store_top_slider_2_title2', array(
149
+ 'sanitize_callback' => 'big_store_sanitize_text',
150
+ ));
151
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_top_slider_2_title2',
152
+ array(
153
+ 'section' => 'big_store_top_slider_section',
154
+ 'type' => 'pro-text',
155
+ 'label' => esc_html__( 'Third Column', 'big-store' ),
156
+ )));
157
+ $wp_customize->add_setting('big_store_lay2_adimg3', array(
158
+ 'default' => '',
159
+ 'capability' => 'edit_theme_options',
160
+ 'sanitize_callback' => 'big_store_sanitize_upload',
161
+ ));
162
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_lay2_adimg3', array(
163
+ 'label' => __('Image', 'big-store'),
164
+ 'section' => 'big_store_top_slider_section',
165
+ 'settings' => 'big_store_lay2_adimg3',
166
+ )));
167
+ $wp_customize->add_setting('big_store_lay2_url3', array(
168
+ 'default' =>'',
169
+ 'capability' => 'edit_theme_options',
170
+ 'sanitize_callback' => 'big_store_sanitize_text',
171
+ ));
172
+ $wp_customize->add_control( 'big_store_lay2_url3', array(
173
+ 'label' => __('url', 'big-store'),
174
+ 'section' => 'big_store_top_slider_section',
175
+ 'type' => 'text',
176
+ ));
177
+ // slider-layout-3
178
+ $wp_customize->add_setting('big_store_lay3_adimg', array(
179
+ 'default' => '',
180
+ 'capability' => 'edit_theme_options',
181
+ 'sanitize_callback' => 'big_store_sanitize_upload',
182
+ ));
183
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_lay3_adimg', array(
184
+ 'label' => __('Image 1', 'big-store'),
185
+ 'section' => 'big_store_top_slider_section',
186
+ 'settings' => 'big_store_lay3_adimg',
187
+ )));
188
+ $wp_customize->add_setting('big_store_lay3_url', array(
189
+ 'default' =>'',
190
+ 'capability' => 'edit_theme_options',
191
+ 'sanitize_callback' => 'big_store_sanitize_text',
192
+ ));
193
+ $wp_customize->add_control( 'big_store_lay3_url', array(
194
+ 'label' => __('url', 'big-store'),
195
+ 'section' => 'big_store_top_slider_section',
196
+ 'type' => 'text',
197
+ ));
198
+ $wp_customize->add_setting('big_store_lay3_adimg2', array(
199
+ 'default' => '',
200
+ 'capability' => 'edit_theme_options',
201
+ 'sanitize_callback' => 'big_store_sanitize_upload',
202
+ ));
203
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_lay3_adimg2', array(
204
+ 'label' => __('Image 2', 'big-store'),
205
+ 'section' => 'big_store_top_slider_section',
206
+ 'settings' => 'big_store_lay3_adimg2',
207
+ )));
208
+ $wp_customize->add_setting('big_store_lay3_2url', array(
209
+ 'default' =>'',
210
+ 'capability' => 'edit_theme_options',
211
+ 'sanitize_callback' => 'big_store_sanitize_text',
212
+ ));
213
+ $wp_customize->add_control( 'big_store_lay3_2url', array(
214
+ 'label' => __('url', 'big-store'),
215
+ 'section' => 'big_store_top_slider_section',
216
+ 'type' => 'text',
217
+ ));
218
+
219
+ $wp_customize->add_setting('big_store_lay3_adimg3', array(
220
+ 'default' => '',
221
+ 'capability' => 'edit_theme_options',
222
+ 'sanitize_callback' => 'big_store_sanitize_upload',
223
+ ));
224
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'big_store_lay3_adimg3', array(
225
+ 'label' => __('Image 3', 'big-store'),
226
+ 'section' => 'big_store_top_slider_section',
227
+ 'settings' => 'big_store_lay3_adimg3',
228
+ )));
229
+ $wp_customize->add_setting('big_store_lay3_3url', array(
230
+ 'default' =>'',
231
+ 'capability' => 'edit_theme_options',
232
+ 'sanitize_callback' => 'big_store_sanitize_text',
233
+ ));
234
+ $wp_customize->add_control( 'big_store_lay3_3url', array(
235
+ 'label' => __('url', 'big-store'),
236
+ 'section' => 'big_store_top_slider_section',
237
+ 'type' => 'text',
238
+ ));
239
+ $wp_customize->add_setting('big_store_lay3_heading_txt', array(
240
+ 'default' =>__('Market','big-store'),
241
+ 'capability' => 'edit_theme_options',
242
+ 'sanitize_callback' => 'big_store_sanitize_text',
243
+ 'transport' => 'postMessage',
244
+ ));
245
+ $wp_customize->add_control( 'big_store_lay3_heading_txt', array(
246
+ 'label' => __('category Heading', 'big-store'),
247
+ 'section' => 'big_store_top_slider_section',
248
+ 'type' => 'text',
249
+ ));
250
+ // Include category
251
+ if (class_exists( 'Big_Store_Customize_Control_Checkbox_Multiple')) {
252
+ $wp_customize->add_setting('big_store_include_category_slider', array(
253
+ 'default' => '',
254
+ 'sanitize_callback' => 'big_store_checkbox_explode'
255
+ ));
256
+ $wp_customize->add_control(new Big_Store_Customize_Control_Checkbox_Multiple(
257
+ $wp_customize,'big_store_include_category_slider', array(
258
+ 'settings'=> 'big_store_include_category_slider',
259
+ 'label' => __( 'Choose Categories To Include', 'big-store' ),
260
+ 'section' => 'big_store_top_slider_section',
261
+ 'choices' => big_store_get_category_id(array('taxonomy' =>'product_cat'),false),
262
+ )
263
+ ));
264
+
265
+ }
266
+
267
+ $wp_customize->add_setting( 'big_store_lay3_bg_background_image_url', array(
268
+ 'sanitize_callback' => 'esc_url',
269
+ 'transport' => 'postMessage',
270
+ ) );
271
+ $wp_customize->add_setting( 'big_store_lay3_bg_background_image_id', array(
272
+ 'sanitize_callback' => 'absint',
273
+ 'transport' => 'postMessage',
274
+ ) );
275
+
276
+ $wp_customize->add_setting( 'big_store_lay3_bg_background_repeat', array(
277
+ 'default' => 'no-repeat',
278
+ 'sanitize_callback' => 'sanitize_text_field',
279
+ 'transport' => 'postMessage',
280
+ ) );
281
+
282
+ $wp_customize->add_setting( 'big_store_lay3_bg_background_size', array(
283
+ 'default' => 'auto',
284
+ 'sanitize_callback' => 'sanitize_text_field',
285
+ 'transport' => 'postMessage',
286
+ ) );
287
+
288
+ $wp_customize->add_setting( 'big_store_lay3_bg_background_attach', array(
289
+ 'default' => 'scroll',
290
+ 'sanitize_callback' => 'sanitize_text_field',
291
+ 'transport' => 'postMessage',
292
+ ) );
293
+
294
+ $wp_customize->add_setting( 'big_store_lay3_bg_background_position', array(
295
+ 'default' => 'center center',
296
+ 'sanitize_callback' => 'sanitize_text_field',
297
+ 'transport' => 'postMessage',
298
+ ) );
299
+ // Registers example_background control
300
+ $wp_customize->add_control(
301
+ new Big_Store_Customize_Custom_Background_Control(
302
+ $wp_customize,
303
+ 'big_store_lay3_bg_img',
304
+ array(
305
+ 'label' => esc_html__( 'Background Image', 'big-store' ),
306
+ 'section' => 'big_store_top_slider_section',
307
+ 'settings' => array(
308
+ 'image_url' => 'big_store_lay3_bg_background_image_url',
309
+ 'image_id' => 'big_store_lay3_bg_background_image_id',
310
+ 'repeat' => 'big_store_lay3_bg_background_repeat', // Use false to hide the field
311
+ 'size' => 'big_store_lay3_bg_background_size',
312
+ 'position' => 'big_store_lay3_bg_background_position',
313
+ 'attach' => 'big_store_lay3_bg_background_attach'
314
+ )
315
+ )
316
+ )
317
+ );
318
+
319
+ $wp_customize->add_setting('big_store_lay3_bg_img_ovrly', array(
320
+ 'default' => '#eaeaea',
321
+ 'capability' => 'edit_theme_options',
322
+ 'transport' => 'postMessage',
323
+ 'sanitize_callback' => 'big_store_sanitize_color'
324
+ ));
325
+ $wp_customize->add_control(
326
+ new Big_Store_Customizer_Color_Control($wp_customize,'big_store_lay3_bg_img_ovrly', array(
327
+ 'label' => __('Slider Image Overlay Color', 'big-store' ),
328
+ 'section' => 'big_store_top_slider_section',
329
+ 'settings' => 'big_store_lay3_bg_img_ovrly',
330
+ ) ) );
331
+ $wp_customize->add_setting('big_store_top_slider_doc', array(
332
+ 'sanitize_callback' => 'big_store_sanitize_text',
333
+ ));
334
+ $wp_customize->add_control(new Big_Store_Misc_Control( $wp_customize, 'big_store_top_slider_doc',
335
+ array(
336
+ 'section' => 'big_store_top_slider_section',
337
+ 'type' => 'doc-link',
338
+ 'url' => 'https://themehunk.com/docs/big-store/#top-slider',
339
+ 'description' => esc_html__( 'To know more go with this', 'big-store' ),
340
+ 'priority' =>100,
341
+ )));
big-store/demo/import.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 big_store_import_files(){
6
+ return apply_filters(
7
+ 'big_store_demo_site', array(
8
+ array(
9
+ 'import_file_name' => esc_html__('Big Store Default','big-store'),
10
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/default/blog.xml'),
11
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/default/customizer.dat'),
12
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/default/widgets.wie'),
13
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/default/default.png'),
14
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/big-store/'),
15
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'big-store' ),
16
+ ),
17
+ array(
18
+ 'import_file_name' => esc_html__('Big Store Groceries','big-store'),
19
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/groceries/blog.xml'),
20
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/groceries/customizer.dat'),
21
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/groceries/widgets.wie'),
22
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/groceries/groceries.png'),
23
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/bigstore-groceries/'),
24
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'big-store' ),
25
+ ),
26
+ array(
27
+ 'import_file_name' => esc_html__('Big Store Electro','big-store'),
28
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/electro/blog.xml'),
29
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/electro/customizer.dat'),
30
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/electro/widgets.wie'),
31
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/big-store/electro/electro.png'),
32
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/big-store-electro/'),
33
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'big-store' ),
34
+ ),
35
+ array(
36
+ 'import_file_name' => esc_html__('Gym Store','big-store'),
37
+ 'import_file_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/big-store/gym-store/blog.xml'),
38
+ 'import_customizer_file_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/big-store/gym-store/customizer.dat'),
39
+ 'import_widget_file_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/big-store/gym-store/widgets.wie'),
40
+ 'import_preview_image_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/big-store/gym-store/gym-store.png'),
41
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/gym-store/'),
42
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'big-store' ),
43
+ ),
44
+ )
45
+ );
46
+ }
47
+ add_filter( 'pt-ocdi/import_files', 'big_store_import_files');
48
+
49
+ /**
50
+ * OCDI after import.
51
+ *
52
+ * @since 1.0.0
53
+ */
54
+ function big_store_after_import(){
55
+
56
+ // Assign front page and posts page (blog page).
57
+ $front_page_id = null;
58
+ $blog_page_id = null;
59
+
60
+ $front_page = get_page_by_title( 'home' );
61
+
62
+ if ( $front_page ) {
63
+ if ( is_array( $front_page ) ){
64
+ $first_page = array_shift( $front_page );
65
+ $front_page_id = $first_page->ID;
66
+ } else {
67
+ $front_page_id = $front_page->ID;
68
+ }
69
+ }
70
+
71
+ $blog_page = get_page_by_title( 'blog' );
72
+
73
+ if ( $blog_page ) {
74
+ if ( is_array( $blog_page ) ) {
75
+ $first_page = array_shift( $blog_page );
76
+ $blog_page_id = $first_page->ID;
77
+ } else {
78
+ $blog_page_id = $blog_page->ID;
79
+ }
80
+ }
81
+
82
+ if ( $front_page_id && $blog_page_id ) {
83
+ update_option( 'show_on_front', 'page' );
84
+ update_option( 'page_on_front', $front_page_id );
85
+ update_option( 'page_for_posts', $blog_page_id );
86
+ }
87
+
88
+ // Assign navigation menu locations.
89
+ $menu_location_details = array(
90
+ 'big-store-above-menu' => 'frontpage',
91
+ 'big-store-main-menu' => 'frontpage',
92
+ 'big-store-footer-menu' => 'footer',
93
+ );
94
+
95
+ if ( ! empty( $menu_location_details ) ){
96
+ $navigation_settings = array();
97
+ $current_navigation_menus = wp_get_nav_menus();
98
+ if ( ! empty( $current_navigation_menus ) && ! is_wp_error( $current_navigation_menus ) ) {
99
+ foreach ( $current_navigation_menus as $menu ) {
100
+ foreach ( $menu_location_details as $location => $menu_slug ) {
101
+ if ( $menu->slug === $menu_slug ) {
102
+ $navigation_settings[ $location ] = $menu->term_id;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ set_theme_mod( 'nav_menu_locations', $navigation_settings );
108
+ }
109
+ }
110
+
111
+ add_action( 'pt-ocdi/after_import', 'big_store_after_import' );
big-store/include.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ include_once( plugin_dir_path(__FILE__) . 'big-store-admin/big-store-shortcode.php' );
3
+ include_once( plugin_dir_path(__FILE__) . 'big-store-admin/woo/big-store-admin.php' );
4
+ include_once( plugin_dir_path(__FILE__) . 'big-store-admin/woo/woo-ajax.php' );
5
+ include_once( plugin_dir_path(__FILE__) . 'customizer/customizer.php' );
elanzalite/assets/css/owl.carousel.css CHANGED
File without changes
elanzalite/assets/js/jquery.flexslider.js CHANGED
File without changes
elanzalite/assets/js/owl.carousel.js CHANGED
File without changes
elanzalite/customizer/custom-customizer.php CHANGED
File without changes
elanzalite/customizer/customizer_styles.css CHANGED
File without changes
elanzalite/customizer/js/customizer.js CHANGED
File without changes
elanzalite/customizer/js/widget.js CHANGED
File without changes
elanzalite/images/style1.png CHANGED
File without changes
elanzalite/images/style2.png CHANGED
File without changes
elanzalite/images/style3.png CHANGED
File without changes
elanzalite/images/style4.png CHANGED
File without changes
elanzalite/images/style5.png CHANGED
File without changes
elanzalite/inc/constant.php CHANGED
File without changes
elanzalite/inc/install.php CHANGED
File without changes
elanzalite/inc/shortcode.php CHANGED
File without changes
elanzalite/include.php CHANGED
File without changes
elanzalite/widget/about-widget.php CHANGED
File without changes
elanzalite/widget/recent-post.php CHANGED
@@ -40,6 +40,7 @@ class THunkcustomizer_RecentPost extends WP_Widget {
40
  // post info array.
41
  $my_args = array(
42
  'post_type' => 'post',
 
43
  'meta_query' => array(
44
  array(
45
  'key' => '_thumbnail_id'
40
  // post info array.
41
  $my_args = array(
42
  'post_type' => 'post',
43
+ 'post_status' => 'publish',
44
  'meta_query' => array(
45
  array(
46
  'key' => '_thumbnail_id'
elanzalite/widget/section-ad.php CHANGED
File without changes
elanzalite/widget/section-five.php CHANGED
@@ -1,237 +1,239 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
-
4
- /*
5
- * Testimonial Widget
6
- */
7
- class themehunk_customizer_section_five extends WP_Widget {
8
-
9
- function __construct() {
10
- $widget_ops = array('classname' => 'themehunk-customizer-section-five',
11
- 'description' => 'Display post in left and right column with description');
12
- parent::__construct('themehunk-customizer-section-five', __('THunk : Post Style 5','themehunk_customizer'), $widget_ops);
13
- }
14
-
15
- function widget($args, $instance) {
16
- extract($args);
17
- // widget content
18
- echo $before_widget;
19
- $title = isset($instance['title'])?$instance['title']:__('writing your description','themehunk_customizer');
20
- $one_cate = isset($instance['one_cate']) ? absint($instance['one_cate']) : 0;
21
- $one_count = isset($instance['one_count']) ? absint($instance['one_count']) : 4;
22
- $two_cate = isset($instance['two_cate']) ? absint($instance['two_cate']) : 0;
23
- $two_count = isset($instance['two_count']) ? absint($instance['two_count']) : 4;
24
- $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
25
- $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
26
- $r_title_bg_color = isset($instance['r_title_bg_color'])? $instance['r_title_bg_color']:'#66cda9';
27
- $r_title_txt_color = isset($instance['r_title_txt_color'])? $instance['r_title_txt_color']:'#fff';
28
- $args = array(
29
- 'order' => 'DESC',
30
- 'orderby' =>'date',
31
- 'ignore_sticky_posts' => 1,
32
- 'post_type' => 'post',
33
- // 'meta_key' => '_thumbnail_id',
34
- 'posts_per_page' => $one_count,
35
- 'cat' => $one_cate
36
- );
37
- if($one_cate != true){
38
- $args['orderby'] = 'rand';
39
- }
40
- $one_posts = new WP_Query($args);
41
- ?>
42
- <section id="section_five">
43
- <div class="inner_wrap">
44
- <div class="col-one">
45
- <?php if ( $one_posts->have_posts() ) { $count=1; ?>
46
- <?php while($one_posts->have_posts()): $one_posts->the_post();
47
- ?>
48
- <?php if($count<=1){ ?>
49
-
50
- <h3 class="title" style="background:<?php echo $title_bg_color;?>">
51
- <a style="color:<?php echo $title_txt_color;?>" href="<?php echo esc_url(get_category_link( $one_cate )); ?>"><?php echo get_cat_name($one_cate); ?></a></h3>
52
- <div class="post-item">
53
-
54
- <div class="post-thumb"><a href="#"><?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
55
- the_post_thumbnail( 'section-five-large' );
56
- }
57
- ?></a></div>
58
- <div class="post-item-content">
59
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
60
- <div class="entry-meta">
61
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
62
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
63
- </div>
64
- <?php the_excerpt(); ?>
65
- </div>
66
- </div>
67
- <ul class="feat-cat_small_list">
68
- <?php } else{ ?>
69
- <li>
70
- <div class="post-item">
71
-
72
- <div class="post-thumb">
73
- <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
74
- the_post_thumbnail( 'section-five-small' );
75
- }
76
- ?></div>
77
- <div class="post-item-content">
78
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
79
- <div class="entry-meta">
80
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
81
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
82
- </div>
83
- </div>
84
-
85
- </div>
86
- </li>
87
-
88
- <?php } $count++; ?>
89
- <?php endwhile; } wp_reset_postdata(); ?>
90
- </div>
91
- <?php
92
- $targs = array(
93
- 'order' => 'DESC',
94
- 'orderby' =>'date',
95
- 'ignore_sticky_posts' => 1,
96
- 'post_type' => 'post',
97
- 'posts_per_page' => $two_count,
98
- 'cat' => $two_cate
99
- );
100
- if($two_cate != true){
101
- $targs['orderby'] = 'rand';
102
- }
103
- $two_posts = new WP_Query($targs);
104
- ?>
105
- <div class="col-two">
106
- <?php if ( $two_posts->have_posts() ) { $count=1; ?>
107
- <?php while($two_posts->have_posts()): $two_posts->the_post(); ?>
108
- <?php if($count<=1){ ?>
109
-
110
- <h3 class="title" style="background:<?php echo $r_title_bg_color;?>"><a style="color:<?php echo $r_title_txt_color;?>" href="<?php echo esc_url(get_category_link( $two_cate )); ?>"><?php echo get_cat_name($two_cate); ?></a></h3>
111
- <div class="post-item">
112
-
113
- <div class="post-thumb"><a href="#"><?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
114
- the_post_thumbnail( 'section-five-large' );
115
- }
116
- ?></a></div>
117
- <div class="post-item-content">
118
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
119
- <div class="entry-meta">
120
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
121
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
122
- </div>
123
- <?php the_excerpt(); ?>
124
- </div>
125
- </div>
126
- <ul class="feat-cat_small_list">
127
- <?php } else{ ?>
128
- <li>
129
- <div class="post-item">
130
-
131
- <div class="post-thumb"><?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
132
- the_post_thumbnail( 'section-five-small' );
133
- }
134
- ?></div>
135
- <div class="post-item-content">
136
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
137
- <div class="entry-meta">
138
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
139
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
140
- </div>
141
- </div>
142
-
143
- </div>
144
- </li>
145
-
146
- <?php } $count++; ?>
147
- <?php endwhile; } wp_reset_postdata(); ?>
148
- </div>
149
- </div>
150
- </section>
151
- <?php
152
- echo $after_widget;
153
-
154
- }
155
-
156
- function update($new_instance, $old_instance) {
157
- $instance = $old_instance;
158
- $instance["one_cate"] = absint($new_instance["one_cate"]);
159
- $instance['one_count'] = strip_tags( $new_instance['one_count'] );
160
- $instance["two_cate"] = absint($new_instance["two_cate"]);
161
- $instance['two_count'] = strip_tags( $new_instance['two_count'] );
162
- $instance["title_bg_color"] = $new_instance["title_bg_color"];
163
- $instance["title_txt_color"] = $new_instance["title_txt_color"];
164
- $instance["r_title_bg_color"] = $new_instance["r_title_bg_color"];
165
- $instance["r_title_txt_color"] = $new_instance["r_title_txt_color"];
166
- return $instance;
167
- }
168
-
169
- function form($instance) {
170
- $one_cate = isset($instance['one_cate']) ? absint($instance['one_cate']) : 0;
171
- $one_count = isset($instance['one_count']) ? absint($instance['one_count']) : 4;
172
- $two_cate = isset($instance['two_cate']) ? absint($instance['two_cate']) : 0;
173
- $two_count = isset($instance['two_count']) ? absint($instance['two_count']) : 4;
174
- $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
175
- $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
176
- $r_title_bg_color = isset($instance['r_title_bg_color']) ? $instance['r_title_bg_color'] :"#66cda9";
177
- $r_title_txt_color = isset($instance['r_title_txt_color']) ? $instance['r_title_txt_color'] :"#fff";
178
-
179
-
180
- $termarr = array('child_of' => 0);
181
- $terms = get_terms('category' ,$termarr);
182
- $oneoption = $twooption = '<option value="0">Random Post</option>';
183
-
184
- foreach($terms as $cat) {
185
- $term_id = $cat->term_id;
186
- $selected1 = ($one_cate==$term_id)?'selected':'';
187
- $selected2 = ($two_cate==$term_id)?'selected':'';
188
- $oneoption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
189
- $twooption .= '<option value="'.$term_id.'" '.$selected2.'>'.$cat->name.'</option>';
190
- }
191
-
192
-
193
- ?>
194
- <style>
195
- .thunk-widget-title{
196
- background: #d9e8e9;
197
- padding: 6px;
198
- text-align: center;
199
- border-radius: 1px;
200
- }
201
- </style>
202
- <div class="clearfix"></div>
203
- <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE5; ?>" />
204
- <p class="thunk-widget-title">Left Blog Setting</p>
205
- <p>
206
- <label for="<?php echo $this->get_field_id('one_cate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
207
- <select name="<?php echo $this->get_field_name('one_cate'); ?>" ><?php echo $oneoption; ?></select>
208
- </p>
209
- <p><label for="<?php echo $this->get_field_id('one_count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
210
- <input id="<?php echo $this->get_field_id('one_count'); ?>" name="<?php echo $this->get_field_name('one_count'); ?>" type="text" value="<?php echo $one_count; ?>" size="3" /></p>
211
- <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
212
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
213
- </p>
214
- <p>
215
- <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
216
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
217
- </p>
218
-
219
- <p class="thunk-widget-title">Right Blog Setting</p>
220
- <p>
221
- <label for="<?php echo $this->get_field_id('two_cate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
222
- <select name="<?php echo $this->get_field_name('two_cate'); ?>" ><?php echo $twooption; ?></select>
223
- </p>
224
- <p><label for="<?php echo $this->get_field_id('two_count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
225
- <input id="<?php echo $this->get_field_id('two_count'); ?>" name="<?php echo $this->get_field_name('two_count'); ?>" type="text" value="<?php echo $two_count; ?>" size="3" /></p>
226
- <p><label for="<?php echo $this->get_field_id( 'r_title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
227
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'r_title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'r_title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $r_title_bg_color ); ?>" />
228
- </p>
229
- <p>
230
- <label for="<?php echo $this->get_field_id( 'r_title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
231
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'r_title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'r_title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $r_title_txt_color); ?>" />
232
- </p>
233
-
234
- <?php
235
- }
236
- }
 
 
237
  ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ /*
5
+ * Testimonial Widget
6
+ */
7
+ class themehunk_customizer_section_five extends WP_Widget {
8
+
9
+ function __construct() {
10
+ $widget_ops = array('classname' => 'themehunk-customizer-section-five',
11
+ 'description' => 'Display post in left and right column with description');
12
+ parent::__construct('themehunk-customizer-section-five', __('THunk : Post Style 5','themehunk_customizer'), $widget_ops);
13
+ }
14
+
15
+ function widget($args, $instance) {
16
+ extract($args);
17
+ // widget content
18
+ echo $before_widget;
19
+ $title = isset($instance['title'])?$instance['title']:__('writing your description','themehunk_customizer');
20
+ $one_cate = isset($instance['one_cate']) ? absint($instance['one_cate']) : 0;
21
+ $one_count = isset($instance['one_count']) ? absint($instance['one_count']) : 4;
22
+ $two_cate = isset($instance['two_cate']) ? absint($instance['two_cate']) : 0;
23
+ $two_count = isset($instance['two_count']) ? absint($instance['two_count']) : 4;
24
+ $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
25
+ $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
26
+ $r_title_bg_color = isset($instance['r_title_bg_color'])? $instance['r_title_bg_color']:'#66cda9';
27
+ $r_title_txt_color = isset($instance['r_title_txt_color'])? $instance['r_title_txt_color']:'#fff';
28
+ $args = array(
29
+ 'order' => 'DESC',
30
+ 'orderby' =>'date',
31
+ 'ignore_sticky_posts' => 1,
32
+ 'post_type' => 'post',
33
+ 'post_status' => 'publish',
34
+ // 'meta_key' => '_thumbnail_id',
35
+ 'posts_per_page' => $one_count,
36
+ 'cat' => $one_cate
37
+ );
38
+ if($one_cate != true){
39
+ $args['orderby'] = 'rand';
40
+ }
41
+ $one_posts = new WP_Query($args);
42
+ ?>
43
+ <section id="section_five">
44
+ <div class="inner_wrap">
45
+ <div class="col-one">
46
+ <?php if ( $one_posts->have_posts() ) { $count=1; ?>
47
+ <?php while($one_posts->have_posts()): $one_posts->the_post();
48
+ ?>
49
+ <?php if($count<=1){ ?>
50
+
51
+ <h3 class="title" style="background:<?php echo $title_bg_color;?>">
52
+ <a style="color:<?php echo $title_txt_color;?>" href="<?php echo esc_url(get_category_link( $one_cate )); ?>"><?php echo get_cat_name($one_cate); ?></a></h3>
53
+ <div class="post-item">
54
+
55
+ <div class="post-thumb"><a href="#"><?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
56
+ the_post_thumbnail( 'section-five-large' );
57
+ }
58
+ ?></a></div>
59
+ <div class="post-item-content">
60
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
61
+ <div class="entry-meta">
62
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
63
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
64
+ </div>
65
+ <?php the_excerpt(); ?>
66
+ </div>
67
+ </div>
68
+ <ul class="feat-cat_small_list">
69
+ <?php } else{ ?>
70
+ <li>
71
+ <div class="post-item">
72
+
73
+ <div class="post-thumb">
74
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
75
+ the_post_thumbnail( 'section-five-small' );
76
+ }
77
+ ?></div>
78
+ <div class="post-item-content">
79
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
80
+ <div class="entry-meta">
81
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
82
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
83
+ </div>
84
+ </div>
85
+
86
+ </div>
87
+ </li>
88
+
89
+ <?php } $count++; ?>
90
+ <?php endwhile; } wp_reset_postdata(); ?>
91
+ </div>
92
+ <?php
93
+ $targs = array(
94
+ 'order' => 'DESC',
95
+ 'orderby' =>'date',
96
+ 'ignore_sticky_posts' => 1,
97
+ 'post_type' => 'post',
98
+ 'post_status' => 'publish',
99
+ 'posts_per_page' => $two_count,
100
+ 'cat' => $two_cate
101
+ );
102
+ if($two_cate != true){
103
+ $targs['orderby'] = 'rand';
104
+ }
105
+ $two_posts = new WP_Query($targs);
106
+ ?>
107
+ <div class="col-two">
108
+ <?php if ( $two_posts->have_posts() ) { $count=1; ?>
109
+ <?php while($two_posts->have_posts()): $two_posts->the_post(); ?>
110
+ <?php if($count<=1){ ?>
111
+
112
+ <h3 class="title" style="background:<?php echo $r_title_bg_color;?>"><a style="color:<?php echo $r_title_txt_color;?>" href="<?php echo esc_url(get_category_link( $two_cate )); ?>"><?php echo get_cat_name($two_cate); ?></a></h3>
113
+ <div class="post-item">
114
+
115
+ <div class="post-thumb"><a href="#"><?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
116
+ the_post_thumbnail( 'section-five-large' );
117
+ }
118
+ ?></a></div>
119
+ <div class="post-item-content">
120
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
121
+ <div class="entry-meta">
122
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
123
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
124
+ </div>
125
+ <?php the_excerpt(); ?>
126
+ </div>
127
+ </div>
128
+ <ul class="feat-cat_small_list">
129
+ <?php } else{ ?>
130
+ <li>
131
+ <div class="post-item">
132
+
133
+ <div class="post-thumb"><?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
134
+ the_post_thumbnail( 'section-five-small' );
135
+ }
136
+ ?></div>
137
+ <div class="post-item-content">
138
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
139
+ <div class="entry-meta">
140
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
141
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
142
+ </div>
143
+ </div>
144
+
145
+ </div>
146
+ </li>
147
+
148
+ <?php } $count++; ?>
149
+ <?php endwhile; } wp_reset_postdata(); ?>
150
+ </div>
151
+ </div>
152
+ </section>
153
+ <?php
154
+ echo $after_widget;
155
+
156
+ }
157
+
158
+ function update($new_instance, $old_instance) {
159
+ $instance = $old_instance;
160
+ $instance["one_cate"] = absint($new_instance["one_cate"]);
161
+ $instance['one_count'] = strip_tags( $new_instance['one_count'] );
162
+ $instance["two_cate"] = absint($new_instance["two_cate"]);
163
+ $instance['two_count'] = strip_tags( $new_instance['two_count'] );
164
+ $instance["title_bg_color"] = $new_instance["title_bg_color"];
165
+ $instance["title_txt_color"] = $new_instance["title_txt_color"];
166
+ $instance["r_title_bg_color"] = $new_instance["r_title_bg_color"];
167
+ $instance["r_title_txt_color"] = $new_instance["r_title_txt_color"];
168
+ return $instance;
169
+ }
170
+
171
+ function form($instance) {
172
+ $one_cate = isset($instance['one_cate']) ? absint($instance['one_cate']) : 0;
173
+ $one_count = isset($instance['one_count']) ? absint($instance['one_count']) : 4;
174
+ $two_cate = isset($instance['two_cate']) ? absint($instance['two_cate']) : 0;
175
+ $two_count = isset($instance['two_count']) ? absint($instance['two_count']) : 4;
176
+ $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
177
+ $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
178
+ $r_title_bg_color = isset($instance['r_title_bg_color']) ? $instance['r_title_bg_color'] :"#66cda9";
179
+ $r_title_txt_color = isset($instance['r_title_txt_color']) ? $instance['r_title_txt_color'] :"#fff";
180
+
181
+
182
+ $termarr = array('child_of' => 0);
183
+ $terms = get_terms('category' ,$termarr);
184
+ $oneoption = $twooption = '<option value="0">Random Post</option>';
185
+
186
+ foreach($terms as $cat) {
187
+ $term_id = $cat->term_id;
188
+ $selected1 = ($one_cate==$term_id)?'selected':'';
189
+ $selected2 = ($two_cate==$term_id)?'selected':'';
190
+ $oneoption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
191
+ $twooption .= '<option value="'.$term_id.'" '.$selected2.'>'.$cat->name.'</option>';
192
+ }
193
+
194
+
195
+ ?>
196
+ <style>
197
+ .thunk-widget-title{
198
+ background: #d9e8e9;
199
+ padding: 6px;
200
+ text-align: center;
201
+ border-radius: 1px;
202
+ }
203
+ </style>
204
+ <div class="clearfix"></div>
205
+ <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE5; ?>" />
206
+ <p class="thunk-widget-title">Left Blog Setting</p>
207
+ <p>
208
+ <label for="<?php echo $this->get_field_id('one_cate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
209
+ <select name="<?php echo $this->get_field_name('one_cate'); ?>" ><?php echo $oneoption; ?></select>
210
+ </p>
211
+ <p><label for="<?php echo $this->get_field_id('one_count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
212
+ <input id="<?php echo $this->get_field_id('one_count'); ?>" name="<?php echo $this->get_field_name('one_count'); ?>" type="text" value="<?php echo $one_count; ?>" size="3" /></p>
213
+ <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
214
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
215
+ </p>
216
+ <p>
217
+ <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
218
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
219
+ </p>
220
+
221
+ <p class="thunk-widget-title">Right Blog Setting</p>
222
+ <p>
223
+ <label for="<?php echo $this->get_field_id('two_cate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
224
+ <select name="<?php echo $this->get_field_name('two_cate'); ?>" ><?php echo $twooption; ?></select>
225
+ </p>
226
+ <p><label for="<?php echo $this->get_field_id('two_count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
227
+ <input id="<?php echo $this->get_field_id('two_count'); ?>" name="<?php echo $this->get_field_name('two_count'); ?>" type="text" value="<?php echo $two_count; ?>" size="3" /></p>
228
+ <p><label for="<?php echo $this->get_field_id( 'r_title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
229
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'r_title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'r_title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $r_title_bg_color ); ?>" />
230
+ </p>
231
+ <p>
232
+ <label for="<?php echo $this->get_field_id( 'r_title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
233
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'r_title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'r_title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $r_title_txt_color); ?>" />
234
+ </p>
235
+
236
+ <?php
237
+ }
238
+ }
239
  ?>
elanzalite/widget/section-four.php CHANGED
@@ -1,134 +1,135 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
-
4
- /*
5
- * Testimonial Widget
6
- */
7
- class themehunk_customizer_section_four extends WP_Widget {
8
-
9
- function __construct() {
10
- $widget_ops = array('classname' => 'themehunk-customizer-section-four',
11
- 'description' => 'Display post along with description');
12
- parent::__construct('themehunk-customizer-section-four', __('THunk : Post Style 4','themehunk_customizer'), $widget_ops);
13
- }
14
-
15
- function widget($args, $instance) {
16
- extract($args);
17
- // widget content
18
- echo $before_widget;
19
- $title = isset($instance['title'])?$instance['title']:__('Latest News','themehunk_customizer');
20
- $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
21
- $count = isset($instance['count']) ? absint($instance['count']) : 3;
22
- $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
23
- $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
24
- $args = array(
25
- 'order' => 'DESC',
26
- 'orderby' =>'date',
27
- 'ignore_sticky_posts' => 1,
28
- 'post_type' => 'post',
29
- 'posts_per_page' => $count,
30
- 'cat' => $cate
31
- );
32
- if($cate != true){
33
- $args['orderby'] = 'rand';
34
- }
35
- $latest_posts = new WP_Query($args);
36
- $catelink = get_category_link( $cate );
37
- ?>
38
- <section id="section_four">
39
- <div class="inner_wrap">
40
- <!-- one -->
41
- <div class="recent-news">
42
- <h3 class="title" style="background:<?php echo $title_bg_color;?>; color:<?php echo $title_txt_color;?>"><?php echo $title; ?></h3>
43
- <?php if($cate): ?>
44
- <h3 class="view"><a href="<?php echo esc_url($catelink); ?>"><?php _e('View All','themehunk-customizer'); ?></a></h3>
45
- <?php endif; ?> <?php if ( $latest_posts->have_posts() ) { ?>
46
-
47
- <?php while($latest_posts->have_posts()): $latest_posts->the_post();
48
- ?>
49
- <!-- one -->
50
- <div class="post-item">
51
- <div class="post-thumb">
52
- <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
53
- the_post_thumbnail( 'section-four' );
54
- }
55
- ?>
56
- </div>
57
- <div class="entry-body">
58
- <div class="post-item-content">
59
- <span class="cat-links">
60
- <?php echo THunk_customizer_Cate(); ?>
61
- </span>
62
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
63
- <div class="entry-meta">
64
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
65
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
66
- </div>
67
- <?php the_excerpt(''); ?>
68
- <div class="readmore_button">
69
- <a href="<?php echo get_permalink(); ?>" rel="nofollow"><?php _e('Continue Reading →','themehunk-cutomizer'); ?></a>
70
- </div>
71
- </div>
72
- </div>
73
- </div>
74
- <?php endwhile; ?>
75
- <?php } wp_reset_postdata(); ?>
76
- </div>
77
- </div>
78
- </section>
79
- <?php
80
- echo $after_widget;
81
-
82
- }
83
-
84
- function update($new_instance, $old_instance) {
85
- $instance = $old_instance;
86
- $instance['title'] = strip_tags( $new_instance['title'] );
87
- $instance["cate"] = absint($new_instance["cate"]);
88
- $instance['count'] = strip_tags( $new_instance['count'] );
89
- $instance["title_bg_color"] = $new_instance["title_bg_color"];
90
- $instance["title_txt_color"] = $new_instance["title_txt_color"];
91
- return $instance;
92
- }
93
-
94
- function form($instance) {
95
- $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Latest News','themehunk-customizer');
96
- $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
97
- $count = isset($instance['count']) ? absint($instance['count']) : 3;
98
- $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
99
- $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
100
-
101
- $termarr = array('child_of' => 0);
102
- $terms = get_terms('category' ,$termarr);
103
- $foption = '<option value="0">Random Post</option>';
104
- foreach($terms as $cat) {
105
- $term_id = $cat->term_id;
106
- $selected1 = ($cate==$term_id)?'selected':'';
107
- $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
108
- }
109
- ?>
110
-
111
- <div class="clearfix"></div>
112
- <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE4; ?>" />
113
- <p>
114
- <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Latest News Title','themehunk-customizer'); ?></label>
115
- <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
116
- </p>
117
- <p><label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
118
- <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>
119
- <p>
120
- <p>
121
- <label for="<?php echo $this->get_field_id('cate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
122
- <select name="<?php echo $this->get_field_name('cate'); ?>" ><?php echo $foption; ?></select>
123
- </p>
124
- <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
125
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
126
- </p>
127
- <p>
128
- <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
129
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
130
- </p>
131
- <?php
132
- }
133
- }
 
134
  ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ /*
5
+ * Testimonial Widget
6
+ */
7
+ class themehunk_customizer_section_four extends WP_Widget {
8
+
9
+ function __construct() {
10
+ $widget_ops = array('classname' => 'themehunk-customizer-section-four',
11
+ 'description' => 'Display post along with description');
12
+ parent::__construct('themehunk-customizer-section-four', __('THunk : Post Style 4','themehunk_customizer'), $widget_ops);
13
+ }
14
+
15
+ function widget($args, $instance) {
16
+ extract($args);
17
+ // widget content
18
+ echo $before_widget;
19
+ $title = isset($instance['title'])?$instance['title']:__('Latest News','themehunk_customizer');
20
+ $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
21
+ $count = isset($instance['count']) ? absint($instance['count']) : 3;
22
+ $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
23
+ $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
24
+ $args = array(
25
+ 'order' => 'DESC',
26
+ 'orderby' =>'date',
27
+ 'ignore_sticky_posts' => 1,
28
+ 'post_type' => 'post',
29
+ 'post_status' => 'publish',
30
+ 'posts_per_page' => $count,
31
+ 'cat' => $cate
32
+ );
33
+ if($cate != true){
34
+ $args['orderby'] = 'rand';
35
+ }
36
+ $latest_posts = new WP_Query($args);
37
+ $catelink = get_category_link( $cate );
38
+ ?>
39
+ <section id="section_four">
40
+ <div class="inner_wrap">
41
+ <!-- one -->
42
+ <div class="recent-news">
43
+ <h3 class="title" style="background:<?php echo $title_bg_color;?>; color:<?php echo $title_txt_color;?>"><?php echo $title; ?></h3>
44
+ <?php if($cate): ?>
45
+ <h3 class="view"><a href="<?php echo esc_url($catelink); ?>"><?php _e('View All','themehunk-customizer'); ?></a></h3>
46
+ <?php endif; ?> <?php if ( $latest_posts->have_posts() ) { ?>
47
+
48
+ <?php while($latest_posts->have_posts()): $latest_posts->the_post();
49
+ ?>
50
+ <!-- one -->
51
+ <div class="post-item">
52
+ <div class="post-thumb">
53
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
54
+ the_post_thumbnail( 'section-four' );
55
+ }
56
+ ?>
57
+ </div>
58
+ <div class="entry-body">
59
+ <div class="post-item-content">
60
+ <span class="cat-links">
61
+ <?php echo THunk_customizer_Cate(); ?>
62
+ </span>
63
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
64
+ <div class="entry-meta">
65
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
66
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
67
+ </div>
68
+ <?php the_excerpt(''); ?>
69
+ <div class="readmore_button">
70
+ <a href="<?php echo get_permalink(); ?>" rel="nofollow"><?php _e('Continue Reading →','themehunk-cutomizer'); ?></a>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <?php endwhile; ?>
76
+ <?php } wp_reset_postdata(); ?>
77
+ </div>
78
+ </div>
79
+ </section>
80
+ <?php
81
+ echo $after_widget;
82
+
83
+ }
84
+
85
+ function update($new_instance, $old_instance) {
86
+ $instance = $old_instance;
87
+ $instance['title'] = strip_tags( $new_instance['title'] );
88
+ $instance["cate"] = absint($new_instance["cate"]);
89
+ $instance['count'] = strip_tags( $new_instance['count'] );
90
+ $instance["title_bg_color"] = $new_instance["title_bg_color"];
91
+ $instance["title_txt_color"] = $new_instance["title_txt_color"];
92
+ return $instance;
93
+ }
94
+
95
+ function form($instance) {
96
+ $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Latest News','themehunk-customizer');
97
+ $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
98
+ $count = isset($instance['count']) ? absint($instance['count']) : 3;
99
+ $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
100
+ $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
101
+
102
+ $termarr = array('child_of' => 0);
103
+ $terms = get_terms('category' ,$termarr);
104
+ $foption = '<option value="0">Random Post</option>';
105
+ foreach($terms as $cat) {
106
+ $term_id = $cat->term_id;
107
+ $selected1 = ($cate==$term_id)?'selected':'';
108
+ $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
109
+ }
110
+ ?>
111
+
112
+ <div class="clearfix"></div>
113
+ <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE4; ?>" />
114
+ <p>
115
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Latest News Title','themehunk-customizer'); ?></label>
116
+ <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
117
+ </p>
118
+ <p><label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
119
+ <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>
120
+ <p>
121
+ <p>
122
+ <label for="<?php echo $this->get_field_id('cate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
123
+ <select name="<?php echo $this->get_field_name('cate'); ?>" ><?php echo $foption; ?></select>
124
+ </p>
125
+ <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
126
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
127
+ </p>
128
+ <p>
129
+ <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
130
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
131
+ </p>
132
+ <?php
133
+ }
134
+ }
135
  ?>
elanzalite/widget/section-news.php CHANGED
@@ -28,6 +28,7 @@ class themehunk_customizer_section_news extends WP_Widget {
28
  $args = array(
29
  'order' => 'DESC',
30
  'post_type' => 'post',
 
31
  'meta_key' => '_thumbnail_id',
32
  'posts_per_page' => $fcount,
33
  'cat' => $fcate
28
  $args = array(
29
  'order' => 'DESC',
30
  'post_type' => 'post',
31
+ 'post_status' => 'publish',
32
  'meta_key' => '_thumbnail_id',
33
  'posts_per_page' => $fcount,
34
  'cat' => $fcate
elanzalite/widget/section-one.php CHANGED
@@ -30,6 +30,7 @@ class themehunk_customizer_section_one extends WP_Widget {
30
  'order' => 'DESC',
31
  'ignore_sticky_posts' => 1,
32
  'post_type' => 'post',
 
33
  'meta_key' => '_thumbnail_id',
34
  'posts_per_page' => $fcount,
35
  'cat' => $fcate
@@ -72,6 +73,7 @@ $args1 = array(
72
  'order' => 'DESC',
73
  'ignore_sticky_posts' => 1,
74
  'post_type' => 'post',
 
75
  'meta_key' => '_thumbnail_id',
76
  'posts_per_page' => 4,
77
  'cat' => $ltcate
30
  'order' => 'DESC',
31
  'ignore_sticky_posts' => 1,
32
  'post_type' => 'post',
33
+ 'post_status' => 'publish',
34
  'meta_key' => '_thumbnail_id',
35
  'posts_per_page' => $fcount,
36
  'cat' => $fcate
73
  'order' => 'DESC',
74
  'ignore_sticky_posts' => 1,
75
  'post_type' => 'post',
76
+ 'post_status' => 'publish',
77
  'meta_key' => '_thumbnail_id',
78
  'posts_per_page' => 4,
79
  'cat' => $ltcate
elanzalite/widget/section-three.php CHANGED
@@ -1,150 +1,151 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
-
4
- /*
5
- * Testimonial Widget
6
- */
7
- class themehunk_customizer_section_three extends WP_Widget {
8
-
9
- function __construct() {
10
- $widget_ops = array('classname' => 'themehunk-customizer-section-three',
11
- 'description' => 'Display post in left column along with description and other post in right column');
12
- parent::__construct('themehunk-customizer-section-three', __('THunk : Post Style 3','themehunk_customizer'), $widget_ops);
13
- }
14
-
15
- function widget($args, $instance) {
16
- extract($args);
17
- // widget content
18
- echo $before_widget;
19
- $title = isset($instance['title'])?$instance['title']:__('Featured Post','themehunk_customizer');
20
- $ofcate = isset($instance['ofcate']) ? absint($instance['ofcate']) : 0;
21
- $ofcount = isset($instance['ofcount']) ? absint($instance['ofcount']) : 5;
22
- $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
23
- $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
24
-
25
-
26
- $args = array(
27
- 'order' => 'DESC',
28
- 'orderby' =>'date',
29
- 'ignore_sticky_posts' => 1,
30
- 'post_type' => 'post',
31
- // 'meta_key' => '_thumbnail_id',
32
- 'posts_per_page' => $ofcount,
33
- 'cat' => $ofcate
34
- );
35
- if($ofcate != true){
36
- $args['orderby'] = 'rand';
37
- }
38
- $of_posts = new WP_Query($args);
39
- $catelink = get_category_link( $ofcate );
40
- ?>
41
- <section id="section_three">
42
- <div class="inner_wrap">
43
- <?php if ( $of_posts->have_posts() ) { $count=1; ?>
44
-
45
- <?php while($of_posts->have_posts()): $of_posts->the_post(); ?>
46
- <?php if($count<=1){ ?>
47
- <div class="col-one">
48
- <h3 class="title" style="background:<?php echo $title_bg_color;?>; color:<?php echo $title_txt_color;?>"><?php echo $title; ?></h3>
49
- <div class="post-item">
50
- <div class="post-thumb"><a href="#">
51
- <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
52
- the_post_thumbnail( 'section-three-large' );
53
- }
54
- ?>
55
- </a></div>
56
- <div class="post-item-content">
57
- <span class="cat-links">
58
- <?php echo THunk_customizer_Cate(); ?>
59
- </span>
60
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
61
- <div class="entry-meta">
62
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
63
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
64
- </div>
65
- <?php the_excerpt(); ?>
66
- </div>
67
- </div>
68
- </div>
69
- <div class="col-two">
70
- <?php if($ofcate): ?>
71
- <h3 class="view"><a href="<?php echo esc_url($catelink); ?>"><?php _e('View All','themehunk-customizer'); ?></a></h3>
72
- <?php endif; ?>
73
- <?php } else{ ?>
74
- <div class="post-item">
75
- <div class="post-thumb">
76
- <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
77
- the_post_thumbnail( 'section-three-small' );
78
- }
79
- ?>
80
- </div>
81
- <div class="post-item-content">
82
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
83
- <div class="entry-meta">
84
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
85
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
86
- </div>
87
- </div>
88
- </div>
89
- <?php } $count++; ?>
90
- <?php endwhile; } wp_reset_postdata(); ?>
91
- </div> <!-- col-two -->
92
- </div>
93
- </section>
94
- <?php
95
- echo $after_widget;
96
-
97
- }
98
-
99
- function update($new_instance, $old_instance) {
100
- $instance = $old_instance;
101
- $instance['title'] = strip_tags( $new_instance['title'] );
102
- $instance["ofcate"] = absint($new_instance["ofcate"]);
103
- $instance['ofcount'] = strip_tags( $new_instance['ofcount'] );
104
- $instance["title_bg_color"] = $new_instance["title_bg_color"];
105
- $instance["title_txt_color"] = $new_instance["title_txt_color"];
106
- return $instance;
107
- }
108
-
109
- function form($instance) {
110
- $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Featured Post','themehunk-customizer');
111
- $ofcate = isset($instance['ofcate']) ? absint($instance['ofcate']) : 0;
112
- $ofcount = isset($instance['ofcount']) ? absint($instance['ofcount']) : 5;
113
- $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
114
- $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
115
-
116
-
117
- $termarr = array('child_of' => 0);
118
- $terms = get_terms('category' ,$termarr);
119
- $foption = '<option value="0">Random Post</option>';
120
- foreach($terms as $cat) {
121
- $term_id = $cat->term_id;
122
- $selected1 = ($ofcate==$term_id)?'selected':'';
123
- $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
124
- }
125
- ?>
126
- <div class="clearfix"></div>
127
- <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE3; ?>" />
128
- <p>
129
- <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Featured Post Title','themehunk-customizer'); ?></label>
130
- <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
131
- </p>
132
- <p><label for="<?php echo $this->get_field_id('ofcount'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
133
- <input id="<?php echo $this->get_field_id('ofcount'); ?>" name="<?php echo $this->get_field_name('ofcount'); ?>" type="text" value="<?php echo $ofcount; ?>" size="3" /></p>
134
- <p>
135
- <p>
136
- <label for="<?php echo $this->get_field_id('ofcate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
137
- <select name="<?php echo $this->get_field_name('ofcate'); ?>" ><?php echo $foption; ?></select>
138
- </p>
139
- <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
140
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
141
- </p>
142
- <p>
143
- <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
144
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
145
- </p>
146
-
147
- <?php
148
- }
149
- }
 
150
  ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ /*
5
+ * Testimonial Widget
6
+ */
7
+ class themehunk_customizer_section_three extends WP_Widget {
8
+
9
+ function __construct() {
10
+ $widget_ops = array('classname' => 'themehunk-customizer-section-three',
11
+ 'description' => 'Display post in left column along with description and other post in right column');
12
+ parent::__construct('themehunk-customizer-section-three', __('THunk : Post Style 3','themehunk_customizer'), $widget_ops);
13
+ }
14
+
15
+ function widget($args, $instance) {
16
+ extract($args);
17
+ // widget content
18
+ echo $before_widget;
19
+ $title = isset($instance['title'])?$instance['title']:__('Featured Post','themehunk_customizer');
20
+ $ofcate = isset($instance['ofcate']) ? absint($instance['ofcate']) : 0;
21
+ $ofcount = isset($instance['ofcount']) ? absint($instance['ofcount']) : 5;
22
+ $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
23
+ $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
24
+
25
+
26
+ $args = array(
27
+ 'order' => 'DESC',
28
+ 'orderby' =>'date',
29
+ 'ignore_sticky_posts' => 1,
30
+ 'post_type' => 'post',
31
+ 'post_status' => 'publish',
32
+ // 'meta_key' => '_thumbnail_id',
33
+ 'posts_per_page' => $ofcount,
34
+ 'cat' => $ofcate
35
+ );
36
+ if($ofcate != true){
37
+ $args['orderby'] = 'rand';
38
+ }
39
+ $of_posts = new WP_Query($args);
40
+ $catelink = get_category_link( $ofcate );
41
+ ?>
42
+ <section id="section_three">
43
+ <div class="inner_wrap">
44
+ <?php if ( $of_posts->have_posts() ) { $count=1; ?>
45
+
46
+ <?php while($of_posts->have_posts()): $of_posts->the_post(); ?>
47
+ <?php if($count<=1){ ?>
48
+ <div class="col-one">
49
+ <h3 class="title" style="background:<?php echo $title_bg_color;?>; color:<?php echo $title_txt_color;?>"><?php echo $title; ?></h3>
50
+ <div class="post-item">
51
+ <div class="post-thumb"><a href="#">
52
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
53
+ the_post_thumbnail( 'section-three-large' );
54
+ }
55
+ ?>
56
+ </a></div>
57
+ <div class="post-item-content">
58
+ <span class="cat-links">
59
+ <?php echo THunk_customizer_Cate(); ?>
60
+ </span>
61
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
62
+ <div class="entry-meta">
63
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
64
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
65
+ </div>
66
+ <?php the_excerpt(); ?>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="col-two">
71
+ <?php if($ofcate): ?>
72
+ <h3 class="view"><a href="<?php echo esc_url($catelink); ?>"><?php _e('View All','themehunk-customizer'); ?></a></h3>
73
+ <?php endif; ?>
74
+ <?php } else{ ?>
75
+ <div class="post-item">
76
+ <div class="post-thumb">
77
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
78
+ the_post_thumbnail( 'section-three-small' );
79
+ }
80
+ ?>
81
+ </div>
82
+ <div class="post-item-content">
83
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
84
+ <div class="entry-meta">
85
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
86
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <?php } $count++; ?>
91
+ <?php endwhile; } wp_reset_postdata(); ?>
92
+ </div> <!-- col-two -->
93
+ </div>
94
+ </section>
95
+ <?php
96
+ echo $after_widget;
97
+
98
+ }
99
+
100
+ function update($new_instance, $old_instance) {
101
+ $instance = $old_instance;
102
+ $instance['title'] = strip_tags( $new_instance['title'] );
103
+ $instance["ofcate"] = absint($new_instance["ofcate"]);
104
+ $instance['ofcount'] = strip_tags( $new_instance['ofcount'] );
105
+ $instance["title_bg_color"] = $new_instance["title_bg_color"];
106
+ $instance["title_txt_color"] = $new_instance["title_txt_color"];
107
+ return $instance;
108
+ }
109
+
110
+ function form($instance) {
111
+ $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Featured Post','themehunk-customizer');
112
+ $ofcate = isset($instance['ofcate']) ? absint($instance['ofcate']) : 0;
113
+ $ofcount = isset($instance['ofcount']) ? absint($instance['ofcount']) : 5;
114
+ $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
115
+ $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
116
+
117
+
118
+ $termarr = array('child_of' => 0);
119
+ $terms = get_terms('category' ,$termarr);
120
+ $foption = '<option value="0">Random Post</option>';
121
+ foreach($terms as $cat) {
122
+ $term_id = $cat->term_id;
123
+ $selected1 = ($ofcate==$term_id)?'selected':'';
124
+ $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
125
+ }
126
+ ?>
127
+ <div class="clearfix"></div>
128
+ <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE3; ?>" />
129
+ <p>
130
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Featured Post Title','themehunk-customizer'); ?></label>
131
+ <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
132
+ </p>
133
+ <p><label for="<?php echo $this->get_field_id('ofcount'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
134
+ <input id="<?php echo $this->get_field_id('ofcount'); ?>" name="<?php echo $this->get_field_name('ofcount'); ?>" type="text" value="<?php echo $ofcount; ?>" size="3" /></p>
135
+ <p>
136
+ <p>
137
+ <label for="<?php echo $this->get_field_id('ofcate'); ?>"><?php _e('Select Specific Option To Display Post','themehunk-customizer'); ?></label>
138
+ <select name="<?php echo $this->get_field_name('ofcate'); ?>" ><?php echo $foption; ?></select>
139
+ </p>
140
+ <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
141
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
142
+ </p>
143
+ <p>
144
+ <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
145
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
146
+ </p>
147
+
148
+ <?php
149
+ }
150
+ }
151
  ?>
elanzalite/widget/section-two.php CHANGED
@@ -1,126 +1,127 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
-
4
- /*
5
- * Testimonial Widget
6
- */
7
- class themehunk_customizer_section_two extends WP_Widget {
8
-
9
- function __construct() {
10
- $widget_ops = array('classname' => 'themehunk-customizer-section-two',
11
- 'description' => 'Display featured post slider');
12
- parent::__construct('themehunk-customizer-section-two', __('THunk : Post Style 2','themehunk_customizer'), $widget_ops);
13
- }
14
-
15
- function widget($args, $instance) {
16
- extract($args);
17
- // widget content
18
- echo $before_widget;
19
- $title = isset($instance['title'])?$instance['title']:__('Top Stories','themehunk_customizer');
20
- $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
21
- $count = isset($instance['count']) ? absint($instance['count']) : 4;
22
- $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
23
- $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
24
-
25
- $args = array(
26
- 'order' => 'DESC',
27
- 'ignore_sticky_posts' => 1,
28
- 'post_type' => 'post',
29
- 'meta_key' => '_thumbnail_id',
30
- 'posts_per_page' => $count,
31
- 'cat' => $cate
32
- );
33
- $query_posts = new WP_Query($args);
34
-
35
- ?>
36
- <section id="section_two">
37
- <div class="inner_wrap">
38
- <div class="post_slide">
39
- <h3 class="title" style="background:<?php echo $title_bg_color;?>; color:<?php echo $title_txt_color;?>"><?php echo apply_filters('widget_title', $title ); ?></h3>
40
- <?php if ( $query_posts->have_posts() ) { ?>
41
-
42
- <div class="owl-carousel owl-theme">
43
- <?php while ($query_posts->have_posts()): $query_posts->the_post();
44
- ?>
45
- <div class="item">
46
- <div class="post-item">
47
- <div class="post-thumb">
48
- <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
49
- the_post_thumbnail('section-two-small');
50
- }
51
- ?>
52
- </div>
53
- <div class="post-item-content">
54
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
55
- <div class="entry-meta">
56
- <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
57
- <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
58
- </div>
59
- </div>
60
- </div>
61
- </div>
62
- <?php endwhile; ?>
63
-
64
- <?php } wp_reset_postdata(); ?>
65
-
66
- </div>
67
- </div>
68
- </div>
69
- </section>
70
- <?php
71
- echo $after_widget;
72
-
73
- }
74
-
75
- function update($new_instance, $old_instance) {
76
- $instance = $old_instance;
77
- $instance['title'] = strip_tags( $new_instance['title'] );
78
- $instance["cate"] = absint($new_instance["cate"]);
79
- $instance["count"] = absint($new_instance["count"]);
80
- $instance["title_bg_color"] = $new_instance["title_bg_color"];
81
- $instance["title_txt_color"] = $new_instance["title_txt_color"];
82
- return $instance;
83
- }
84
-
85
- function form($instance) {
86
- $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Top Stories','themehunk-customizer');
87
- $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
88
- $count = isset($instance['count']) ? absint($instance['count']) : 4;
89
- $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
90
- $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
91
-
92
-
93
- $termarr = array('child_of' => 0);
94
- $terms = get_terms('category' ,$termarr);
95
- $foption = $ltoption = '';
96
- foreach($terms as $cat) {
97
- $term_id = $cat->term_id;
98
- $selected1 = ($cate==$term_id)?'selected':'';
99
- $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
100
- }
101
- ?>
102
- <div class="clearfix"></div>
103
- <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE2; ?>" />
104
- <p>
105
- <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Featured Post Title','themehunk-customizer'); ?></label>
106
- <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
107
- </p>
108
- <p><label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
109
- <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>
110
- <p>
111
- <p>
112
- <label for="<?php echo $this->get_field_id('cate'); ?>"><?php _e('Choose Category To Show Post','themehunk-customizer'); ?></label>
113
- <select name="<?php echo $this->get_field_name('cate'); ?>" ><?php echo $foption; ?></select>
114
- </p>
115
-
116
- <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
117
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
118
- </p>
119
- <p>
120
- <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
121
- <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
122
- </p>
123
- <?php
124
- }
125
- }
 
126
  ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ /*
5
+ * Testimonial Widget
6
+ */
7
+ class themehunk_customizer_section_two extends WP_Widget {
8
+
9
+ function __construct() {
10
+ $widget_ops = array('classname' => 'themehunk-customizer-section-two',
11
+ 'description' => 'Display featured post slider');
12
+ parent::__construct('themehunk-customizer-section-two', __('THunk : Post Style 2','themehunk_customizer'), $widget_ops);
13
+ }
14
+
15
+ function widget($args, $instance) {
16
+ extract($args);
17
+ // widget content
18
+ echo $before_widget;
19
+ $title = isset($instance['title'])?$instance['title']:__('Top Stories','themehunk_customizer');
20
+ $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
21
+ $count = isset($instance['count']) ? absint($instance['count']) : 4;
22
+ $title_bg_color = isset($instance['title_bg_color'])? $instance['title_bg_color']:'#66cda9';
23
+ $title_txt_color = isset($instance['title_txt_color'])? $instance['title_txt_color']:'#fff';
24
+
25
+ $args = array(
26
+ 'order' => 'DESC',
27
+ 'ignore_sticky_posts' => 1,
28
+ 'post_type' => 'post',
29
+ 'post_status' => 'publish',
30
+ 'meta_key' => '_thumbnail_id',
31
+ 'posts_per_page' => $count,
32
+ 'cat' => $cate
33
+ );
34
+ $query_posts = new WP_Query($args);
35
+
36
+ ?>
37
+ <section id="section_two">
38
+ <div class="inner_wrap">
39
+ <div class="post_slide">
40
+ <h3 class="title" style="background:<?php echo $title_bg_color;?>; color:<?php echo $title_txt_color;?>"><?php echo apply_filters('widget_title', $title ); ?></h3>
41
+ <?php if ( $query_posts->have_posts() ) { ?>
42
+
43
+ <div class="owl-carousel owl-theme">
44
+ <?php while ($query_posts->have_posts()): $query_posts->the_post();
45
+ ?>
46
+ <div class="item">
47
+ <div class="post-item">
48
+ <div class="post-thumb">
49
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
50
+ the_post_thumbnail('section-two-small');
51
+ }
52
+ ?>
53
+ </div>
54
+ <div class="post-item-content">
55
+ <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
56
+ <div class="entry-meta">
57
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
58
+ <span class="comments-link"><?php THunk_Customizer_Comment(); ?></span>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <?php endwhile; ?>
64
+
65
+ <?php } wp_reset_postdata(); ?>
66
+
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </section>
71
+ <?php
72
+ echo $after_widget;
73
+
74
+ }
75
+
76
+ function update($new_instance, $old_instance) {
77
+ $instance = $old_instance;
78
+ $instance['title'] = strip_tags( $new_instance['title'] );
79
+ $instance["cate"] = absint($new_instance["cate"]);
80
+ $instance["count"] = absint($new_instance["count"]);
81
+ $instance["title_bg_color"] = $new_instance["title_bg_color"];
82
+ $instance["title_txt_color"] = $new_instance["title_txt_color"];
83
+ return $instance;
84
+ }
85
+
86
+ function form($instance) {
87
+ $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Top Stories','themehunk-customizer');
88
+ $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
89
+ $count = isset($instance['count']) ? absint($instance['count']) : 4;
90
+ $title_bg_color = isset($instance['title_bg_color']) ? $instance['title_bg_color'] :"#66cda9";
91
+ $title_txt_color = isset($instance['title_txt_color']) ? $instance['title_txt_color'] :"#fff";
92
+
93
+
94
+ $termarr = array('child_of' => 0);
95
+ $terms = get_terms('category' ,$termarr);
96
+ $foption = $ltoption = '';
97
+ foreach($terms as $cat) {
98
+ $term_id = $cat->term_id;
99
+ $selected1 = ($cate==$term_id)?'selected':'';
100
+ $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
101
+ }
102
+ ?>
103
+ <div class="clearfix"></div>
104
+ <img src="<?php echo THEMEHUNK_CUSTOMIZER_STYLE2; ?>" />
105
+ <p>
106
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Featured Post Title','themehunk-customizer'); ?></label>
107
+ <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
108
+ </p>
109
+ <p><label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Add Number Of Post To Show','elanzalite'); ?></label>
110
+ <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>
111
+ <p>
112
+ <p>
113
+ <label for="<?php echo $this->get_field_id('cate'); ?>"><?php _e('Choose Category To Show Post','themehunk-customizer'); ?></label>
114
+ <select name="<?php echo $this->get_field_name('cate'); ?>" ><?php echo $foption; ?></select>
115
+ </p>
116
+
117
+ <p><label for="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" style="display:block;"><?php _e( 'Title Background Color:','themehunk-customizer' ); ?></label>
118
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_bg_color' ); ?>" name="<?php echo $this->get_field_name( 'title_bg_color' ); ?>" type="text" value="<?php echo esc_attr( $title_bg_color ); ?>" />
119
+ </p>
120
+ <p>
121
+ <label for="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" style="display:block;"><?php _e( 'Text Color','themehunk-customizer' ); ?></label>
122
+ <input class="widefat color-picker" id="<?php echo $this->get_field_id( 'title_txt_color' ); ?>" name="<?php echo $this->get_field_name( 'title_txt_color' ); ?>" type="text" value="<?php echo esc_attr( $title_txt_color); ?>" />
123
+ </p>
124
+ <?php
125
+ }
126
+ }
127
  ?>
elanzalite/widget/social-widget.php CHANGED
File without changes
featuredlite/customizer/custom-customizer.php CHANGED
File without changes
featuredlite/customizer/js/customizer.js CHANGED
File without changes
featuredlite/images/team.jpg CHANGED
File without changes
featuredlite/images/testimonia.png CHANGED
File without changes
featuredlite/inc/shortcode.php CHANGED
File without changes
jot-shop/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 jot_shop_plugin_customize_register( $wp_customize ){
9
+ //Front Page
10
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/top-slider.php';
11
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/category-tab.php';
12
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/product-slide.php';
13
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/category-slider.php';
14
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/product-list.php';
15
+
16
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/ribbon.php';
17
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/banner.php';
18
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/customizer/section/frontpage/higlight.php';
19
+
20
+ // product shown in front Page
21
+ $wp_customize->add_setting('jot_shop_prd_shw_no', array(
22
+ 'default' =>'20',
23
+ 'capability' => 'edit_theme_options',
24
+ 'sanitize_callback' =>'jot_shop_sanitize_number',
25
+ )
26
+ );
27
+ $wp_customize->add_control('jot_shop_prd_shw_no', array(
28
+ 'type' => 'number',
29
+ 'section' => 'jot-shop-woo-shop',
30
+ 'label' => __( 'No. of product to show in Front Page', 'jot-shop' ),
31
+ 'input_attrs' => array(
32
+ 'min' => 10,
33
+ 'step' => 1,
34
+ 'max' => 1000,
35
+ ),
36
+ )
37
+ );
38
+
39
+ }
40
+ add_action('customize_register','jot_shop_plugin_customize_register');
jot-shop/customizer/section/frontpage/banner.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_banner_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_banner_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'jot_shop_banner',
10
+ 'settings' => 'jot_shop_disable_banner_sec',
11
+ ) ) );
12
+ // choose col layout
13
+ if(class_exists('Jot_Shop_WP_Customize_Control_Radio_Image')){
14
+ $wp_customize->add_setting(
15
+ 'jot_shop_banner_layout', array(
16
+ 'default' => 'bnr-two',
17
+ 'sanitize_callback' => 'jot_shop_sanitize_radio',
18
+ )
19
+ );
20
+ $wp_customize->add_control(
21
+ new Jot_Shop_WP_Customize_Control_Radio_Image(
22
+ $wp_customize, 'jot_shop_banner_layout', array(
23
+ 'label' => esc_html__( 'Layout', 'jot-shop' ),
24
+ 'section' => 'jot_shop_banner',
25
+ 'choices' => array(
26
+ 'bnr-one' => array(
27
+ 'url' => JOT_SHOP_BANNER_IMG_LAYOUT_1,
28
+ ),
29
+ 'bnr-two' => array(
30
+ 'url' => JOT_SHOP_BANNER_IMG_LAYOUT_2,
31
+ ),
32
+ 'bnr-three' => array(
33
+ 'url' => JOT_SHOP_BANNER_IMG_LAYOUT_3,
34
+ ),
35
+ 'bnr-four' => array(
36
+ 'url' => JOT_SHOP_BANNER_IMG_LAYOUT_4,
37
+ ),
38
+ 'bnr-five' => array(
39
+ 'url' => JOT_SHOP_BANNER_IMG_LAYOUT_5,
40
+ ),
41
+ 'bnr-six' => array(
42
+ 'url' => JOT_SHOP_BANNER_IMG_LAYOUT_5,
43
+ ),
44
+
45
+ ),
46
+ )
47
+ )
48
+ );
49
+ }
50
+ // first image
51
+ $wp_customize->add_setting('jot_shop_bnr_1_img', array(
52
+ 'default' => '',
53
+ 'capability' => 'edit_theme_options',
54
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
55
+ ));
56
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_bnr_1_img', array(
57
+ 'label' => __('Image 1', 'jot-shop'),
58
+ 'section' => 'jot_shop_banner',
59
+ 'settings' => 'jot_shop_bnr_1_img',
60
+ )));
61
+
62
+ // first url
63
+ $wp_customize->add_setting('jot_shop_bnr_1_url', array(
64
+ 'default' =>'',
65
+ 'capability' => 'edit_theme_options',
66
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
67
+ ));
68
+ $wp_customize->add_control( 'jot_shop_bnr_1_url', array(
69
+ 'label' => __('url', 'jot-shop'),
70
+ 'section' => 'jot_shop_banner',
71
+ 'type' => 'text',
72
+ ));
73
+ // second image
74
+ $wp_customize->add_setting('jot_shop_bnr_2_img', array(
75
+ 'default' => '',
76
+ 'capability' => 'edit_theme_options',
77
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
78
+ ));
79
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_bnr_2_img', array(
80
+ 'label' => __('Image 2', 'jot-shop'),
81
+ 'section' => 'jot_shop_banner',
82
+ 'settings' => 'jot_shop_bnr_2_img',
83
+ )));
84
+
85
+ // second url
86
+ $wp_customize->add_setting('jot_shop_bnr_2_url', array(
87
+ 'default' =>'',
88
+ 'capability' => 'edit_theme_options',
89
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
90
+ ));
91
+ $wp_customize->add_control( 'jot_shop_bnr_2_url', array(
92
+ 'label' => __('url', 'jot-shop'),
93
+ 'section' => 'jot_shop_banner',
94
+ 'type' => 'text',
95
+ ));
96
+
97
+ // third image
98
+ $wp_customize->add_setting('jot_shop_bnr_3_img', array(
99
+ 'default' => '',
100
+ 'capability' => 'edit_theme_options',
101
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
102
+ ));
103
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_bnr_3_img', array(
104
+ 'label' => __('Image 3', 'jot-shop'),
105
+ 'section' => 'jot_shop_banner',
106
+ 'settings' => 'jot_shop_bnr_3_img',
107
+ )));
108
+
109
+ // third url
110
+ $wp_customize->add_setting('jot_shop_bnr_3_url', array(
111
+ 'default' =>'',
112
+ 'capability' => 'edit_theme_options',
113
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
114
+ ));
115
+ $wp_customize->add_control( 'jot_shop_bnr_3_url', array(
116
+ 'label' => __('url', 'jot-shop'),
117
+ 'section' => 'jot_shop_banner',
118
+ 'type' => 'text',
119
+ ));
120
+
121
+
122
+ // fourth image
123
+ $wp_customize->add_setting('jot_shop_bnr_4_img', array(
124
+ 'default' => '',
125
+ 'capability' => 'edit_theme_options',
126
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
127
+ ));
128
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_bnr_4_img', array(
129
+ 'label' => __('Image 4', 'jot-shop'),
130
+ 'section' => 'jot_shop_banner',
131
+ 'settings' => 'jot_shop_bnr_4_img',
132
+ )));
133
+ $wp_customize->add_setting('jot_shop_bnr_4_url', array(
134
+ 'default' =>'',
135
+ 'capability' => 'edit_theme_options',
136
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
137
+ ));
138
+ $wp_customize->add_control( 'jot_shop_bnr_4_url', array(
139
+ 'label' => __('url', 'jot-shop'),
140
+ 'section' => 'jot_shop_banner',
141
+ 'type' => 'text',
142
+ ));
143
+
144
+ // fifth image
145
+ $wp_customize->add_setting('jot_shop_bnr_5_img', array(
146
+ 'default' => '',
147
+ 'capability' => 'edit_theme_options',
148
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
149
+ ));
150
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_bnr_5_img', array(
151
+ 'label' => __('Image 5', 'jot-shop'),
152
+ 'section' => 'jot_shop_banner',
153
+ 'settings' => 'jot_shop_bnr_5_img',
154
+ )));
155
+ $wp_customize->add_setting('jot_shop_bnr_5_url', array(
156
+ 'default' =>'',
157
+ 'capability' => 'edit_theme_options',
158
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
159
+ ));
160
+ $wp_customize->add_control( 'jot_shop_bnr_5_url', array(
161
+ 'label' => __('url', 'jot-shop'),
162
+ 'section' => 'jot_shop_banner',
163
+ 'type' => 'text',
164
+ ));
165
+
166
+ $wp_customize->add_setting('jot_shop_bnr_doc', array(
167
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
168
+ ));
169
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_bnr_doc',
170
+ array(
171
+ 'section' => 'jot_shop_banner',
172
+ 'type' => 'doc-link',
173
+ 'url' => 'https://themehunk.com/docs/jot-shop/#banner-section',
174
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
175
+ 'priority' =>100,
176
+ )));
jot-shop/customizer/section/frontpage/category-slider.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_category_slide_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_category_slide_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'jot_shop_cat_slide_section',
10
+ 'settings' => 'jot_shop_disable_category_slide_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ $wp_customize->add_setting('jot_shop_cat_slider_heading', array(
15
+ 'default' => __('Woo Category','jot-shop'),
16
+ 'capability' => 'edit_theme_options',
17
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
18
+ 'transport' => 'postMessage',
19
+ ));
20
+ $wp_customize->add_control( 'jot_shop_cat_slider_heading', array(
21
+ 'label' => __('Section Heading', 'jot-shop'),
22
+ 'section' => 'jot_shop_cat_slide_section',
23
+ 'type' => 'text',
24
+ ));
25
+ /*****************/
26
+ // category layout
27
+ /*****************/
28
+ if(class_exists('Jot_Shop_WP_Customize_Control_Radio_Image')){
29
+ $wp_customize->add_setting(
30
+ 'jot_shop_cat_slide_layout', array(
31
+ 'default' => 'cat-layout-1',
32
+ 'sanitize_callback' => 'jot_shop_sanitize_radio',
33
+ )
34
+ );
35
+ $wp_customize->add_control(
36
+ new Jot_Shop_WP_Customize_Control_Radio_Image(
37
+ $wp_customize, 'jot_shop_cat_slide_layout', array(
38
+ 'label' => esc_html__( 'Category Layout', 'jot-shop' ),
39
+ 'section' => 'jot_shop_cat_slide_section',
40
+ 'choices' => array(
41
+ 'cat-layout-1' => array(
42
+ 'url' => JOT_SHOP_CAT_SLIDER_LAYOUT_1,
43
+ ),
44
+ 'cat-layout-2' => array(
45
+ 'url' => JOT_SHOP_CAT_SLIDER_LAYOUT_2,
46
+ ),
47
+ 'cat-layout-3' => array(
48
+ 'url' => JOT_SHOP_CAT_SLIDER_LAYOUT_3,
49
+ ),
50
+
51
+ ),
52
+ )
53
+ )
54
+ );
55
+ }
56
+ //= Choose All Category =
57
+ if (class_exists( 'Jot_Shop_Customize_Control_Checkbox_Multiple')) {
58
+ $wp_customize->add_setting('jot_shop_category_slide_list', array(
59
+ 'default' => '',
60
+ 'sanitize_callback' => 'jot_shop_checkbox_explode'
61
+ ));
62
+ $wp_customize->add_control(new Jot_Shop_Customize_Control_Checkbox_Multiple(
63
+ $wp_customize,'jot_shop_category_slide_list', array(
64
+ 'settings'=> 'jot_shop_category_slide_list',
65
+ 'label' => __( 'Choose Categories To Show', 'jot-shop' ),
66
+ 'section' => 'jot_shop_cat_slide_section',
67
+ 'choices' => jot_shop_get_category_list(array('taxonomy' =>'product_cat'),true),
68
+ )
69
+ ));
70
+
71
+ }
72
+ $wp_customize->add_setting('jot_shop_cat_item_no', array(
73
+ 'default' => 5,
74
+ 'capability' => 'edit_theme_options',
75
+ 'sanitize_callback' =>'jot_shop_sanitize_number',
76
+ )
77
+ );
78
+ $wp_customize->add_control('jot_shop_cat_item_no', array(
79
+ 'type' => 'number',
80
+ 'section' => 'jot_shop_cat_slide_section',
81
+ 'label' => __( 'No. of Column to show', 'jot-shop' ),
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( 'jot_shop_category_slider_optn', array(
91
+ 'default' => false,
92
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
93
+ ) );
94
+ $wp_customize->add_control( new Jot_Shop_Toggle_Control( $wp_customize, 'jot_shop_category_slider_optn', array(
95
+ 'label' => esc_html__( 'Slide Auto Play', 'jot-shop' ),
96
+ 'section' => 'jot_shop_cat_slide_section',
97
+ 'type' => 'toggle',
98
+ 'settings' => 'jot_shop_category_slider_optn',
99
+ ) ) );
100
+ $wp_customize->add_setting('jot_shop_category_slider_speed', array(
101
+ 'default' =>'3000',
102
+ 'capability' => 'edit_theme_options',
103
+ 'sanitize_callback' => 'jot_shop_sanitize_number',
104
+ ));
105
+ $wp_customize->add_control( 'jot_shop_category_slider_speed', array(
106
+ 'label' => __('Speed', 'jot-shop'),
107
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','jot-shop'),
108
+ 'section' => 'jot_shop_cat_slide_section',
109
+ 'type' => 'number',
110
+ ));
111
+
112
+
113
+ $wp_customize->add_setting('jot_shop_category_slider_doc', array(
114
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
115
+ ));
116
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_category_slider_doc',
117
+ array(
118
+ 'section' => 'jot_shop_cat_slide_section',
119
+ 'type' => 'doc-link',
120
+ 'url' => 'https://themehunk.com/docs/jot-shop/#woo-category',
121
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
122
+ 'priority' =>100,
123
+ )));
jot-shop/customizer/section/frontpage/category-tab.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_cat_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_cat_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'jot_shop_category_tab_section',
10
+ 'settings' => 'jot_shop_disable_cat_sec',
11
+ ) ) );
12
+ // section heading
13
+ $wp_customize->add_setting('jot_shop_cat_tab_heading', array(
14
+ 'default' => __('Tabbed Product Carousel','jot-shop'),
15
+ 'capability' => 'edit_theme_options',
16
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
17
+ 'transport' => 'postMessage',
18
+ ));
19
+ $wp_customize->add_control( 'jot_shop_cat_tab_heading', array(
20
+ 'label' => __('Section Heading', 'jot-shop'),
21
+ 'section' => 'jot_shop_category_tab_section',
22
+ 'type' => 'text',
23
+ ));
24
+ //= Choose All Category =
25
+ if (class_exists( 'Jot_Shop_Customize_Control_Checkbox_Multiple')) {
26
+ $wp_customize->add_setting('jot_shop_category_tab_list', array(
27
+ 'default' => '',
28
+ 'sanitize_callback' => 'jot_shop_checkbox_explode'
29
+ ));
30
+ $wp_customize->add_control(new Jot_Shop_Customize_Control_Checkbox_Multiple(
31
+ $wp_customize,'jot_shop_category_tab_list', array(
32
+ 'settings'=> 'jot_shop_category_tab_list',
33
+ 'label' => __( 'Choose Categories To Show', 'jot-shop' ),
34
+ 'section' => 'jot_shop_category_tab_section',
35
+ 'choices' => jot_shop_get_category_list(array('taxonomy' =>'product_cat'),true),
36
+ )
37
+ ));
38
+
39
+ }
40
+
41
+ $wp_customize->add_setting('jot_shop_category_optn', array(
42
+ 'default' => 'recent',
43
+ 'capability' => 'edit_theme_options',
44
+ 'sanitize_callback' => 'jot_shop_sanitize_select',
45
+ ));
46
+ $wp_customize->add_control( 'jot_shop_category_optn', array(
47
+ 'settings' => 'jot_shop_category_optn',
48
+ 'label' => __('Choose Option','jot-shop'),
49
+ 'section' => 'jot_shop_category_tab_section',
50
+ 'type' => 'select',
51
+ 'choices' => array(
52
+ 'recent' => __('Recent','jot-shop'),
53
+ 'featured' => __('Featured','jot-shop'),
54
+ 'random' => __('Random','jot-shop'),
55
+
56
+ ),
57
+ ));
58
+
59
+ $wp_customize->add_setting( 'jot_shop_single_row_slide_cat', array(
60
+ 'default' => false,
61
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
62
+ ) );
63
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_single_row_slide_cat', array(
64
+ 'label' => esc_html__('Enable Single Row Slide', 'jot-shop'),
65
+ 'type' => 'checkbox',
66
+ 'section' => 'jot_shop_category_tab_section',
67
+ 'settings' => 'jot_shop_single_row_slide_cat',
68
+ ) ) );
69
+
70
+
71
+ // Add an option to disable the logo.
72
+ $wp_customize->add_setting( 'jot_shop_cat_slider_optn', array(
73
+ 'default' => false,
74
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
75
+ ) );
76
+ $wp_customize->add_control( new Jot_Shop_Toggle_Control( $wp_customize, 'jot_shop_cat_slider_optn', array(
77
+ 'label' => esc_html__( 'Slide Auto Play', 'jot-shop' ),
78
+ 'section' => 'jot_shop_category_tab_section',
79
+ 'type' => 'toggle',
80
+ 'settings' => 'jot_shop_cat_slider_optn',
81
+ ) ) );
82
+ $wp_customize->add_setting('jot_shop_cat_slider_speed', array(
83
+ 'default' =>'3000',
84
+ 'capability' => 'edit_theme_options',
85
+ 'sanitize_callback' => 'jot_shop_sanitize_number',
86
+ ));
87
+ $wp_customize->add_control( 'jot_shop_cat_slider_speed', array(
88
+ 'label' => __('Speed', 'jot-shop'),
89
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','jot-shop'),
90
+ 'section' => 'jot_shop_category_tab_section',
91
+ 'type' => 'number',
92
+ ));
93
+
94
+ $wp_customize->add_setting('jot_shop_cat_tab_slider_doc', array(
95
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
96
+ ));
97
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_cat_tab_slider_doc',
98
+ array(
99
+ 'section' => 'jot_shop_category_tab_section',
100
+ 'type' => 'doc-link',
101
+ 'url' => 'https://themehunk.com/docs/jot-shop/#tabbed-product',
102
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
103
+ 'priority' =>100,
104
+ )));
jot-shop/customizer/section/frontpage/higlight.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_highlight_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_highlight_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'jot_shop_highlight',
10
+ 'settings' => 'jot_shop_disable_highlight_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ // $wp_customize->add_setting('jot_shop_hglgt_heading', array(
15
+ // 'default' => __('Highlight Feature','jot-shop'),
16
+ // 'capability' => 'edit_theme_options',
17
+ // 'sanitize_callback' => 'jot_shop_sanitize_text',
18
+ // 'transport' => 'postMessage',
19
+ // ));
20
+ // $wp_customize->add_control( 'jot_shop_hglgt_heading', array(
21
+ // 'label' => __('Section Heading', 'jot-shop'),
22
+ // 'section' => 'jot_shop_highlight',
23
+ // 'type' => 'text',
24
+ // ));
25
+
26
+ //Highlight Content Via Repeater
27
+ if ( class_exists( 'Jot_Shop_Repeater' ) ) {
28
+ $wp_customize->add_setting(
29
+ 'jot_shop_highlight_content', array(
30
+ 'sanitize_callback' => 'jot_shop_repeater_sanitize',
31
+ 'default' => Jot_Shop_Defaults_Models::instance()->get_feature_default(),
32
+ )
33
+ );
34
+
35
+ $wp_customize->add_control(
36
+ new Jot_Shop_Repeater(
37
+ $wp_customize, 'jot_shop_highlight_content', array(
38
+ 'label' => esc_html__( 'Highlight Content', 'jot-shop' ),
39
+ 'section' => 'jot_shop_highlight',
40
+ 'priority' => 15,
41
+ 'add_field_label' => esc_html__( 'Add new Feature', 'jot-shop' ),
42
+ 'item_name' => esc_html__( 'Feature', 'jot-shop' ),
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
+ ),'Jot_Shop_Ship_Repeater'
58
+ )
59
+ );
60
+ }
61
+
62
+
63
+ $wp_customize->add_setting('jot_shop_highlight_doc', array(
64
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
65
+ ));
66
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_highlight_doc',
67
+ array(
68
+ 'section' => 'jot_shop_highlight',
69
+ 'type' => 'doc-link',
70
+ 'url' => 'https://themehunk.com/docs/jot-shop/#highlight-section',
71
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
72
+ 'priority' =>100,
73
+ )));
jot-shop/customizer/section/frontpage/product-list.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_product_list_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_product_list_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'jot_shop_product_slide_list',
10
+ 'settings' => 'jot_shop_disable_product_list_sec',
11
+ ) ) );
12
+ // section heading
13
+ $wp_customize->add_setting('jot_shop_product_list_heading', array(
14
+ 'default' => __('Product List Carousel','jot-shop'),
15
+ 'capability' => 'edit_theme_options',
16
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
17
+ 'transport' => 'postMessage',
18
+ ));
19
+ $wp_customize->add_control( 'jot_shop_product_list_heading', array(
20
+ 'label' => __('Section Heading', 'jot-shop'),
21
+ 'section' => 'jot_shop_product_slide_list',
22
+ 'type' => 'text',
23
+ ));
24
+ //control setting for select options
25
+ $wp_customize->add_setting('jot_shop_product_list_cat', array(
26
+ 'default' => 0,
27
+ 'sanitize_callback' => 'jot_shop_sanitize_select',
28
+ ) );
29
+ $wp_customize->add_control( 'jot_shop_product_list_cat', array(
30
+ 'label' => __('Select Category','jot-shop'),
31
+ 'section' => 'jot_shop_product_slide_list',
32
+ 'type' => 'select',
33
+ 'choices' => jot_shop_product_category_list(array('taxonomy' =>'product_cat'),true),
34
+ ) );
35
+
36
+ $wp_customize->add_setting('jot_shop_product_list_optn', array(
37
+ 'default' => 'recent',
38
+ 'capability' => 'edit_theme_options',
39
+ 'sanitize_callback' => 'jot_shop_sanitize_select',
40
+ ));
41
+ $wp_customize->add_control('jot_shop_product_list_optn', array(
42
+ 'settings' => 'jot_shop_product_list_optn',
43
+ 'label' => __('Choose Option','jot-shop'),
44
+ 'section' => 'jot_shop_product_slide_list',
45
+ 'type' => 'select',
46
+ 'choices' => array(
47
+ 'recent' => __('Recent','jot-shop'),
48
+ 'featured' => __('Featured','jot-shop'),
49
+ 'random' => __('Random','jot-shop'),
50
+ ),
51
+ ));
52
+
53
+ $wp_customize->add_setting( 'jot_shop_single_row_prdct_list', array(
54
+ 'default' => false,
55
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
56
+ ) );
57
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_single_row_prdct_list', array(
58
+ 'label' => esc_html__('Enable Single Row Slide', 'jot-shop'),
59
+ 'type' => 'checkbox',
60
+ 'section' => 'jot_shop_product_slide_list',
61
+ 'settings' => 'jot_shop_single_row_prdct_list',
62
+ ) ) );
63
+
64
+
65
+ // Add an option to disable the logo.
66
+ $wp_customize->add_setting( 'jot_shop_product_list_slide_optn', array(
67
+ 'default' => false,
68
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
69
+ ) );
70
+ $wp_customize->add_control( new Jot_Shop_Toggle_Control( $wp_customize, 'jot_shop_product_list_slide_optn', array(
71
+ 'label' => esc_html__( 'Slide Auto Play', 'jot-shop' ),
72
+ 'section' => 'jot_shop_product_slide_list',
73
+ 'type' => 'toggle',
74
+ 'settings' => 'jot_shop_product_list_slide_optn',
75
+ ) ) );
76
+ $wp_customize->add_setting('jot_shop_product_list_slide_speed', array(
77
+ 'default' =>'3000',
78
+ 'capability' => 'edit_theme_options',
79
+ 'sanitize_callback' => 'jot_shop_sanitize_number',
80
+ ));
81
+ $wp_customize->add_control( 'jot_shop_product_list_slide_speed', array(
82
+ 'label' => __('Speed', 'jot-shop'),
83
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','jot-shop'),
84
+ 'section' => 'jot_shop_product_slide_list',
85
+ 'type' => 'number',
86
+ ));
87
+
88
+ $wp_customize->add_setting('jot_shop_product_list_slide_doc', array(
89
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
90
+ ));
91
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_product_list_slide_doc',
92
+ array(
93
+ 'section' => 'jot_shop_product_slide_list',
94
+ 'type' => 'doc-link',
95
+ 'url' => 'https://themehunk.com/docs/jot-shop/#product-list',
96
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
97
+ 'priority' =>100,
98
+ )));
jot-shop/customizer/section/frontpage/product-slide.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!function_exists('jot_shop_product_category_list')){
3
+ function jot_shop_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( 'jot_shop_disable_product_slide_sec', array(
15
+ 'default' => false,
16
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
17
+ ) );
18
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_product_slide_sec', array(
19
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
20
+ 'type' => 'checkbox',
21
+ 'section' => 'jot_shop_product_slide_section',
22
+ 'settings' => 'jot_shop_disable_product_slide_sec',
23
+ ) ) );
24
+ // section heading
25
+ $wp_customize->add_setting('jot_shop_product_slider_heading', array(
26
+ 'default' => __('Product Carousel','jot-shop'),
27
+ 'capability' => 'edit_theme_options',
28
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
29
+ 'transport' => 'postMessage',
30
+ ));
31
+ $wp_customize->add_control( 'jot_shop_product_slider_heading', array(
32
+ 'label' => __('Section Heading', 'jot-shop'),
33
+ 'section' => 'jot_shop_product_slide_section',
34
+ 'type' => 'text',
35
+ ));
36
+
37
+ //control setting for select options
38
+ $wp_customize->add_setting('jot_shop_product_slider_cat', array(
39
+ 'default' => 0,
40
+ 'sanitize_callback' => 'jot_shop_sanitize_select',
41
+ ) );
42
+ $wp_customize->add_control( 'jot_shop_product_slider_cat', array(
43
+ 'label' => __('Select Category','jot-shop'),
44
+ 'section' => 'jot_shop_product_slide_section',
45
+ 'type' => 'select',
46
+ 'choices' => jot_shop_product_category_list(array('taxonomy' =>'product_cat'),true),
47
+ ) );
48
+
49
+ $wp_customize->add_setting('jot_shop_product_slide_optn', array(
50
+ 'default' => 'recent',
51
+ 'capability' => 'edit_theme_options',
52
+ 'sanitize_callback' => 'jot_shop_sanitize_select',
53
+ ));
54
+ $wp_customize->add_control( 'jot_shop_product_slide_optn', array(
55
+ 'settings' => 'jot_shop_product_slide_optn',
56
+ 'label' => __('Choose Option','jot-shop'),
57
+ 'section' => 'jot_shop_product_slide_section',
58
+ 'type' => 'select',
59
+ 'choices' => array(
60
+ 'recent' => __('Recent','jot-shop'),
61
+ 'featured' => __('Featured','jot-shop'),
62
+ 'random' => __('Random','jot-shop'),
63
+
64
+ ),
65
+ ));
66
+
67
+ $wp_customize->add_setting( 'jot_shop_single_row_prdct_slide', array(
68
+ 'default' => false,
69
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
70
+ ) );
71
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_single_row_prdct_slide', array(
72
+ 'label' => esc_html__('Enable Single Row Slide', 'jot-shop'),
73
+ 'type' => 'checkbox',
74
+ 'section' => 'jot_shop_product_slide_section',
75
+ 'settings' => 'jot_shop_single_row_prdct_slide',
76
+ ) ) );
77
+
78
+
79
+ // Add an option to disable the logo.
80
+ $wp_customize->add_setting( 'jot_shop_product_slider_optn', array(
81
+ 'default' => false,
82
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
83
+ ) );
84
+ $wp_customize->add_control( new Jot_Shop_Toggle_Control( $wp_customize, 'jot_shop_product_slider_optn', array(
85
+ 'label' => esc_html__( 'Slide Auto Play', 'jot-shop' ),
86
+ 'section' => 'jot_shop_product_slide_section',
87
+ 'type' => 'toggle',
88
+ 'settings' => 'jot_shop_product_slider_optn',
89
+ ) ) );
90
+ $wp_customize->add_setting('jot_shop_product_slider_speed', array(
91
+ 'default' =>'3000',
92
+ 'capability' => 'edit_theme_options',
93
+ 'sanitize_callback' => 'jot_shop_sanitize_number',
94
+ ));
95
+ $wp_customize->add_control( 'jot_shop_product_slider_speed', array(
96
+ 'label' => __('Speed', 'jot-shop'),
97
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','jot-shop'),
98
+ 'section' => 'jot_shop_product_slide_section',
99
+ 'type' => 'number',
100
+ ));
101
+
102
+
103
+ $wp_customize->add_setting('jot_shop_product_slider_doc', array(
104
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
105
+ ));
106
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_product_slider_doc',
107
+ array(
108
+ 'section' => 'jot_shop_product_slide_section',
109
+ 'type' => 'doc-link',
110
+ 'url' => 'https://themehunk.com/docs/jot-shop/#product-carousel',
111
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
112
+ 'priority' =>100,
113
+ )));
jot-shop/customizer/section/frontpage/ribbon.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_ribbon_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_ribbon_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'priority' => 1,
10
+ 'section' => 'jot_shop_ribbon',
11
+ 'settings' => 'jot_shop_disable_ribbon_sec',
12
+ ) ) );
13
+
14
+ $wp_customize->add_setting('jot_shop_ribbon_background', array(
15
+ 'default' => 'image',
16
+ 'sanitize_callback' => 'jot_shop_sanitize_select',
17
+ ) );
18
+ $wp_customize->add_control( new Jot_Shop_Customizer_Buttonset_Control( $wp_customize, 'jot_shop_ribbon_background', array(
19
+ 'label' => esc_html__( 'Choose Ribbon Background', 'jot-shop' ),
20
+ 'priority' => 2,
21
+ 'section' => 'jot_shop_ribbon',
22
+ 'settings' => 'jot_shop_ribbon_background',
23
+ 'choices' => array(
24
+ 'image' => esc_html__( 'Image', 'jot-shop' ),
25
+ 'video' => esc_html__( 'Video', 'jot-shop' ),
26
+ ),
27
+ ) ) );
28
+ $wp_customize->add_setting( 'jot_shop_ribbon_bg_img_url', array(
29
+ 'sanitize_callback' => 'esc_url',
30
+ 'transport' => 'postMessage',
31
+ ) );
32
+ $wp_customize->add_setting( 'jot_shop_ribbon_bg_img_id', array(
33
+ 'sanitize_callback' => 'absint',
34
+ 'transport' => 'postMessage',
35
+ ) );
36
+
37
+ $wp_customize->add_setting( 'jot_shop_ribbon_bg_background_repeat', array(
38
+ 'default' => 'no-repeat',
39
+ 'sanitize_callback' => 'sanitize_text_field',
40
+ 'transport' => 'postMessage',
41
+ ) );
42
+
43
+ $wp_customize->add_setting( 'jot_shop_ribbon_bg_background_size', array(
44
+ 'default' => 'auto',
45
+ 'sanitize_callback' => 'sanitize_text_field',
46
+ 'transport' => 'postMessage',
47
+ ) );
48
+
49
+ $wp_customize->add_setting( 'jot_shop_ribbon_bg_background_attach', array(
50
+ 'default' => 'scroll',
51
+ 'sanitize_callback' => 'sanitize_text_field',
52
+ 'transport' => 'postMessage',
53
+ ) );
54
+
55
+ $wp_customize->add_setting( 'jot_shop_ribbon_bg_background_position', array(
56
+ 'default' => 'center center',
57
+ 'sanitize_callback' => 'sanitize_text_field',
58
+ 'transport' => 'postMessage',
59
+ ) );
60
+ // Registers example_background control
61
+ $wp_customize->add_control(
62
+ new Jot_Shop_Customize_Custom_Background_Control(
63
+ $wp_customize,
64
+ 'jot_shop_ribbon_bg_background_image',
65
+ array(
66
+ 'label' => esc_html__( 'Background Image', 'jot-shop' ),
67
+ 'section' => 'jot_shop_ribbon',
68
+ 'priority' => 2,
69
+ 'settings' => array(
70
+ 'image_url' => 'jot_shop_ribbon_bg_img_url',
71
+ 'image_id' => 'jot_shop_ribbon_bg_img_id',
72
+ 'repeat' => 'jot_shop_ribbon_bg_background_repeat', // Use false to hide the field
73
+ 'size' => 'jot_shop_ribbon_bg_background_size',
74
+ 'position' => 'jot_shop_ribbon_bg_background_position',
75
+ 'attach' => 'jot_shop_ribbon_bg_background_attach'
76
+ )
77
+ )
78
+ )
79
+ );
80
+
81
+ $wp_customize->add_setting('jot_shop_ribbon_bg_video', array(
82
+ 'default' => '',
83
+ 'sanitize_callback' => 'sanitize_text_field'
84
+ ));
85
+ $wp_customize->add_control( new WP_Customize_Image_Control(
86
+ $wp_customize, 'jot_shop_ribbon_bg_video', array(
87
+ 'label' => __('Upload Background Video', 'oneline'),
88
+ 'section' => 'jot_shop_ribbon',
89
+ 'settings' => 'jot_shop_ribbon_bg_video',
90
+ )));
91
+ $wp_customize->add_setting('jot_shop_ribbon_video_poster_image', array(
92
+ 'default' => '',
93
+ 'sanitize_callback' => 'sanitize_text_field'
94
+ ));
95
+ $wp_customize->add_control( new WP_Customize_Image_Control(
96
+ $wp_customize, 'jot_shop_ribbon_video_poster_image', array(
97
+ 'label' => __('Upload Video Poster Image', 'oneline'),
98
+ 'section' => 'jot_shop_ribbon',
99
+ 'settings' => 'jot_shop_ribbon_video_poster_image',
100
+ )));
101
+
102
+ $wp_customize->add_setting( 'jot_shop_enable_youtube_video', array(
103
+ 'default' => false,
104
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
105
+ ) );
106
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_enable_youtube_video', array(
107
+ 'label' => esc_html__('Check to upload youtube video link', 'jot-shop'),
108
+ 'type' => 'checkbox',
109
+ 'section' => 'jot_shop_ribbon',
110
+ 'settings' => 'jot_shop_enable_youtube_video',
111
+ ) ) );
112
+
113
+ $wp_customize->add_setting('jot_shop_youtube_video_link', array(
114
+ 'default' => '',
115
+ 'capability' => 'edit_theme_options',
116
+ 'sanitize_callback' => 'jot_shop_sanitize_textarea',
117
+
118
+ ));
119
+ $wp_customize->add_control('jot_shop_youtube_video_link', array(
120
+ 'label' => __('Enter youtube video embeded Url', 'jot-shop'),
121
+ 'section' => 'jot_shop_ribbon',
122
+ 'settings' => 'jot_shop_youtube_video_link',
123
+ 'type' => 'textarea',
124
+ ));
125
+
126
+ $wp_customize->add_setting('jot_shop_ribbon_text', array(
127
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.',
128
+ 'capability' => 'edit_theme_options',
129
+ 'sanitize_callback' => 'jot_shop_sanitize_textarea',
130
+ 'transport' => 'postMessage',
131
+
132
+ ));
133
+ $wp_customize->add_control('jot_shop_ribbon_text', array(
134
+ 'label' => __('Text', 'jot-shop'),
135
+ 'section' => 'jot_shop_ribbon',
136
+ 'settings' => 'jot_shop_ribbon_text',
137
+ 'type' => 'textarea',
138
+ ));
139
+
140
+ $wp_customize->add_setting('jot_shop_ribbon_btn_text', array(
141
+ 'default' => 'Call To Action',
142
+ 'capability' => 'edit_theme_options',
143
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
144
+ 'transport' => 'postMessage',
145
+
146
+ ));
147
+ $wp_customize->add_control('jot_shop_ribbon_btn_text', array(
148
+ 'label' => __('Button Text', 'jot-shop'),
149
+ 'section' => 'jot_shop_ribbon',
150
+ 'settings' => 'jot_shop_ribbon_btn_text',
151
+ 'type' => 'text',
152
+ ));
153
+
154
+ $wp_customize->add_setting('jot_shop_ribbon_btn_link', array(
155
+ 'default' => '#',
156
+ 'capability' => 'edit_theme_options',
157
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
158
+
159
+ ));
160
+ $wp_customize->add_control('jot_shop_ribbon_btn_link', array(
161
+ 'label' => __('Button Link', 'jot-shop'),
162
+ 'section' => 'jot_shop_ribbon',
163
+ 'settings' => 'jot_shop_ribbon_btn_link',
164
+ 'type' => 'text',
165
+ ));
166
+
167
+
168
+ $wp_customize->add_setting('jot_shop_ribbon_doc', array(
169
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
170
+ ));
171
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_ribbon_doc',
172
+ array(
173
+ 'section' => 'jot_shop_ribbon',
174
+ 'type' => 'doc-link',
175
+ 'url' => 'https://themehunk.com/docs/jot-shop/#ribbon-section',
176
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
177
+ 'priority' =>100,
178
+ )));
jot-shop/customizer/section/frontpage/top-slider.php ADDED
@@ -0,0 +1,456 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'jot_shop_disable_top_slider_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'jot_shop_disable_top_slider_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'jot-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'jot_shop_top_slider_section',
10
+ 'settings' => 'jot_shop_disable_top_slider_sec',
11
+ ) ) );
12
+
13
+ if(class_exists('Jot_Shop_WP_Customize_Control_Radio_Image')){
14
+ $wp_customize->add_setting(
15
+ 'jot_shop_top_slide_layout', array(
16
+ 'default' => 'slide-layout-1',
17
+ 'sanitize_callback' => 'jot_shop_sanitize_radio',
18
+ )
19
+ );
20
+
21
+
22
+
23
+ $wp_customize->add_control(
24
+ new Jot_Shop_WP_Customize_Control_Radio_Image(
25
+ $wp_customize, 'jot_shop_top_slide_layout', array(
26
+ 'label' => esc_html__( 'Slider Layout', 'jot-shop' ),
27
+ 'section' => 'jot_shop_top_slider_section',
28
+ 'choices' => array(
29
+ 'slide-layout-1' => array(
30
+ 'url' => JOT_SHOP_SLIDER_LAYOUT_1,
31
+ ),
32
+ 'slide-layout-2' => array(
33
+ 'url' =>SLIDER_LAYOUT_2,
34
+ ),
35
+ 'slide-layout-3' => array(
36
+ 'url' => JOT_SHOP_SLIDER_LAYOUT_2,
37
+ ),
38
+ 'slide-layout-4' => array(
39
+ 'url' => SLIDER_LAYOUT_4,
40
+ ),
41
+
42
+ 'slide-layout-6' => array(
43
+ 'url' => SLIDER_LAYOUT_6,
44
+ ),
45
+
46
+ 'slide-layout-9' => array(
47
+ 'url' => JOT_SHOP_SLIDER_LAYOUT_9,
48
+ ),
49
+
50
+ ),
51
+ )
52
+ )
53
+ );
54
+ }
55
+
56
+ //Slider Content Via Repeater
57
+ if ( class_exists( 'Jot_Shop_Repeater' ) ){
58
+ $wp_customize->add_setting(
59
+ 'jot_shop_top_slide_content', array(
60
+ 'sanitize_callback' => 'jot_shop_repeater_sanitize',
61
+ 'default' => '',
62
+ )
63
+ );
64
+ $wp_customize->add_control(
65
+ new Jot_Shop_Repeater(
66
+ $wp_customize, 'jot_shop_top_slide_content', array(
67
+ 'label' => esc_html__( 'Slide Content', 'jot-shop' ),
68
+ 'section' => 'jot_shop_top_slider_section',
69
+ 'add_field_label' => esc_html__( 'Add new Slide', 'jot-shop' ),
70
+ 'item_name' => esc_html__( 'Slide', 'jot-shop' ),
71
+
72
+ 'customizer_repeater_title_control' => true,
73
+ 'customizer_repeater_subtitle_control' => true,
74
+ 'customizer_repeater_text_control' => true,
75
+ 'customizer_repeater_image_control' => true,
76
+ 'customizer_repeater_logo_image_control' => false,
77
+ 'customizer_repeater_link_control' => true,
78
+ 'customizer_repeater_repeater_control' => false,
79
+
80
+
81
+ ),'jot_shop_top_slide_content'
82
+ )
83
+ );
84
+ }
85
+
86
+
87
+
88
+ //Slider Content Via Repeater for slider-layout-6
89
+ if ( class_exists( 'Jot_Shop_Repeater' ) ){
90
+ $wp_customize->add_setting(
91
+ 'jot_shop_top_slide_content6', array(
92
+ 'sanitize_callback' => 'jot_shop_repeater_sanitize',
93
+ 'default' => '',
94
+ )
95
+ );
96
+ $wp_customize->add_control(
97
+ new Jot_Shop_Repeater(
98
+ $wp_customize, 'jot_shop_top_slide_content6', array(
99
+ 'label' => esc_html__( 'Slide Content', 'jot-shop' ),
100
+ 'section' => 'jot_shop_top_slider_section',
101
+ 'add_field_label' => esc_html__( 'Add new Slide', 'jot-shop' ),
102
+ 'item_name' => esc_html__( 'Slide', 'jot-shop' ),
103
+
104
+ 'customizer_repeater_title_control' => true,
105
+ 'customizer_repeater_subtitle_control' => false,
106
+ 'customizer_repeater_text_control' => true,
107
+ 'customizer_repeater_image_control' => true,
108
+ 'customizer_repeater_logo_image_control' => false,
109
+ 'customizer_repeater_link_control' => true,
110
+ 'customizer_repeater_repeater_control' => false,
111
+
112
+
113
+ ),'jot_shop_top_slide_content6'
114
+ )
115
+ );
116
+ }
117
+
118
+
119
+
120
+
121
+
122
+
123
+ // Add an option to disable the logo.
124
+ $wp_customize->add_setting( 'jot_shop_top_slider_optn', array(
125
+ 'default' => false,
126
+ 'sanitize_callback' => 'jot_shop_sanitize_checkbox',
127
+ ) );
128
+ $wp_customize->add_control( new Jot_Shop_Toggle_Control( $wp_customize, 'jot_shop_top_slider_optn', array(
129
+ 'label' => esc_html__( 'Slide Auto Play', 'jot-shop' ),
130
+ 'section' => 'jot_shop_top_slider_section',
131
+ 'type' => 'toggle',
132
+ 'settings' => 'jot_shop_top_slider_optn',
133
+ ) ) );
134
+
135
+ $wp_customize->add_setting('jot_shop_slider_speed', array(
136
+ 'default' =>'3000',
137
+ 'capability' => 'edit_theme_options',
138
+ 'sanitize_callback' => 'jot_shop_sanitize_number',
139
+ ));
140
+ $wp_customize->add_control( 'jot_shop_slider_speed', array(
141
+ 'label' => __('Speed', 'jot-shop'),
142
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','jot-shop'),
143
+ 'section' => 'jot_shop_top_slider_section',
144
+ 'type' => 'number',
145
+ ));
146
+
147
+
148
+ //slider-layout-6
149
+
150
+ $wp_customize->add_setting('jot_shop_discount_offer_txt', array(
151
+ 'default' =>__('Discount Up To 50%','jot-shop'),
152
+ 'capability' => 'edit_theme_options',
153
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
154
+ 'transport' => 'postMessage',
155
+ ));
156
+ $wp_customize->add_control( 'jot_shop_discount_offer_txt', array(
157
+ 'label' => __('Discount Offer Heading', 'jot-shop'),
158
+ 'section' => 'jot_shop_top_slider_section',
159
+ 'type' => 'text',
160
+ ));
161
+
162
+ $wp_customize->add_setting('jot_shop_cat_url', array(
163
+ 'default' =>'',
164
+ 'capability' => 'edit_theme_options',
165
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
166
+ ));
167
+ $wp_customize->add_control( 'jot_shop_cat_url', array(
168
+ 'label' => __('Category Url', 'jot-shop'),
169
+ 'section' => 'jot_shop_top_slider_section',
170
+ 'type' => 'text',
171
+ ));
172
+
173
+
174
+
175
+
176
+ // slider-layout-2
177
+ $wp_customize->add_setting('jot_shop_top_slider_2_title', array(
178
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
179
+ ));
180
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_top_slider_2_title',
181
+ array(
182
+ 'section' => 'jot_shop_top_slider_section',
183
+ 'type' => 'pro-text',
184
+ 'label' => esc_html__( 'First Column', 'jot-shop' ),
185
+ )));
186
+ $wp_customize->add_setting('jot_shop_lay2_adimg', array(
187
+ 'default' => '',
188
+ 'capability' => 'edit_theme_options',
189
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
190
+ ));
191
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay2_adimg', array(
192
+ 'label' => __('Image 1', 'jot-shop'),
193
+ 'section' => 'jot_shop_top_slider_section',
194
+ 'settings' => 'jot_shop_lay2_adimg',
195
+ )));
196
+ $wp_customize->add_setting('jot_shop_lay2_url', array(
197
+ 'default' =>'',
198
+ 'capability' => 'edit_theme_options',
199
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
200
+ ));
201
+ $wp_customize->add_control( 'jot_shop_lay2_url', array(
202
+ 'label' => __('url', 'jot-shop'),
203
+ 'section' => 'jot_shop_top_slider_section',
204
+ 'type' => 'text',
205
+ ));
206
+ $wp_customize->add_setting('jot_shop_lay2_adimg2', array(
207
+ 'default' => '',
208
+ 'capability' => 'edit_theme_options',
209
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
210
+ ));
211
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay2_adimg2', array(
212
+ 'label' => __('Image 2', 'jot-shop'),
213
+ 'section' => 'jot_shop_top_slider_section',
214
+ 'settings' => 'jot_shop_lay2_adimg2',
215
+ )));
216
+ $wp_customize->add_setting('jot_shop_lay2_url2', array(
217
+ 'default' =>'',
218
+ 'capability' => 'edit_theme_options',
219
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
220
+ ));
221
+ $wp_customize->add_control( 'jot_shop_lay2_url2', array(
222
+ 'label' => __('url', 'jot-shop'),
223
+ 'section' => 'jot_shop_top_slider_section',
224
+ 'type' => 'text',
225
+ ));
226
+ // third coloum image
227
+ $wp_customize->add_setting('jot_shop_top_slider_2_title2', array(
228
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
229
+ ));
230
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_top_slider_2_title2',
231
+ array(
232
+ 'section' => 'jot_shop_top_slider_section',
233
+ 'type' => 'pro-text',
234
+ 'label' => esc_html__( 'Third Column', 'jot-shop' ),
235
+ )));
236
+ $wp_customize->add_setting('jot_shop_lay2_adimg3', array(
237
+ 'default' => '',
238
+ 'capability' => 'edit_theme_options',
239
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
240
+ ));
241
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay2_adimg3', array(
242
+ 'label' => __('Image', 'jot-shop'),
243
+ 'section' => 'jot_shop_top_slider_section',
244
+ 'settings' => 'jot_shop_lay2_adimg3',
245
+ )));
246
+ $wp_customize->add_setting('jot_shop_lay2_url3', array(
247
+ 'default' =>'',
248
+ 'capability' => 'edit_theme_options',
249
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
250
+ ));
251
+ $wp_customize->add_control( 'jot_shop_lay2_url3', array(
252
+ 'label' => __('url', 'jot-shop'),
253
+ 'section' => 'jot_shop_top_slider_section',
254
+ 'type' => 'text',
255
+ ));
256
+
257
+
258
+ // third coloum image
259
+ $wp_customize->add_setting('jot_shop_top_slider_3_title2', array(
260
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
261
+ ));
262
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_top_slider_3_title2',
263
+ array(
264
+ 'section' => 'jot_shop_top_slider_section',
265
+ 'type' => 'pro-text',
266
+ 'label' => esc_html__( 'Third Column', 'jot-shop' ),
267
+ )));
268
+ $wp_customize->add_setting('jot_shop_lay3_adimg3', array(
269
+ 'default' => '',
270
+ 'capability' => 'edit_theme_options',
271
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
272
+ ));
273
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay3_adimg3', array(
274
+ 'label' => __('Image', 'jot-shop'),
275
+ 'section' => 'jot_shop_top_slider_section',
276
+ 'settings' => 'jot_shop_lay3_adimg3',
277
+ )));
278
+ $wp_customize->add_setting('jot_shop_lay3_url3', array(
279
+ 'default' =>'',
280
+ 'capability' => 'edit_theme_options',
281
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
282
+ ));
283
+ $wp_customize->add_control( 'jot_shop_lay3_url3', array(
284
+ 'label' => __('url', 'jot-shop'),
285
+ 'section' => 'jot_shop_top_slider_section',
286
+ 'type' => 'text',
287
+ ));
288
+
289
+
290
+
291
+ // slider-layout-3
292
+ $wp_customize->add_setting('jot_shop_lay3_adimg', array(
293
+ 'default' => '',
294
+ 'capability' => 'edit_theme_options',
295
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
296
+ ));
297
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay3_adimg', array(
298
+ 'label' => __('Image 1', 'jot-shop'),
299
+ 'section' => 'jot_shop_top_slider_section',
300
+ 'settings' => 'jot_shop_lay3_adimg',
301
+ )));
302
+ $wp_customize->add_setting('jot_shop_lay3_url', array(
303
+ 'default' =>'',
304
+ 'capability' => 'edit_theme_options',
305
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
306
+ ));
307
+ $wp_customize->add_control( 'jot_shop_lay3_url', array(
308
+ 'label' => __('url', 'jot-shop'),
309
+ 'section' => 'jot_shop_top_slider_section',
310
+ 'type' => 'text',
311
+ ));
312
+ $wp_customize->add_setting('jot_shop_lay3_adimg2', array(
313
+ 'default' => '',
314
+ 'capability' => 'edit_theme_options',
315
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
316
+ ));
317
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay3_adimg2', array(
318
+ 'label' => __('Image 2', 'jot-shop'),
319
+ 'section' => 'jot_shop_top_slider_section',
320
+ 'settings' => 'jot_shop_lay3_adimg2',
321
+ )));
322
+ $wp_customize->add_setting('jot_shop_lay3_2url', array(
323
+ 'default' =>'',
324
+ 'capability' => 'edit_theme_options',
325
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
326
+ ));
327
+ $wp_customize->add_control( 'jot_shop_lay3_2url', array(
328
+ 'label' => __('url', 'jot-shop'),
329
+ 'section' => 'jot_shop_top_slider_section',
330
+ 'type' => 'text',
331
+ ));
332
+
333
+ $wp_customize->add_setting('jot_shop_lay3_adimg3', array(
334
+ 'default' => '',
335
+ 'capability' => 'edit_theme_options',
336
+ 'sanitize_callback' => 'jot_shop_sanitize_upload',
337
+ ));
338
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'jot_shop_lay3_adimg3', array(
339
+ 'label' => __('Image 3', 'jot-shop'),
340
+ 'section' => 'jot_shop_top_slider_section',
341
+ 'settings' => 'jot_shop_lay3_adimg3',
342
+ )));
343
+ $wp_customize->add_setting('jot_shop_lay3_3url', array(
344
+ 'default' =>'',
345
+ 'capability' => 'edit_theme_options',
346
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
347
+ ));
348
+ $wp_customize->add_control( 'jot_shop_lay3_3url', array(
349
+ 'label' => __('url', 'jot-shop'),
350
+ 'section' => 'jot_shop_top_slider_section',
351
+ 'type' => 'text',
352
+ ));
353
+ $wp_customize->add_setting('jot_shop_lay3_heading_txt', array(
354
+ 'default' =>__('Market','jot-shop'),
355
+ 'capability' => 'edit_theme_options',
356
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
357
+ 'transport' => 'postMessage',
358
+ ));
359
+ $wp_customize->add_control( 'jot_shop_lay3_heading_txt', array(
360
+ 'label' => __('category Heading', 'jot-shop'),
361
+ 'section' => 'jot_shop_top_slider_section',
362
+ 'type' => 'text',
363
+ ));
364
+ // Include category
365
+ if (class_exists( 'Jot_Shop_Customize_Control_Checkbox_Multiple')) {
366
+ $wp_customize->add_setting('jot_shop_include_category_slider', array(
367
+ 'default' => '',
368
+ 'sanitize_callback' => 'jot_shop_checkbox_explode'
369
+ ));
370
+ $wp_customize->add_control(new Jot_Shop_Customize_Control_Checkbox_Multiple(
371
+ $wp_customize,'jot_shop_include_category_slider', array(
372
+ 'settings'=> 'jot_shop_include_category_slider',
373
+ 'label' => __( 'Choose Categories To Include', 'jot-shop' ),
374
+ 'section' => 'jot_shop_top_slider_section',
375
+ 'choices' => jot_shop_get_category_id(array('taxonomy' =>'product_cat'),false),
376
+ )
377
+ ));
378
+
379
+ }
380
+
381
+ $wp_customize->add_setting( 'jot_shop_lay3_bg_background_image_url', array(
382
+ 'sanitize_callback' => 'esc_url',
383
+ 'transport' => 'postMessage',
384
+ ) );
385
+ $wp_customize->add_setting( 'jot_shop_lay3_bg_background_image_id', array(
386
+ 'sanitize_callback' => 'absint',
387
+ 'transport' => 'postMessage',
388
+ ) );
389
+
390
+ $wp_customize->add_setting( 'jot_shop_lay3_bg_background_repeat', array(
391
+ 'default' => 'no-repeat',
392
+ 'sanitize_callback' => 'sanitize_text_field',
393
+ 'transport' => 'postMessage',
394
+ ) );
395
+
396
+ $wp_customize->add_setting( 'jot_shop_lay3_bg_background_size', array(
397
+ 'default' => 'auto',
398
+ 'sanitize_callback' => 'sanitize_text_field',
399
+ 'transport' => 'postMessage',
400
+ ) );
401
+
402
+ $wp_customize->add_setting( 'jot_shop_lay3_bg_background_attach', array(
403
+ 'default' => 'scroll',
404
+ 'sanitize_callback' => 'sanitize_text_field',
405
+ 'transport' => 'postMessage',
406
+ ) );
407
+
408
+ $wp_customize->add_setting( 'jot_shop_lay3_bg_background_position', array(
409
+ 'default' => 'center center',
410
+ 'sanitize_callback' => 'sanitize_text_field',
411
+ 'transport' => 'postMessage',
412
+ ) );
413
+ // Registers example_background control
414
+ $wp_customize->add_control(
415
+ new Jot_Shop_Customize_Custom_Background_Control(
416
+ $wp_customize,
417
+ 'jot_shop_lay3_bg_img',
418
+ array(
419
+ 'label' => esc_html__( 'Background Image', 'jot-shop' ),
420
+ 'section' => 'jot_shop_top_slider_section',
421
+ 'settings' => array(
422
+ 'image_url' => 'jot_shop_lay3_bg_background_image_url',
423
+ 'image_id' => 'jot_shop_lay3_bg_background_image_id',
424
+ 'repeat' => 'jot_shop_lay3_bg_background_repeat', // Use false to hide the field
425
+ 'size' => 'jot_shop_lay3_bg_background_size',
426
+ 'position' => 'jot_shop_lay3_bg_background_position',
427
+ 'attach' => 'jot_shop_lay3_bg_background_attach'
428
+ )
429
+ )
430
+ )
431
+ );
432
+
433
+ $wp_customize->add_setting('jot_shop_lay3_bg_img_ovrly', array(
434
+ 'default' => '#eaeaea',
435
+ 'capability' => 'edit_theme_options',
436
+ 'transport' => 'postMessage',
437
+ 'sanitize_callback' => 'jot_shop_sanitize_color'
438
+ ));
439
+ $wp_customize->add_control(
440
+ new Jot_Shop_Customizer_Color_Control($wp_customize,'jot_shop_lay3_bg_img_ovrly', array(
441
+ 'label' => __('Slider Image Overlay Color', 'jot-shop' ),
442
+ 'section' => 'jot_shop_top_slider_section',
443
+ 'settings' => 'jot_shop_lay3_bg_img_ovrly',
444
+ ) ) );
445
+ $wp_customize->add_setting('jot_shop_top_slider_doc', array(
446
+ 'sanitize_callback' => 'jot_shop_sanitize_text',
447
+ ));
448
+ $wp_customize->add_control(new Jot_Shop_Misc_Control( $wp_customize, 'jot_shop_top_slider_doc',
449
+ array(
450
+ 'section' => 'jot_shop_top_slider_section',
451
+ 'type' => 'doc-link',
452
+ 'url' => 'https://themehunk.com/docs/jot-shop/#top-slider',
453
+ 'description' => esc_html__( 'To know more go with this', 'jot-shop' ),
454
+ 'priority' =>100,
455
+ )));
456
+
jot-shop/demo/import.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 jot_shop_import_files(){
6
+ return apply_filters(
7
+ 'jot_shop_demo_site', array(
8
+ array(
9
+ 'import_file_name' => esc_html__('Jot Shop Default','jot-shop'),
10
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/default/blog.xml'),
11
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/default/customizer.dat'),
12
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/default/widgets.wie'),
13
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/default/default.png'),
14
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/jot-shop/'),
15
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
16
+ ),
17
+ array(
18
+ 'import_file_name' => esc_html__('Jot Shop Groceries','jot-shop'),
19
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/groceries/blog.xml'),
20
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/groceries/customizer.dat'),
21
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/groceries/widgets.wie'),
22
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/groceries/groceries.png'),
23
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/bigstore-groceries/'),
24
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
25
+ ),
26
+ array(
27
+ 'import_file_name' => esc_html__('Jot Shop Electro','jot-shop'),
28
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/electro/blog.xml'),
29
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/electro/customizer.dat'),
30
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/electro/widgets.wie'),
31
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/jot-shop/electro/electro.png'),
32
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/jot-shop-electro/'),
33
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
34
+ ),
35
+ array(
36
+ 'import_file_name' => esc_html__('Gym Store','jot-shop'),
37
+ 'import_file_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/jot-shop/gym-store/blog.xml'),
38
+ 'import_customizer_file_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/jot-shop/gym-store/customizer.dat'),
39
+ 'import_widget_file_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/jot-shop/gym-store/widgets.wie'),
40
+ 'import_preview_image_url'=> esc_url('http://themehunk.com/wp-content/uploads/sites-demo/jot-shop/gym-store/gym-store.png'),
41
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/gym-store/'),
42
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
43
+ ),
44
+ )
45
+ );
46
+ }
47
+ add_filter( 'pt-ocdi/import_files', 'jot_shop_import_files');
48
+
49
+ /**
50
+ * OCDI after import.
51
+ *
52
+ * @since 1.0.0
53
+ */
54
+ function jot_shop_after_import(){
55
+
56
+ // Assign front page and posts page (blog page).
57
+ $front_page_id = null;
58
+ $blog_page_id = null;
59
+
60
+ $front_page = get_page_by_title( 'home' );
61
+
62
+ if ( $front_page ) {
63
+ if ( is_array( $front_page ) ){
64
+ $first_page = array_shift( $front_page );
65
+ $front_page_id = $first_page->ID;
66
+ } else {
67
+ $front_page_id = $front_page->ID;
68
+ }
69
+ }
70
+
71
+ $blog_page = get_page_by_title( 'blog' );
72
+
73
+ if ( $blog_page ) {
74
+ if ( is_array( $blog_page ) ) {
75
+ $first_page = array_shift( $blog_page );
76
+ $blog_page_id = $first_page->ID;
77
+ } else {
78
+ $blog_page_id = $blog_page->ID;
79
+ }
80
+ }
81
+
82
+ if ( $front_page_id && $blog_page_id ) {
83
+ update_option( 'show_on_front', 'page' );
84
+ update_option( 'page_on_front', $front_page_id );
85
+ update_option( 'page_for_posts', $blog_page_id );
86
+ }
87
+
88
+ // Assign navigation menu locations.
89
+ $menu_location_details = array(
90
+ 'jot-shop-above-menu' => 'frontpage',
91
+ 'jot-shop-main-menu' => 'frontpage',
92
+ 'jot-shop-footer-menu' => 'footer',
93
+ );
94
+
95
+ if ( ! empty( $menu_location_details ) ){
96
+ $navigation_settings = array();
97
+ $current_navigation_menus = wp_get_nav_menus();
98
+ if ( ! empty( $current_navigation_menus ) && ! is_wp_error( $current_navigation_menus ) ) {
99
+ foreach ( $current_navigation_menus as $menu ) {
100
+ foreach ( $menu_location_details as $location => $menu_slug ) {
101
+ if ( $menu->slug === $menu_slug ) {
102
+ $navigation_settings[ $location ] = $menu->term_id;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ set_theme_mod( 'nav_menu_locations', $navigation_settings );
108
+ }
109
+ }
110
+
111
+ add_action( 'pt-ocdi/after_import', 'jot_shop_after_import' );
jot-shop/include.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop-admin/jot-shop-shortcode.php' );
3
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop-admin/woo/jot-shop-admin.php' );
4
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop-admin/woo/woo-ajax.php' );
5
+ include_once( plugin_dir_path(__FILE__) . 'customizer/customizer.php' );
jot-shop/jot-shop-admin/jot-shop-shortcode.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+ function jot_shop_shortcode_template($section_name=''){
4
+ switch ($section_name){
5
+ case 'jot_shop_show_frontpage':
6
+ $section = array(
7
+ 'front-highlight',
8
+ 'front-tabproduct',
9
+ 'front-categoryslider',
10
+ 'front-ribbon',
11
+ 'front-productslider',
12
+ 'front-banner',
13
+ 'front-productlist',
14
+ );
15
+ foreach($section as $value):
16
+ require_once (THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'jot-shop/jot-shop-front-page/'.$value.'.php');
17
+ endforeach;
18
+ break;
19
+ }
20
+ }
21
+ function jot_shop_shortcodeid_data($atts){
22
+ $output = '';
23
+ $pull_quote_atts = shortcode_atts(array(
24
+ 'section' => ''
25
+ ), $atts);
26
+ $section_name = wp_kses_post($pull_quote_atts['section']);
27
+ $output = jot_shop_shortcode_template($section_name);
28
+ return $output;
29
+ }
30
+ add_shortcode('jot-shop', 'jot_shop_shortcodeid_data');
jot-shop/jot-shop-admin/woo/jot-shop-admin.php ADDED
@@ -0,0 +1,472 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!function_exists('jot_shop_product_query')){
3
+ function jot_shop_product_query($term_id,$prdct_optn){
4
+ $limit_product = get_theme_mod('jot_shop_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('jot_shop_product_slide_list_loop')){
26
+ /********************************/
27
+ //product slider loop
28
+ /********************************/
29
+ function jot_shop_product_slide_list_loop($term_id,$prdct_optn){
30
+ $args = jot_shop_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','jot-shop' );
58
+ }
59
+ wp_reset_query();
60
+ }
61
+ }
62
+
63
+ if(!function_exists('jot_shop_category_tab_list')){
64
+ /**********************************************
65
+ //Funtion Category list show
66
+ **********************************************/
67
+ function jot_shop_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...','jot-shop').'">•••</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('jot_shop_product_cat_filter_default_loop')){
151
+ /********************************/
152
+ //product cat filter loop
153
+ /********************************/
154
+ function jot_shop_product_cat_filter_default_loop($term_id,$prdct_optn){
155
+ global $product;
156
+ $args = jot_shop_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( 'jot_shop_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
+
203
+ <?php echo'<div class="add-to-cart">';
204
+ echo jot_shop_add_to_cart_url($product);
205
+ echo '</div>';
206
+ ?>
207
+
208
+ </div>
209
+
210
+ <div class="thunk-product-content">
211
+ <?php if (class_exists('TH_Variation_Swatches')) {
212
+ thvs_loop_available_attributes($product);
213
+ } ?>
214
+ <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>
215
+ </h2>
216
+ <?php
217
+ $rat_product = wc_get_product($pid);
218
+ $rating_count = $rat_product->get_rating_count();
219
+ $average = $rat_product->get_average_rating();
220
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
221
+ ?>
222
+
223
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
224
+ </div>
225
+ <div class="thunk-product-hover">
226
+ <?php
227
+ //echo jot_shop_add_to_cart_url($product);
228
+ if(get_theme_mod( 'jot_shop_woo_quickview_enable', true )){
229
+ ?>
230
+ <div class="thunk-quickview">
231
+ <span class="quik-view">
232
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
233
+ <span><?php _e('Quick View','jot-shop');?></span>
234
+ </a>
235
+ </span>
236
+ </div>
237
+ <?php }
238
+ if( ( class_exists( 'WPCleverWooscp' ))){
239
+ echo do_shortcode('[wooscp id='.$pid.']');
240
+ }
241
+ if( ( class_exists( 'YITH_Woocompare' ))){
242
+ echo jot_shop_add_to_compare_fltr($pid);
243
+ }
244
+ if( class_exists( 'YITH_WCWL' )){
245
+ jot_shop_whish_list($pid);
246
+ }
247
+ if( ( class_exists( 'WPCleverWoosw' ))){
248
+ echo do_shortcode('[woosw id='.$pid.']');
249
+ }
250
+
251
+ ?>
252
+
253
+ </div>
254
+ </div>
255
+ </div>
256
+ </div>
257
+ <?php }
258
+ } else {
259
+ echo __( 'No products found','jot-shop' );
260
+ }
261
+ wp_reset_query();
262
+ }
263
+ }
264
+ if(!function_exists('jot_shop_product_filter_loop')){
265
+ function jot_shop_product_filter_loop($args){
266
+ global $product;
267
+ $products = wc_get_products( $args );
268
+ if (!empty($products)) {
269
+ foreach ($products as $product) {
270
+ $pid = $product->get_id();
271
+ $hover_style = get_theme_mod( 'jot_shop_woo_product_animation' );
272
+ if('swap' === $hover_style){
273
+
274
+ $attachment_ids = $product->get_gallery_image_ids();
275
+ if(count($attachment_ids) > '0'){
276
+ $swapclasses='jot-shop-swap-item-hover product';
277
+ }
278
+ }elseif('slide' === $hover_style){
279
+
280
+ $attachment_ids = $product->get_gallery_image_ids();
281
+ if(count($attachment_ids) > '0'){
282
+ $swapclasses='jot-shop-slide-item-hover product';
283
+ }
284
+ } else{
285
+ $swapclasses='product';
286
+ }
287
+ ?>
288
+ <div <?php post_class($swapclasses,$pid); ?>>
289
+ <div class="thunk-product-wrap">
290
+ <div class="thunk-product">
291
+
292
+ <div class="thunk-product-image">
293
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
294
+ <?php $sale = get_post_meta( $pid, '_sale_price', true);
295
+ if( $sale) {
296
+ // Get product prices
297
+ $regular_price = (float) $product->get_regular_price(); // Regular price
298
+ $sale_price = (float) $product->get_price(); // Sale price
299
+ $saving_price = wc_price( $regular_price - $sale_price );
300
+ echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
301
+ }?>
302
+ <?php
303
+ echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' );
304
+ $hover_style = get_theme_mod( 'jot_shop_woo_product_animation' );
305
+ // the_post_thumbnail();
306
+ if ( 'swap' === $hover_style ){
307
+ $attachment_ids = $product->get_gallery_image_ids($pid);
308
+ if(!empty($attachment_ids)){
309
+
310
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
311
+ echo $category_product['glr'] = $glr;
312
+
313
+ }
314
+
315
+ }
316
+ if ( 'slide' === $hover_style ){
317
+ $attachment_ids = $product->get_gallery_image_ids($pid);
318
+ if(!empty($attachment_ids)){
319
+
320
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
321
+ echo $category_product['glr'] = $glr;
322
+
323
+ }
324
+
325
+ }
326
+ ?>
327
+ </a>
328
+
329
+ <?php echo'<div class="add-to-cart">';
330
+ echo jot_shop_add_to_cart_url($product);
331
+ echo '</div>';
332
+ ?>
333
+
334
+ </div>
335
+
336
+ <div class="thunk-product-content">
337
+ <?php if (class_exists('TH_Variation_Swatches')) {
338
+ thvs_loop_available_attributes($product);
339
+ } ?>
340
+ <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>
341
+ </h2>
342
+ <?php
343
+ $rat_product = wc_get_product($pid);
344
+ $rating_count = $rat_product->get_rating_count();
345
+ $average = $rat_product->get_average_rating();
346
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
347
+ ?>
348
+
349
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
350
+ </div>
351
+ <div class="thunk-product-hover">
352
+ <?php
353
+ //echo jot_shop_add_to_cart_url($product);
354
+ if(get_theme_mod( 'jot_shop_woo_quickview_enable', true )){
355
+ ?>
356
+ <div class="thunk-quickview">
357
+ <span class="quik-view">
358
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
359
+ <span><?php _e('Quick View','jot-shop');?></span>
360
+ </a>
361
+ </span>
362
+ </div>
363
+ <?php }
364
+ if( ( class_exists( 'WPCleverWooscp' ))){
365
+ echo do_shortcode('[wooscp id='.$pid.']');
366
+ }
367
+ if( ( class_exists( 'YITH_Woocompare' ))){
368
+ echo jot_shop_add_to_compare_fltr($pid);
369
+ }
370
+ if( class_exists( 'YITH_WCWL' )){
371
+ echo jot_shop_whish_list($pid);
372
+ }
373
+ if( ( class_exists( 'WPCleverWoosw' ))){
374
+ echo do_shortcode('[woosw id='.$pid.']');
375
+ }
376
+
377
+ ?>
378
+
379
+ </div>
380
+ </div>
381
+ </div>
382
+ </div>
383
+ <?php }
384
+ } else {
385
+ echo __( 'No products found','jot-shop' );
386
+ }
387
+ wp_reset_postdata();
388
+ }
389
+ }
390
+ if(!function_exists('jot_shop_product_list_categories_slider')){
391
+ function jot_shop_product_list_categories_slider( $args = '' ){
392
+ $term = get_theme_mod('jot_shop_include_category_slider','0');
393
+ if(!empty($term['0'])){
394
+ $include_id = $term;
395
+ }else{
396
+ $include_id = '';
397
+ }
398
+ $defaults = array(
399
+ 'child_of' => 0,
400
+ 'current_category' => 0,
401
+ 'depth' => 2,
402
+ 'echo' => 0,
403
+ 'exclude' => '',
404
+ 'exclude_tree' => '',
405
+ 'include' => esc_html($include_id),
406
+ 'feed' => '',
407
+ 'feed_image' => '',
408
+ 'feed_type' => '',
409
+ 'hide_empty' => 1,
410
+ 'hide_title_if_empty' => false,
411
+ 'hierarchical' => true,
412
+ 'order' => 'ASC',
413
+ 'orderby' => 'menu_order',
414
+ 'separator' => '<br />',
415
+ 'show_count' => 0,
416
+ 'show_option_all' => '',
417
+ 'show_option_none' => __( 'No categories','jot-shop' ),
418
+ 'style' => 'list',
419
+ 'taxonomy' => 'product_cat',
420
+ 'title_li' => '',
421
+ 'use_desc_for_title' => 0,
422
+ 'walker' => new Jot_Shop_List_Category_Images
423
+ );
424
+ $html = wp_list_categories($defaults);
425
+ echo '<ul class="thunk-product-cat-list slider" data-menu-style="vertical">'.$html.'</ul>';
426
+ }
427
+ // cLASS To fetch cat image
428
+ class Jot_Shop_List_Category_Images extends Walker_Category {
429
+ function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
430
+ $saved_data = get_term_meta( $category->term_id, 'thumbnail_id', true );
431
+ $image = wp_get_attachment_url( $saved_data);
432
+ $cat_name = apply_filters(
433
+ 'list_cats',
434
+ esc_attr( $category->name ),
435
+ $category
436
+ );
437
+ $link='';
438
+
439
+ $link.= '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
440
+ if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
441
+ $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
442
+ }
443
+
444
+ $link .= '>';
445
+ if(!empty($image)){
446
+ $link .='<img src="' . $image . '">';
447
+ }
448
+ $link .= $cat_name . '</a>';
449
+
450
+
451
+ if ( ! empty( $args['show_count'] ) ) {
452
+ $link .= ' (' . number_format_i18n( $category->count ) . ')';
453
+ }
454
+ if ( 'list' == $args['style'] ) {
455
+ $output .= "\t<li";
456
+ $class = 'cat-item cat-item-' . $category->term_id;
457
+ if ( ! empty( $args['current_category'] ) ) {
458
+ $_current_category = get_term( $args['current_category'], $category->taxonomy );
459
+ if ( $category->term_id == $args['current_category'] ) {
460
+ $class .= ' current-cat';
461
+ } elseif ( $category->term_id == $_current_category->parent ) {
462
+ $class .= ' current-cat-parent';
463
+ }
464
+ }
465
+ $output .= ' class="' . $class . '"';
466
+ $output .= ">$link\n";
467
+ } else {
468
+ $output .= "\t$link<br />\n";
469
+ }
470
+ }
471
+ }
472
+ }
jot-shop/jot-shop-admin/woo/woo-ajax.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!function_exists('jot_shop_cat_filter_ajax')){
3
+ /***************************/
4
+ //category product section product ajax filter
5
+ /***************************/
6
+
7
+ add_action('wp_ajax_jot_shop_cat_filter_ajax', 'jot_shop_cat_filter_ajax');
8
+ add_action('wp_ajax_nopriv_jot_shop_cat_filter_ajax', 'jot_shop_cat_filter_ajax');
9
+ function jot_shop_cat_filter_ajax(){
10
+ if(isset($_POST['data_cat_slug'])){
11
+ $prdct_optn = get_theme_mod('jot_shop_category_optn','recent');
12
+ $args = jot_shop_product_query(sanitize_key($_POST['data_cat_slug']),$prdct_optn);
13
+ jot_shop_product_filter_loop($args);
14
+ }
15
+ exit;
16
+ }
17
+ }
jot-shop/jot-shop-front-page/front-banner.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_banner_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-banner-section">
7
+ <?php jot_shop_display_customizer_shortcut('jot_shop_banner'); ?>
8
+ <div class="content-wrap">
9
+ <?php jot_shop_front_banner(); ?>
10
+ </div>
11
+ </section>
jot-shop/jot-shop-front-page/front-categoryslider.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_category_slide_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+
7
+ <section class="thunk-category-slide-section">
8
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_cat_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('jot_shop_cat_slider_heading','Woo Category'));?></span>
13
+ </h4>
14
+ </div>
15
+ </div>
16
+ <div class="content-wrap">
17
+ <?php if(get_theme_mod('jot_shop_cat_slide_layout','cat-layout-1')=='cat-layout-1'):?>
18
+ <div class="thunk-slide thunk-cat-slide owl-carousel">
19
+ <?php
20
+ if( taxonomy_exists( 'product_cat' ) ){
21
+ $term_id = get_theme_mod('jot_shop_category_slide_list');
22
+ // category filter
23
+ $args = array(
24
+
25
+ 'orderby' => 'menu_order',
26
+ 'order' => 'ASC',
27
+ 'hide_empty' => 1,
28
+ 'slug' => $term_id
29
+ );
30
+
31
+ $product_categories = get_terms( 'product_cat', $args );
32
+
33
+ $count = count($product_categories);
34
+
35
+ $category_list = $cate_product = '';
36
+ if ( $count > 0 ){
37
+ foreach ( $product_categories as $product_category ){
38
+ //global $product;
39
+ $category_product = array();
40
+ $term_link = get_term_link( $product_category, 'product_cat' );
41
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
42
+ $image = wp_get_attachment_url( $thumbnail_id );
43
+
44
+ $current_class = '';
45
+
46
+ $category_list .='<div class="thunk-category">
47
+ <div class="thunk-cat-box">
48
+ <a href="'.$term_link.'">
49
+ <img src="' . $image . '" alt="" />
50
+ </a>
51
+ </div>
52
+ <div class="thunk-cat-text">
53
+ <div class="thunk-cat-title">
54
+ <a href="'.$term_link.'"><span class="title">'.$product_category->name. '</span></a>
55
+ </div>
56
+
57
+ </div>
58
+
59
+ </div>';
60
+ }
61
+ echo $category_list;
62
+ }
63
+ }
64
+
65
+ ?>
66
+ </div>
67
+ <?php elseif(get_theme_mod('jot_shop_cat_slide_layout')=='cat-layout-2'):?>
68
+ <div class="cat-wrap cat-layout-2">
69
+ <div class="cat-content">
70
+ <?php
71
+ if( taxonomy_exists( 'product_cat' ) ){
72
+ $term_id = get_theme_mod('jot_shop_category_slide_list');
73
+ // category filter
74
+ $args = array(
75
+
76
+ 'orderby' => 'title',
77
+ 'order' => 'ASC',
78
+ 'hide_empty' => 1,
79
+ 'slug' => $term_id
80
+ );
81
+
82
+ $product_categories = get_terms( 'product_cat', $args );
83
+
84
+ $count = count($product_categories);
85
+
86
+ $category_list = $cate_product = '';
87
+ if ( $count > 0 ){
88
+ foreach ( $product_categories as $product_category ){
89
+ //global $product;
90
+ $category_product = array();
91
+ $term_link = get_term_link( $product_category, 'product_cat' );
92
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
93
+ $image = wp_get_attachment_url( $thumbnail_id );
94
+ $current_class = '';
95
+ $category_list .='<div class="cat-list">
96
+ <a href="'.esc_url($term_link).'">
97
+ <img src="'.esc_url($image).'">
98
+ <span>'.esc_html($product_category->name).'</span>
99
+ </a>
100
+ </div>';
101
+ }
102
+ echo $category_list;
103
+ }
104
+ }
105
+ ?>
106
+ </div>
107
+ </div>
108
+ <?php elseif(get_theme_mod('jot_shop_cat_slide_layout')=='cat-layout-3'):?>
109
+ <div class="cat-wrap cat-layout-3">
110
+ <div class="cat-content-3">
111
+
112
+
113
+
114
+ <?php
115
+ if( taxonomy_exists( 'product_cat' ) ){
116
+ $term_id = get_theme_mod('jot_shop_category_slide_list');
117
+ // category filter
118
+ $args = array(
119
+
120
+ 'orderby' => 'title',
121
+ 'order' => 'ASC',
122
+ 'hide_empty' => 1,
123
+ 'slug' => $term_id
124
+ );
125
+
126
+ $product_categories = get_terms( 'product_cat', $args );
127
+
128
+ $count = count($product_categories);
129
+
130
+ $category_list = $cate_product = '';
131
+ if ( $count > 0 ){
132
+ foreach ( $product_categories as $product_category ){
133
+ //global $product;
134
+ $category_product = array();
135
+ $term_link = get_term_link( $product_category, 'product_cat' );
136
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
137
+ $image = wp_get_attachment_url( $thumbnail_id );
138
+ $current_class = '';
139
+ $category_list .='<div class="cat-col">
140
+ <div class="cat-col-wrap">
141
+ <img src="'.esc_url($image).'">
142
+ <div class="hover-area">
143
+ <span class="cat-title">'.esc_html($product_category->name).'</span>
144
+ <div class="prd-total-number"><span class="item">'.$product_category->count.esc_html('Product','jot-shop').'</span></div>
145
+ </div>
146
+ <a href="'.esc_url($term_link).'"> </a>
147
+ </div></div>';
148
+ }
149
+ echo $category_list;
150
+ }
151
+ }
152
+ ?>
153
+ </div>
154
+ </div>
155
+ <?php endif;?>
156
+ </div>
157
+ </section>
jot-shop/jot-shop-front-page/front-highlight.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_highlight_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-highlight-section">
7
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_highlight' ); ?>
8
+ <div class="content-wrap">
9
+ <div class="thunk-highlight-feature-wrap">
10
+ <?php
11
+ $default = Jot_Shop_Defaults_Models::instance()->get_feature_default();
12
+ jot_shop_highlight_content('jot_shop_highlight_content', $default);
13
+ ?>
14
+ </div>
15
+ </div>
16
+ </section>
jot-shop/jot-shop-front-page/front-productlist.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_product_list_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-list-section">
7
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_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('jot_shop_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('jot_shop_product_list_cat');
19
+ $prdct_optn = get_theme_mod('jot_shop_product_list_optn','recent');
20
+ jot_shop_product_slide_list_loop($term_id,$prdct_optn);
21
+ ?>
22
+ </div>
23
+ </div>
24
+ </section>
jot-shop/jot-shop-front-page/front-productslider.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_product_slide_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+
7
+ <section class="thunk-product-slide-section">
8
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_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('jot_shop_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('jot_shop_product_slider_cat');
20
+ $prdct_optn = get_theme_mod('jot_shop_product_slide_optn','recent');
21
+ jot_shop_product_cat_filter_default_loop($term_id,$prdct_optn);
22
+ ?>
23
+ </div>
24
+ </div>
25
+ </section>
jot-shop/jot-shop-front-page/front-ribbon.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_ribbon_sec',false) == true){
3
+ return;
4
+ }
5
+ if(get_theme_mod('jot_shop_ribbon_background','image')=='image'){
6
+ ?>
7
+ <section class="thunk-ribbon-section bg-image">
8
+
9
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_ribbon' ); ?>
10
+ <div class="content-wrap">
11
+ <div class="thunk-ribbon-content">
12
+ <div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('jot_shop_ribbon_text','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.')); ?></h3></div>
13
+ <?php if(get_theme_mod('jot_shop_ribbon_btn_text','Call To Action')!==''):?>
14
+ <div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('jot_shop_ribbon_btn_link',''));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('jot_shop_ribbon_btn_text','Call To Action'));?></a></div>
15
+ <?php endif; ?>
16
+ </div>
17
+ </div>
18
+ </section>
19
+ <?php }elseif(get_theme_mod('jot_shop_ribbon_background','image')=='video'){
20
+
21
+ $jot_shop_youtube_video_link = get_theme_mod('jot_shop_youtube_video_link',''); ?>
22
+ <section class="thunk-ribbon-section">
23
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_ribbon' ); ?>
24
+ <div class="content-wrap">
25
+ <?php if ($jot_shop_youtube_video_link != '') { ?>
26
+ <div class="th-youtube-video">
27
+ <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($jot_shop_youtube_video_link); ?>?autoplay=1&amp;controls=0&amp;rel=0&amp;playsinline=1&amp;enablejsapi=1"></iframe>
28
+ </div>
29
+ <?php } ?>
30
+ <div class="thunk-ribbon-content">
31
+ <div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('jot_shop_ribbon_text','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.')); ?></h3></div>
32
+ <?php if(get_theme_mod('jot_shop_ribbon_btn_text','Call To Action')!==''):?>
33
+ <div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('jot_shop_ribbon_btn_link',''));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('jot_shop_ribbon_btn_text','Call To Action'));?></a></div>
34
+ <?php endif; ?>
35
+ </div>
36
+ </div>
37
+ </section>
38
+ <?php }?>
jot-shop/jot-shop-front-page/front-tabproduct.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_cat_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-tab-section">
7
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_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('jot_shop_cat_tab_heading','Tabbed Product Carousel'));?></span>
15
+ </h4>
16
+ </div>
17
+ <!-- tab head start -->
18
+ <?php $term_id = get_theme_mod('jot_shop_category_tab_list');
19
+ jot_shop_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('jot_shop_category_tab_list');
28
+ $prdct_optn = get_theme_mod('jot_shop_category_optn','recent');
29
+ jot_shop_product_cat_filter_default_loop($term_id,$prdct_optn);
30
+ ?>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </section>
jot-shop/jot-shop-front-page/front-topslider.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('jot_shop_disable_top_slider_sec',false) == true){
3
+ return;
4
+ }
5
+ $jot_shop_top_slide_layout = get_theme_mod('jot_shop_top_slide_layout','slide-layout-1');
6
+ ?>
7
+ <section class="thunk-slider-section <?php echo esc_attr($jot_shop_top_slide_layout);?>">
8
+
9
+ <?php
10
+
11
+ if($jot_shop_top_slide_layout =='slide-layout-3'):
12
+ ?>
13
+ <?php jot_shop_display_customizer_shortcut( 'jot_shop_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','jot-shop');?></a>
19
+ </div>
20
+ <?php jot_shop_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 jot_shop_top_slider_2_content('jot_shop_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('jot_shop_lay3_url'));?>"><img src="<?php echo esc_url(get_theme_mod('jot_shop_lay3_adimg'));?>"></a>
33
+ </div>
34
+ <div class="thunk-row">
35
+ <a href="<?php echo esc_url(get_theme_mod('jot_shop_lay3_2url'));?>"><img src="<?php echo esc_url(get_theme_mod('jot_shop_lay3_adimg2'));?>"></a>
36
+ </div>
37
+ <div class="thunk-row"><a href="<?php echo esc_url(get_theme_mod('jot_shop_lay3_3url'));?>"><img src="<?php echo esc_url(get_theme_mod('jot_shop_lay3_adimg3'));?>"></a>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ </div>
45
+ </div>
46
+
47
+ <?php elseif($jot_shop_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 jot_shop_top_slider_multi_content('jot_shop_top_slide_content', ''); ?>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <?php elseif($jot_shop_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('jot_shop_lay2_url'));?>"><img src="<?php echo esc_url(get_theme_mod('jot_shop_lay2_adimg'));?>"></a>
63
+ </div>
64
+ <div class="thunk-row"><a href="<?php echo esc_url(get_theme_mod('jot_shop_lay2_url2'));?>"><img src="<?php echo esc_url(get_theme_mod('jot_shop_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 jot_shop_top_slider_2_content('jot_shop_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('jot_shop_lay2_url3'));?>"><img src="<?php echo esc_url(get_theme_mod('jot_shop_lay2_adimg3'));?>"></a>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <?php elseif($jot_shop_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 jot_shop_top_slider_2_content('jot_shop_top_slide_content', ''); ?>
88
+ </div>
89
+ </div>
90
+
91
+ </div>
92
+ <?php elseif($jot_shop_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 jot_shop_top_slider_6_content('jot_shop_top_slide_content6', ''); ?>
98
+ </div>
99
+
100
+
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+ <?php elseif($jot_shop_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 jot_shop_top_slider_9_content('jot_shop_top_slide_content', ''); ?>
111
+ </div>
112
+ </div>
113
+
114
+ </div>
115
+
116
+ <?php endif; ?>
117
+
118
+ </section>
m-shop/customizer/customizer.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * all customizer setting includeed
4
+ *
5
+ * @param
6
+ * @return mixed|string
7
+ */
8
+ function m_shop_plugin_customize_register( $wp_customize ){
9
+ //Front Page
10
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/top-slider.php';
11
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/category-tab.php';
12
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/product-slide.php';
13
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/category-slider.php';
14
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/product-list.php';
15
+
16
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/ribbon.php';
17
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/banner.php';
18
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/higlight.php';
19
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/tab-productimage.php';
20
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/testimonial.php';
21
+ require THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/customizer/section/frontpage/blog.php';
22
+ }
23
+ add_action('customize_register','m_shop_plugin_customize_register');
m-shop/customizer/section/frontpage/banner.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_banner_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_banner_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_banner',
10
+ 'settings' => 'm_shop_disable_banner_sec',
11
+ ) ) );
12
+ // choose col layout
13
+ if(class_exists('M_Shop_WP_Customize_Control_Radio_Image')){
14
+ $wp_customize->add_setting(
15
+ 'm_shop_banner_layout', array(
16
+ 'default' => 'bnr-two',
17
+ 'sanitize_callback' => 'm_shop_sanitize_radio',
18
+ )
19
+ );
20
+ $wp_customize->add_control(
21
+ new M_Shop_WP_Customize_Control_Radio_Image(
22
+ $wp_customize, 'm_shop_banner_layout', array(
23
+ 'label' => esc_html__( 'Layout', 'm-shop' ),
24
+ 'section' => 'm_shop_banner',
25
+ 'choices' => array(
26
+ 'bnr-one' => array(
27
+ 'url' => M_SHOP_BANNER_IMG_LAYOUT_1,
28
+ ),
29
+ 'bnr-two' => array(
30
+ 'url' => M_SHOP_BANNER_IMG_LAYOUT_2,
31
+ ),
32
+ 'bnr-three' => array(
33
+ 'url' => M_SHOP_BANNER_IMG_LAYOUT_3,
34
+ ),
35
+ 'bnr-four' => array(
36
+ 'url' => M_SHOP_BANNER_IMG_LAYOUT_4,
37
+ ),
38
+ 'bnr-five' => array(
39
+ 'url' => M_SHOP_BANNER_IMG_LAYOUT_5,
40
+ ),
41
+ 'bnr-six' => array(
42
+ 'url' => M_SHOP_BANNER_IMG_LAYOUT_6,
43
+ ),
44
+
45
+ ),
46
+ )
47
+ )
48
+ );
49
+ }
50
+ // first image
51
+ $wp_customize->add_setting('m_shop_bnr_1_img', array(
52
+ 'default' => '',
53
+ 'capability' => 'edit_theme_options',
54
+ 'sanitize_callback' => 'm_shop_sanitize_upload',
55
+ ));
56
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'm_shop_bnr_1_img', array(
57
+ 'label' => __('Image 1', 'm-shop'),
58
+ 'section' => 'm_shop_banner',
59
+ 'settings' => 'm_shop_bnr_1_img',
60
+ )));
61
+
62
+ // first url
63
+ $wp_customize->add_setting('m_shop_bnr_1_url', array(
64
+ 'default' =>'',
65
+ 'capability' => 'edit_theme_options',
66
+ 'sanitize_callback' => 'm_shop_sanitize_text',
67
+ ));
68
+ $wp_customize->add_control( 'm_shop_bnr_1_url', array(
69
+ 'label' => __('url', 'm-shop'),
70
+ 'section' => 'm_shop_banner',
71
+ 'type' => 'text',
72
+ ));
73
+ // second image
74
+ $wp_customize->add_setting('m_shop_bnr_2_img', array(
75
+ 'default' => '',
76
+ 'capability' => 'edit_theme_options',
77
+ 'sanitize_callback' => 'm_shop_sanitize_upload',
78
+ ));
79
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'm_shop_bnr_2_img', array(
80
+ 'label' => __('Image 2', 'm-shop'),
81
+ 'section' => 'm_shop_banner',
82
+ 'settings' => 'm_shop_bnr_2_img',
83
+ )));
84
+
85
+ // second url
86
+ $wp_customize->add_setting('m_shop_bnr_2_url', array(
87
+ 'default' =>'',
88
+ 'capability' => 'edit_theme_options',
89
+ 'sanitize_callback' => 'm_shop_sanitize_text',
90
+ ));
91
+ $wp_customize->add_control( 'm_shop_bnr_2_url', array(
92
+ 'label' => __('url', 'm-shop'),
93
+ 'section' => 'm_shop_banner',
94
+ 'type' => 'text',
95
+ ));
96
+
97
+ // third image
98
+ $wp_customize->add_setting('m_shop_bnr_3_img', array(
99
+ 'default' => '',
100
+ 'capability' => 'edit_theme_options',
101
+ 'sanitize_callback' => 'm_shop_sanitize_upload',
102
+ ));
103
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'm_shop_bnr_3_img', array(
104
+ 'label' => __('Image 3', 'm-shop'),
105
+ 'section' => 'm_shop_banner',
106
+ 'settings' => 'm_shop_bnr_3_img',
107
+ )));
108
+
109
+ // third url
110
+ $wp_customize->add_setting('m_shop_bnr_3_url', array(
111
+ 'default' =>'',
112
+ 'capability' => 'edit_theme_options',
113
+ 'sanitize_callback' => 'm_shop_sanitize_text',
114
+ ));
115
+ $wp_customize->add_control( 'm_shop_bnr_3_url', array(
116
+ 'label' => __('url', 'm-shop'),
117
+ 'section' => 'm_shop_banner',
118
+ 'type' => 'text',
119
+ ));
120
+
121
+
122
+ // fourth image
123
+ $wp_customize->add_setting('m_shop_bnr_4_img', array(
124
+ 'default' => '',
125
+ 'capability' => 'edit_theme_options',
126
+ 'sanitize_callback' => 'm_shop_sanitize_upload',
127
+ ));
128
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'm_shop_bnr_4_img', array(
129
+ 'label' => __('Image 4', 'm-shop'),
130
+ 'section' => 'm_shop_banner',
131
+ 'settings' => 'm_shop_bnr_4_img',
132
+ )));
133
+ $wp_customize->add_setting('m_shop_bnr_4_url', array(
134
+ 'default' =>'',
135
+ 'capability' => 'edit_theme_options',
136
+ 'sanitize_callback' => 'm_shop_sanitize_text',
137
+ ));
138
+ $wp_customize->add_control( 'm_shop_bnr_4_url', array(
139
+ 'label' => __('url', 'm-shop'),
140
+ 'section' => 'm_shop_banner',
141
+ 'type' => 'text',
142
+ ));
143
+
144
+ // fifth image
145
+ $wp_customize->add_setting('m_shop_bnr_5_img', array(
146
+ 'default' => '',
147
+ 'capability' => 'edit_theme_options',
148
+ 'sanitize_callback' => 'm_shop_sanitize_upload',
149
+ ));
150
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'm_shop_bnr_5_img', array(
151
+ 'label' => __('Image 5', 'm-shop'),
152
+ 'section' => 'm_shop_banner',
153
+ 'settings' => 'm_shop_bnr_5_img',
154
+ )));
155
+ $wp_customize->add_setting('m_shop_bnr_5_url', array(
156
+ 'default' =>'',
157
+ 'capability' => 'edit_theme_options',
158
+ 'sanitize_callback' => 'm_shop_sanitize_text',
159
+ ));
160
+ $wp_customize->add_control( 'm_shop_bnr_5_url', array(
161
+ 'label' => __('url', 'm-shop'),
162
+ 'section' => 'm_shop_banner',
163
+ 'type' => 'text',
164
+ ));
165
+
166
+ $wp_customize->add_setting('m_shop_bnr_doc', array(
167
+ 'sanitize_callback' => 'm_shop_sanitize_text',
168
+ ));
169
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_bnr_doc',
170
+ array(
171
+ 'section' => 'm_shop_banner',
172
+ 'type' => 'doc-link',
173
+ 'url' => 'https://themehunk.com/docs/m-shop/#banner-section',
174
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
175
+ 'priority' =>100,
176
+ )));
m-shop/customizer/section/frontpage/blog.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_blog_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_blog_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'priority' => 1,
10
+ 'section' => 'm_shop_blog',
11
+ 'settings' => 'm_shop_disable_blog_sec',
12
+ ) ) );
13
+
14
+ $wp_customize->add_setting('m_shop_blog_heading', array(
15
+ 'default' => __('Blog','m-shop'),
16
+ 'capability' => 'edit_theme_options',
17
+ 'sanitize_callback' => 'm_shop_sanitize_text',
18
+ 'transport' => 'postMessage',
19
+ ));
20
+ $wp_customize->add_control( 'm_shop_blog_heading', array(
21
+ 'label' => __('Section Heading', 'm-shop'),
22
+ 'section' => 'm_shop_blog',
23
+ 'type' => 'text',
24
+ ));
25
+
26
+
27
+ //control setting for select options
28
+ function m_shop_post_category_list($arr='',$all=true){
29
+ $cats = array();
30
+ if($all == true){
31
+ $cats[0] = 'All Categories';
32
+ }
33
+ foreach ( get_categories($arr) as $categories => $category ){
34
+ $cats[$category->slug] = $category->name;
35
+ }
36
+ return $cats;
37
+ }
38
+ $wp_customize->add_setting('m_shop_blog_slider_cat', array(
39
+ 'default' => 0,
40
+ 'sanitize_callback' => 'm_shop_sanitize_select',
41
+ ) );
42
+ $wp_customize->add_control( 'm_shop_blog_slider_cat', array(
43
+ 'label' => __('Select Category','m-shop'),
44
+ 'section' => 'm_shop_blog',
45
+ 'type' => 'select',
46
+ 'choices' => m_shop_post_category_list(),
47
+ ) );
48
+
49
+ $wp_customize->add_setting('m_shop_post_show', array(
50
+ 'default' =>'4',
51
+ 'capability' => 'edit_theme_options',
52
+ 'sanitize_callback' => 'm_shop_sanitize_text',
53
+
54
+ ));
55
+ $wp_customize->add_control( 'm_shop_post_show', array(
56
+ 'label' => __('No. of Post to Show', 'm-shop'),
57
+ 'section' => 'm_shop_blog',
58
+ 'type' => 'number',
59
+ ));
m-shop/customizer/section/frontpage/category-slider.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_category_slide_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_category_slide_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_cat_slide_section',
10
+ 'settings' => 'm_shop_disable_category_slide_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ $wp_customize->add_setting('m_shop_cat_slider_heading', array(
15
+ 'default' => __('Woo Category','m-shop'),
16
+ 'capability' => 'edit_theme_options',
17
+ 'sanitize_callback' => 'm_shop_sanitize_text',
18
+ 'transport' => 'postMessage',
19
+ ));
20
+ $wp_customize->add_control( 'm_shop_cat_slider_heading', array(
21
+ 'label' => __('Section Heading', 'm-shop'),
22
+ 'section' => 'm_shop_cat_slide_section',
23
+ 'type' => 'text',
24
+ ));
25
+ /*****************/
26
+ // category layout
27
+ /*****************/
28
+ if(class_exists('M_Shop_WP_Customize_Control_Radio_Image')){
29
+ $wp_customize->add_setting(
30
+ 'm_shop_cat_slide_layout', array(
31
+ 'default' => 'cat-layout-1',
32
+ 'sanitize_callback' => 'm_shop_sanitize_radio',
33
+ )
34
+ );
35
+ $wp_customize->add_control(
36
+ new M_Shop_WP_Customize_Control_Radio_Image(
37
+ $wp_customize, 'm_shop_cat_slide_layout', array(
38
+ 'label' => esc_html__( 'Category Layout', 'm-shop' ),
39
+ 'section' => 'm_shop_cat_slide_section',
40
+ 'choices' => array(
41
+ 'cat-layout-1' => array(
42
+ 'url' => M_SHOP_CAT_SLIDER_LAYOUT_1,
43
+ ),
44
+ 'cat-layout-2' => array(
45
+ 'url' => M_SHOP_CAT_SLIDER_LAYOUT_2,
46
+ ),
47
+ 'cat-layout-3' => array(
48
+ 'url' => M_SHOP_CAT_SLIDER_LAYOUT_3,
49
+ ),
50
+
51
+ ),
52
+ )
53
+ )
54
+ );
55
+ }
56
+ //= Choose All Category =
57
+ if (class_exists( 'M_Shop_Customize_Control_Checkbox_Multiple')) {
58
+ $wp_customize->add_setting('m_shop_category_slide_list', array(
59
+ 'default' => '',
60
+ 'sanitize_callback' => 'm_shop_checkbox_explode'
61
+ ));
62
+ $wp_customize->add_control(new M_Shop_Customize_Control_Checkbox_Multiple(
63
+ $wp_customize,'m_shop_category_slide_list', array(
64
+ 'settings'=> 'm_shop_category_slide_list',
65
+ 'label' => __( 'Choose Categories To Show', 'm-shop' ),
66
+ 'section' => 'm_shop_cat_slide_section',
67
+ 'choices' => m_shop_get_category_list(array('taxonomy' =>'product_cat'),true),
68
+ )
69
+ ));
70
+
71
+ }
72
+ $wp_customize->add_setting('m_shop_cat_item_no', array(
73
+ 'default' =>10,
74
+ 'capability' => 'edit_theme_options',
75
+ 'sanitize_callback' =>'m_shop_sanitize_number',
76
+ )
77
+ );
78
+ $wp_customize->add_control('m_shop_cat_item_no', array(
79
+ 'type' => 'number',
80
+ 'section' => 'm_shop_cat_slide_section',
81
+ 'label' => __( 'No. of Column to show', 'm-shop' ),
82
+ 'input_attrs' => array(
83
+ 'min' => 4,
84
+ 'step' => 1,
85
+ 'max' => 10,
86
+ ),
87
+ )
88
+ );
89
+ // Add an option to disable the logo.
90
+ $wp_customize->add_setting( 'm_shop_category_slider_optn', array(
91
+ 'default' => false,
92
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
93
+ ) );
94
+ $wp_customize->add_control( new M_Shop_Toggle_Control( $wp_customize, 'm_shop_category_slider_optn', array(
95
+ 'label' => esc_html__( 'Slide Auto Play', 'm-shop' ),
96
+ 'section' => 'm_shop_cat_slide_section',
97
+ 'type' => 'toggle',
98
+ 'settings' => 'm_shop_category_slider_optn',
99
+ ) ) );
100
+ $wp_customize->add_setting('m_shop_category_slider_speed', array(
101
+ 'default' =>'3000',
102
+ 'capability' => 'edit_theme_options',
103
+ 'sanitize_callback' => 'm_shop_sanitize_number',
104
+ ));
105
+ $wp_customize->add_control( 'm_shop_category_slider_speed', array(
106
+ 'label' => __('Speed', 'm-shop'),
107
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','m-shop'),
108
+ 'section' => 'm_shop_cat_slide_section',
109
+ 'type' => 'number',
110
+ ));
111
+
112
+
113
+ $wp_customize->add_setting('m_shop_category_slider_doc', array(
114
+ 'sanitize_callback' => 'm_shop_sanitize_text',
115
+ ));
116
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_category_slider_doc',
117
+ array(
118
+ 'section' => 'm_shop_cat_slide_section',
119
+ 'type' => 'doc-link',
120
+ 'url' => 'https://themehunk.com/docs/m-shop/#woo-category',
121
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
122
+ 'priority' =>100,
123
+ )));
m-shop/customizer/section/frontpage/category-tab.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_cat_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_cat_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_category_tab_section',
10
+ 'settings' => 'm_shop_disable_cat_sec',
11
+ ) ) );
12
+ // section heading
13
+ $wp_customize->add_setting('m_shop_cat_tab_heading', array(
14
+ 'default' => __('Tabbed Product Carousel','m-shop'),
15
+ 'capability' => 'edit_theme_options',
16
+ 'sanitize_callback' => 'm_shop_sanitize_text',
17
+ 'transport' => 'postMessage',
18
+ ));
19
+ $wp_customize->add_control( 'm_shop_cat_tab_heading', array(
20
+ 'label' => __('Section Heading', 'm-shop'),
21
+ 'section' => 'm_shop_category_tab_section',
22
+ 'type' => 'text',
23
+ ));
24
+ //= Choose All Category =
25
+ if (class_exists( 'M_Shop_Customize_Control_Checkbox_Multiple')) {
26
+ $wp_customize->add_setting('m_shop_category_tab_list', array(
27
+ 'default' => '',
28
+ 'sanitize_callback' => 'm_shop_checkbox_explode'
29
+ ));
30
+ $wp_customize->add_control(new M_Shop_Customize_Control_Checkbox_Multiple(
31
+ $wp_customize,'m_shop_category_tab_list', array(
32
+ 'settings'=> 'm_shop_category_tab_list',
33
+ 'label' => __( 'Choose Categories To Show', 'm-shop' ),
34
+ 'section' => 'm_shop_category_tab_section',
35
+ 'choices' => m_shop_get_category_list(array('taxonomy' =>'product_cat'),true),
36
+ )
37
+ ));
38
+
39
+ }
40
+
41
+ $wp_customize->add_setting('m_shop_category_optn', array(
42
+ 'default' => 'recent',
43
+ 'capability' => 'edit_theme_options',
44
+ 'sanitize_callback' => 'm_shop_sanitize_select',
45
+ ));
46
+ $wp_customize->add_control( 'm_shop_category_optn', array(
47
+ 'settings' => 'm_shop_category_optn',
48
+ 'label' => __('Choose Option','m-shop'),
49
+ 'section' => 'm_shop_category_tab_section',
50
+ 'type' => 'select',
51
+ 'choices' => array(
52
+ 'recent' => __('Recent','m-shop'),
53
+ 'featured' => __('Featured','m-shop'),
54
+ 'random' => __('Random','m-shop'),
55
+
56
+ ),
57
+ ));
58
+
59
+ $wp_customize->add_setting( 'm_shop_single_row_slide_cat', array(
60
+ 'default' => false,
61
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
62
+ ) );
63
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_single_row_slide_cat', array(
64
+ 'label' => esc_html__('Enable Single Row Slide', 'm-shop'),
65
+ 'type' => 'checkbox',
66
+ 'section' => 'm_shop_category_tab_section',
67
+ 'settings' => 'm_shop_single_row_slide_cat',
68
+ ) ) );
69
+
70
+
71
+ // Add an option to disable the logo.
72
+ $wp_customize->add_setting( 'm_shop_cat_slider_optn', array(
73
+ 'default' => false,
74
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
75
+ ) );
76
+ $wp_customize->add_control( new M_Shop_Toggle_Control( $wp_customize, 'm_shop_cat_slider_optn', array(
77
+ 'label' => esc_html__( 'Slide Auto Play', 'm-shop' ),
78
+ 'section' => 'm_shop_category_tab_section',
79
+ 'type' => 'toggle',
80
+ 'settings' => 'm_shop_cat_slider_optn',
81
+ ) ) );
82
+ $wp_customize->add_setting('m_shop_cat_slider_speed', array(
83
+ 'default' =>'3000',
84
+ 'capability' => 'edit_theme_options',
85
+ 'sanitize_callback' => 'm_shop_sanitize_number',
86
+ ));
87
+ $wp_customize->add_control( 'm_shop_cat_slider_speed', array(
88
+ 'label' => __('Speed', 'm-shop'),
89
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','m-shop'),
90
+ 'section' => 'm_shop_category_tab_section',
91
+ 'type' => 'number',
92
+ ));
93
+
94
+ $wp_customize->add_setting('m_shop_cat_tab_slider_doc', array(
95
+ 'sanitize_callback' => 'm_shop_sanitize_text',
96
+ ));
97
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_cat_tab_slider_doc',
98
+ array(
99
+ 'section' => 'm_shop_category_tab_section',
100
+ 'type' => 'doc-link',
101
+ 'url' => 'https://themehunk.com/docs/m-shop/#tabbed-product',
102
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
103
+ 'priority' =>100,
104
+ )));
m-shop/customizer/section/frontpage/higlight.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_highlight_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_highlight_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_highlight',
10
+ 'settings' => 'm_shop_disable_highlight_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ // $wp_customize->add_setting('m_shop_hglgt_heading', array(
15
+ // 'default' => __('Highlight Feature','m-shop'),
16
+ // 'capability' => 'edit_theme_options',
17
+ // 'sanitize_callback' => 'm_shop_sanitize_text',
18
+ // 'transport' => 'postMessage',
19
+ // ));
20
+ // $wp_customize->add_control( 'm_shop_hglgt_heading', array(
21
+ // 'label' => __('Section Heading', 'm-shop'),
22
+ // 'section' => 'm_shop_highlight',
23
+ // 'type' => 'text',
24
+ // ));
25
+
26
+ //Highlight Content Via Repeater
27
+ if ( class_exists( 'M_Shop_Repeater' ) ) {
28
+ $wp_customize->add_setting(
29
+ 'm_shop_highlight_content', array(
30
+ 'sanitize_callback' => 'm_shop_repeater_sanitize',
31
+ 'default' => M_Shop_Defaults_Models::instance()->get_feature_default(),
32
+ )
33
+ );
34
+
35
+ $wp_customize->add_control(
36
+ new M_Shop_Repeater(
37
+ $wp_customize, 'm_shop_highlight_content', array(
38
+ 'label' => esc_html__( 'Highlight Content', 'm-shop' ),
39
+ 'section' => 'm_shop_highlight',
40
+ 'priority' => 15,
41
+ 'add_field_label' => esc_html__( 'Add new Feature', 'm-shop' ),
42
+ 'item_name' => esc_html__( 'Feature', 'm-shop' ),
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
+ ),'M_Shop_Ship_Repeater'
58
+ )
59
+ );
60
+ }
61
+
62
+
63
+ $wp_customize->add_setting('m_shop_highlight_doc', array(
64
+ 'sanitize_callback' => 'm_shop_sanitize_text',
65
+ ));
66
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_highlight_doc',
67
+ array(
68
+ 'section' => 'm_shop_highlight',
69
+ 'type' => 'doc-link',
70
+ 'url' => 'https://themehunk.com/docs/m-shop/#highlight-section',
71
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
72
+ 'priority' =>100,
73
+ )));
m-shop/customizer/section/frontpage/product-list.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_product_list_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_product_list_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_product_slide_list',
10
+ 'settings' => 'm_shop_disable_product_list_sec',
11
+ ) ) );
12
+ // section heading
13
+ $wp_customize->add_setting('m_shop_product_list_heading', array(
14
+ 'default' => __('Product List Carousel','m-shop'),
15
+ 'capability' => 'edit_theme_options',
16
+ 'sanitize_callback' => 'm_shop_sanitize_text',
17
+ 'transport' => 'postMessage',
18
+ ));
19
+ $wp_customize->add_control( 'm_shop_product_list_heading', array(
20
+ 'label' => __('Section Heading', 'm-shop'),
21
+ 'section' => 'm_shop_product_slide_list',
22
+ 'type' => 'text',
23
+ ));
24
+ //control setting for select options
25
+ $wp_customize->add_setting('m_shop_product_list_cat', array(
26
+ 'default' => 0,
27
+ 'sanitize_callback' => 'm_shop_sanitize_select',
28
+ ) );
29
+ $wp_customize->add_control( 'm_shop_product_list_cat', array(
30
+ 'label' => __('Select Category','m-shop'),
31
+ 'section' => 'm_shop_product_slide_list',
32
+ 'type' => 'select',
33
+ 'choices' => m_shop_product_category_list(array('taxonomy' =>'product_cat'),true),
34
+ ) );
35
+
36
+ $wp_customize->add_setting('m_shop_product_list_optn', array(
37
+ 'default' => 'recent',
38
+ 'capability' => 'edit_theme_options',
39
+ 'sanitize_callback' => 'm_shop_sanitize_select',
40
+ ));
41
+ $wp_customize->add_control('m_shop_product_list_optn', array(
42
+ 'settings' => 'm_shop_product_list_optn',
43
+ 'label' => __('Choose Option','m-shop'),
44
+ 'section' => 'm_shop_product_slide_list',
45
+ 'type' => 'select',
46
+ 'choices' => array(
47
+ 'recent' => __('Recent','m-shop'),
48
+ 'featured' => __('Featured','m-shop'),
49
+ 'random' => __('Random','m-shop'),
50
+ ),
51
+ ));
52
+
53
+ $wp_customize->add_setting( 'm_shop_single_row_prdct_list', array(
54
+ 'default' => false,
55
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
56
+ ) );
57
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_single_row_prdct_list', array(
58
+ 'label' => esc_html__('Enable Single Row Slide', 'm-shop'),
59
+ 'type' => 'checkbox',
60
+ 'section' => 'm_shop_product_slide_list',
61
+ 'settings' => 'm_shop_single_row_prdct_list',
62
+ ) ) );
63
+
64
+
65
+ // Add an option to disable the logo.
66
+ $wp_customize->add_setting( 'm_shop_product_list_slide_optn', array(
67
+ 'default' => false,
68
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
69
+ ) );
70
+ $wp_customize->add_control( new M_Shop_Toggle_Control( $wp_customize, 'm_shop_product_list_slide_optn', array(
71
+ 'label' => esc_html__( 'Slide Auto Play', 'm-shop' ),
72
+ 'section' => 'm_shop_product_slide_list',
73
+ 'type' => 'toggle',
74
+ 'settings' => 'm_shop_product_list_slide_optn',
75
+ ) ) );
76
+ $wp_customize->add_setting('m_shop_product_list_slide_speed', array(
77
+ 'default' =>'3000',
78
+ 'capability' => 'edit_theme_options',
79
+ 'sanitize_callback' => 'm_shop_sanitize_number',
80
+ ));
81
+ $wp_customize->add_control( 'm_shop_product_list_slide_speed', array(
82
+ 'label' => __('Speed', 'm-shop'),
83
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','m-shop'),
84
+ 'section' => 'm_shop_product_slide_list',
85
+ 'type' => 'number',
86
+ ));
87
+
88
+ $wp_customize->add_setting('m_shop_product_list_slide_doc', array(
89
+ 'sanitize_callback' => 'm_shop_sanitize_text',
90
+ ));
91
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_product_list_slide_doc',
92
+ array(
93
+ 'section' => 'm_shop_product_slide_list',
94
+ 'type' => 'doc-link',
95
+ 'url' => 'https://themehunk.com/docs/m-shop/#product-list',
96
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
97
+ 'priority' =>100,
98
+ )));
m-shop/customizer/section/frontpage/product-slide.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function m_shop_product_category_list($arr='',$all=true){
3
+ $cats = array();
4
+ if($all == true){
5
+ $cats[0] = 'All Categories';
6
+ }
7
+ foreach ( get_categories($arr) as $categories => $category ){
8
+ $cats[$category->slug] = $category->name;
9
+ }
10
+ return $cats;
11
+ }
12
+ $wp_customize->add_setting( 'm_shop_disable_product_slide_sec', array(
13
+ 'default' => false,
14
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
15
+ ) );
16
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_product_slide_sec', array(
17
+ 'label' => esc_html__('Disable Section', 'm-shop'),
18
+ 'type' => 'checkbox',
19
+ 'section' => 'm_shop_product_slide_section',
20
+ 'settings' => 'm_shop_disable_product_slide_sec',
21
+ ) ) );
22
+ // section heading
23
+ $wp_customize->add_setting('m_shop_product_slider_heading', array(
24
+ 'default' => __('Product Carousel','m-shop'),
25
+ 'capability' => 'edit_theme_options',
26
+ 'sanitize_callback' => 'm_shop_sanitize_text',
27
+ 'transport' => 'postMessage',
28
+ ));
29
+ $wp_customize->add_control( 'm_shop_product_slider_heading', array(
30
+ 'label' => __('Section Heading', 'm-shop'),
31
+ 'section' => 'm_shop_product_slide_section',
32
+ 'type' => 'text',
33
+ ));
34
+
35
+ //control setting for select options
36
+ $wp_customize->add_setting('m_shop_product_slider_cat', array(
37
+ 'default' => 0,
38
+ 'sanitize_callback' => 'm_shop_sanitize_select',
39
+ ) );
40
+ $wp_customize->add_control( 'm_shop_product_slider_cat', array(
41
+ 'label' => __('Select Category','m-shop'),
42
+ 'section' => 'm_shop_product_slide_section',
43
+ 'type' => 'select',
44
+ 'choices' => m_shop_product_category_list(array('taxonomy' =>'product_cat'),true),
45
+ ) );
46
+
47
+ $wp_customize->add_setting('m_shop_product_slide_optn', array(
48
+ 'default' => 'recent',
49
+ 'capability' => 'edit_theme_options',
50
+ 'sanitize_callback' => 'm_shop_sanitize_select',
51
+ ));
52
+ $wp_customize->add_control( 'm_shop_product_slide_optn', array(
53
+ 'settings' => 'm_shop_product_slide_optn',
54
+ 'label' => __('Choose Option','m-shop'),
55
+ 'section' => 'm_shop_product_slide_section',
56
+ 'type' => 'select',
57
+ 'choices' => array(
58
+ 'recent' => __('Recent','m-shop'),
59
+ 'featured' => __('Featured','m-shop'),
60
+ 'random' => __('Random','m-shop'),
61
+
62
+ ),
63
+ ));
64
+
65
+ $wp_customize->add_setting( 'm_shop_single_row_prdct_slide', array(
66
+ 'default' => false,
67
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
68
+ ) );
69
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_single_row_prdct_slide', array(
70
+ 'label' => esc_html__('Enable Single Row Slide', 'm-shop'),
71
+ 'type' => 'checkbox',
72
+ 'section' => 'm_shop_product_slide_section',
73
+ 'settings' => 'm_shop_single_row_prdct_slide',
74
+ ) ) );
75
+
76
+
77
+ // Add an option to disable the logo.
78
+ $wp_customize->add_setting( 'm_shop_product_slider_optn', array(
79
+ 'default' => false,
80
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
81
+ ) );
82
+ $wp_customize->add_control( new M_Shop_Toggle_Control( $wp_customize, 'm_shop_product_slider_optn', array(
83
+ 'label' => esc_html__( 'Slide Auto Play', 'm-shop' ),
84
+ 'section' => 'm_shop_product_slide_section',
85
+ 'type' => 'toggle',
86
+ 'settings' => 'm_shop_product_slider_optn',
87
+ ) ) );
88
+ $wp_customize->add_setting('m_shop_product_slider_speed', array(
89
+ 'default' =>'3000',
90
+ 'capability' => 'edit_theme_options',
91
+ 'sanitize_callback' => 'm_shop_sanitize_number',
92
+ ));
93
+ $wp_customize->add_control( 'm_shop_product_slider_speed', array(
94
+ 'label' => __('Speed', 'm-shop'),
95
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','m-shop'),
96
+ 'section' => 'm_shop_product_slide_section',
97
+ 'type' => 'number',
98
+ ));
99
+
100
+
101
+ $wp_customize->add_setting('m_shop_product_slider_doc', array(
102
+ 'sanitize_callback' => 'm_shop_sanitize_text',
103
+ ));
104
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_product_slider_doc',
105
+ array(
106
+ 'section' => 'm_shop_product_slide_section',
107
+ 'type' => 'doc-link',
108
+ 'url' => 'https://themehunk.com/docs/m-shop/#product-carousel',
109
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
110
+ 'priority' =>100,
111
+ )));
m-shop/customizer/section/frontpage/ribbon.php ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_ribbon_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_ribbon_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'priority' => 1,
10
+ 'section' => 'm_shop_ribbon',
11
+ 'settings' => 'm_shop_disable_ribbon_sec',
12
+ ) ) );
13
+
14
+ $wp_customize->add_setting('m_shop_ribbon_background', array(
15
+ 'default' => 'image',
16
+ 'sanitize_callback' => 'm_shop_sanitize_select',
17
+ ) );
18
+ $wp_customize->add_control( new M_Shop_Customizer_Buttonset_Control( $wp_customize, 'm_shop_ribbon_background', array(
19
+ 'label' => esc_html__( 'Choose Ribbon Background', 'm-shop' ),
20
+ 'priority' => 2,
21
+ 'section' => 'm_shop_ribbon',
22
+ 'settings' => 'm_shop_ribbon_background',
23
+ 'choices' => array(
24
+ 'image' => esc_html__( 'Image', 'm-shop' ),
25
+ 'video' => esc_html__( 'Video', 'm-shop' ),
26
+ ),
27
+ ) ) );
28
+ $wp_customize->add_setting( 'm_shop_ribbon_bg_img_url', array(
29
+ 'sanitize_callback' => 'esc_url',
30
+ 'transport' => 'postMessage',
31
+ ) );
32
+ $wp_customize->add_setting( 'm_shop_ribbon_bg_img_id', array(
33
+ 'sanitize_callback' => 'absint',
34
+ 'transport' => 'postMessage',
35
+ ) );
36
+
37
+ $wp_customize->add_setting( 'm_shop_ribbon_bg_background_repeat', array(
38
+ 'default' => 'no-repeat',
39
+ 'sanitize_callback' => 'sanitize_text_field',
40
+ 'transport' => 'postMessage',
41
+ ) );
42
+
43
+ $wp_customize->add_setting( 'm_shop_ribbon_bg_background_size', array(
44
+ 'default' => 'auto',
45
+ 'sanitize_callback' => 'sanitize_text_field',
46
+ 'transport' => 'postMessage',
47
+ ) );
48
+
49
+ $wp_customize->add_setting( 'm_shop_ribbon_bg_background_attach', array(
50
+ 'default' => 'scroll',
51
+ 'sanitize_callback' => 'sanitize_text_field',
52
+ 'transport' => 'postMessage',
53
+ ) );
54
+
55
+ $wp_customize->add_setting( 'm_shop_ribbon_bg_background_position', array(
56
+ 'default' => 'center center',
57
+ 'sanitize_callback' => 'sanitize_text_field',
58
+ 'transport' => 'postMessage',
59
+ ) );
60
+ // Registers example_background control
61
+ $wp_customize->add_control(
62
+ new M_Shop_Customize_Custom_Background_Control(
63
+ $wp_customize,
64
+ 'm_shop_ribbon_bg_background_image',
65
+ array(
66
+ 'label' => esc_html__( 'Background Image', 'm-shop' ),
67
+ 'section' => 'm_shop_ribbon',
68
+ 'priority' => 2,
69
+ 'settings' => array(
70
+ 'image_url' => 'm_shop_ribbon_bg_img_url',
71
+ 'image_id' => 'm_shop_ribbon_bg_img_id',
72
+ 'repeat' => 'm_shop_ribbon_bg_background_repeat', // Use false to hide the field
73
+ 'size' => 'm_shop_ribbon_bg_background_size',
74
+ 'position' => 'm_shop_ribbon_bg_background_position',
75
+ 'attach' => 'm_shop_ribbon_bg_background_attach'
76
+ )
77
+ )
78
+ )
79
+ );
80
+
81
+ $wp_customize->add_setting('m_shop_ribbon_bg_video', array(
82
+ 'default' => '',
83
+ 'sanitize_callback' => 'sanitize_text_field'
84
+ ));
85
+ $wp_customize->add_control( new WP_Customize_Image_Control(
86
+ $wp_customize, 'm_shop_ribbon_bg_video', array(
87
+ 'label' => __('Upload Background Video', 'oneline'),
88
+ 'section' => 'm_shop_ribbon',
89
+ 'settings' => 'm_shop_ribbon_bg_video',
90
+ )));
91
+ $wp_customize->add_setting('m_shop_ribbon_video_poster_image', array(
92
+ 'default' => '',
93
+ 'sanitize_callback' => 'sanitize_text_field'
94
+ ));
95
+ $wp_customize->add_control( new WP_Customize_Image_Control(
96
+ $wp_customize, 'm_shop_ribbon_video_poster_image', array(
97
+ 'label' => __('Upload Video Poster Image', 'oneline'),
98
+ 'section' => 'm_shop_ribbon',
99
+ 'settings' => 'm_shop_ribbon_video_poster_image',
100
+ )));
101
+
102
+ $wp_customize->add_setting('m_shop_ribbon_text', array(
103
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.',
104
+ 'capability' => 'edit_theme_options',
105
+ 'sanitize_callback' => 'm_shop_sanitize_textarea',
106
+ 'transport' => 'postMessage',
107
+
108
+ ));
109
+ $wp_customize->add_control('m_shop_ribbon_text', array(
110
+ 'label' => __('Text', 'm-shop'),
111
+ 'section' => 'm_shop_ribbon',
112
+ 'settings' => 'm_shop_ribbon_text',
113
+ 'type' => 'textarea',
114
+ ));
115
+
116
+ $wp_customize->add_setting('m_shop_ribbon_btn_text', array(
117
+ 'default' => 'Call To Action',
118
+ 'capability' => 'edit_theme_options',
119
+ 'sanitize_callback' => 'm_shop_sanitize_text',
120
+ 'transport' => 'postMessage',
121
+
122
+ ));
123
+ $wp_customize->add_control('m_shop_ribbon_btn_text', array(
124
+ 'label' => __('Button Text', 'm-shop'),
125
+ 'section' => 'm_shop_ribbon',
126
+ 'settings' => 'm_shop_ribbon_btn_text',
127
+ 'type' => 'text',
128
+ ));
129
+
130
+ $wp_customize->add_setting('m_shop_ribbon_btn_link', array(
131
+ 'default' => '#',
132
+ 'capability' => 'edit_theme_options',
133
+ 'sanitize_callback' => 'm_shop_sanitize_text',
134
+
135
+ ));
136
+ $wp_customize->add_control('m_shop_ribbon_btn_link', array(
137
+ 'label' => __('Button Link', 'm-shop'),
138
+ 'section' => 'm_shop_ribbon',
139
+ 'settings' => 'm_shop_ribbon_btn_link',
140
+ 'type' => 'text',
141
+ ));
142
+ if ( class_exists( 'M_Shop_WP_Customizer_Range_Value_Control' ) ){
143
+ $wp_customize->add_setting(
144
+ 'm_shop_ribbon_top_padding', array(
145
+ 'sanitize_callback' => 'm_shop_sanitize_range_value',
146
+ 'default' => '1.8',
147
+ 'transport' => 'postMessage',
148
+ )
149
+ );
150
+ $wp_customize->add_control(
151
+ new M_Shop_WP_Customizer_Range_Value_Control(
152
+ $wp_customize, 'm_shop_ribbon_top_padding', array(
153
+ 'label' => esc_html__( 'Top Padding', 'm-shop' ),
154
+ 'section' => 'm_shop_ribbon',
155
+ 'type' => 'range-value',
156
+ 'input_attr' => array(
157
+ 'min' => 0,
158
+ 'max' => 50,
159
+ 'step' => 0.1,
160
+ ),
161
+ 'media_query' => true,
162
+ 'sum_type' => true,
163
+ )
164
+ )
165
+ );
166
+ $wp_customize->add_setting(
167
+ 'm_shop_ribbon_btm_padding', array(
168
+ 'sanitize_callback' => 'm_shop_sanitize_range_value',
169
+ 'default' => '1.8',
170
+ 'transport' => 'postMessage',
171
+ )
172
+ );
173
+ $wp_customize->add_control(
174
+ new M_Shop_WP_Customizer_Range_Value_Control(
175
+ $wp_customize, 'm_shop_ribbon_btm_padding', array(
176
+ 'label' => esc_html__( 'Bottom Padding', 'm-shop' ),
177
+ 'section' => 'm_shop_ribbon',
178
+ 'type' => 'range-value',
179
+ 'input_attr' => array(
180
+ 'min' => 0,
181
+ 'max' => 50,
182
+ 'step' => 0.1,
183
+ ),
184
+ 'media_query' => true,
185
+ 'sum_type' => true,
186
+ )
187
+ )
188
+ );
189
+ }
190
+
191
+ $wp_customize->add_setting('m_shop_ribbon_doc', array(
192
+ 'sanitize_callback' => 'm_shop_sanitize_text',
193
+ ));
194
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_ribbon_doc',
195
+ array(
196
+ 'section' => 'm_shop_ribbon',
197
+ 'type' => 'doc-link',
198
+ 'url' => 'https://themehunk.com/docs/m-shop/#ribbon-section',
199
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
200
+ 'priority' =>100,
201
+ )));
m-shop/customizer/section/frontpage/tab-productimage.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_product_img_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_product_img_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_product_tab_image',
10
+ 'settings' => 'm_shop_disable_product_img_sec',
11
+ ) ) );
12
+
13
+ // section heading
14
+ $wp_customize->add_setting('m_shop_product_img_sec_heading', array(
15
+ 'default' => __('Product Tab Image Carousel','m-shop'),
16
+ 'capability' => 'edit_theme_options',
17
+ 'sanitize_callback' => 'm_shop_sanitize_text',
18
+ 'transport' => 'postMessage',
19
+ ));
20
+ $wp_customize->add_control( 'm_shop_product_img_sec_heading', array(
21
+ 'label' => __('Section Heading', 'm-shop'),
22
+ 'section' => 'm_shop_product_tab_image',
23
+ 'type' => 'text',
24
+ ));
25
+
26
+ //= Choose All Category =
27
+ if (class_exists( 'M_Shop_Customize_Control_Checkbox_Multiple')){
28
+ $wp_customize->add_setting('m_shop_product_img_sec_cat_list', array(
29
+ 'default' => '',
30
+ 'sanitize_callback' => 'm_shop_checkbox_explode'
31
+ ));
32
+ $wp_customize->add_control(new M_Shop_Customize_Control_Checkbox_Multiple(
33
+ $wp_customize,'m_shop_product_img_sec_cat_list', array(
34
+ 'settings'=> 'm_shop_product_img_sec_cat_list',
35
+ 'label' => __( 'Choose Categories To Show', 'm-shop' ),
36
+ 'section' => 'm_shop_product_tab_image',
37
+ 'choices' => m_shop_get_category_list(array('taxonomy' =>'product_cat'),true),
38
+ )
39
+ ));
40
+
41
+ }
42
+
43
+ $wp_customize->add_setting('m_shop_product_img_sec_optn', array(
44
+ 'default' => 'recent',
45
+ 'capability' => 'edit_theme_options',
46
+ 'sanitize_callback' => 'm_shop_sanitize_select',
47
+ ));
48
+ $wp_customize->add_control( 'm_shop_product_img_sec_optn', array(
49
+ 'settings' => 'm_shop_product_img_sec_optn',
50
+ 'label' => __('Choose Option','open-mart'),
51
+ 'section' => 'm_shop_product_tab_image',
52
+ 'type' => 'select',
53
+ 'choices' => array(
54
+ 'recent' => __('Recent','m-shop'),
55
+ 'featured' => __('Featured','m-shop'),
56
+ 'random' => __('Random','m-shop'),
57
+
58
+ ),
59
+ ));
60
+
61
+ // Add an option to disable the logo.
62
+ $wp_customize->add_setting( 'm_shop_product_img_sec_slider_optn', array(
63
+ 'default' => false,
64
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
65
+ ) );
66
+ $wp_customize->add_control( new m_shop_Toggle_Control( $wp_customize, 'm_shop_product_img_sec_slider_optn', array(
67
+ 'label' => esc_html__( 'Slide Auto Play', 'm-shop' ),
68
+ 'section' => 'm_shop_product_tab_image',
69
+ 'type' => 'toggle',
70
+ 'settings' => 'm_shop_product_img_sec_slider_optn',
71
+ ) ) );
72
+
73
+ $wp_customize->add_setting('m_shop_product_img_sec_adimg', array(
74
+ 'default' => '',
75
+ 'capability' => 'edit_theme_options',
76
+ 'sanitize_callback' => 'm_shop_sanitize_upload',
77
+ ));
78
+ $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'm_shop_product_img_sec_adimg', array(
79
+ 'label' => __('Upload Image', 'm-shop'),
80
+ 'section' => 'm_shop_product_tab_image',
81
+ 'settings' => 'm_shop_product_img_sec_adimg',
82
+ )));
83
+
84
+ $wp_customize->add_setting('m_shop_product_img_sec_side', array(
85
+ 'default' => 'left',
86
+ 'capability' => 'edit_theme_options',
87
+ 'sanitize_callback' => 'm_shop_sanitize_select',
88
+ ));
89
+ $wp_customize->add_control( 'm_shop_product_img_sec_side', array(
90
+ 'settings' => 'm_shop_product_img_sec_side',
91
+ 'label' => __('PLace Image On','m-shop'),
92
+ 'section' => 'm_shop_product_tab_image',
93
+ 'type' => 'select',
94
+ 'choices' => array(
95
+ 'left' => __('Left','m-shop'),
96
+ 'right' => __('Right','m-shop'),
97
+
98
+ ),
99
+ ));
100
+ $wp_customize->add_setting( 'm_shop_product_img_sec_single_row_slide', array(
101
+ 'default' => true,
102
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
103
+ ) );
104
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_product_img_sec_single_row_slide', array(
105
+ 'label' => esc_html__('Enable Single Row Slide', 'm-shop'),
106
+ 'type' => 'checkbox',
107
+ 'section' => 'm_shop_product_tab_image',
108
+ 'settings' => 'm_shop_product_img_sec_single_row_slide',
109
+ ) ) );
110
+ $wp_customize->add_setting('m_shop_product_img_sec_doc', array(
111
+ 'sanitize_callback' => 'm_shop_sanitize_text',
112
+ ));
113
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_product_img_sec_doc',
114
+ array(
115
+ 'section' => 'm_shop_product_tab_image',
116
+ 'type' => 'doc-link',
117
+ 'url' => 'https://themehunk.com/docs/m-shop/#product-tab',
118
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
119
+ 'priority' =>100,
120
+ )));
m-shop/customizer/section/frontpage/testimonial.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_testimonial_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_testimonial_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'priority' => 1,
10
+ 'section' => 'm_shop_testimonial',
11
+ 'settings' => 'm_shop_disable_testimonial_sec',
12
+ ) ) );
13
+
14
+ //Testimonials Content Via Repeater
15
+ if ( class_exists( 'M_Shop_Repeater' ) ){
16
+ $wp_customize->add_setting(
17
+ 'm_shop_testimonials_content', array(
18
+ 'default' => M_Shop_Defaults_Models::instance()->get_testimonials_default(),
19
+ 'sanitize_callback' => 'm_shop_repeater_sanitize',
20
+ )
21
+ );
22
+ $wp_customize->add_control(
23
+ new M_Shop_Repeater(
24
+ $wp_customize, 'm_shop_testimonials_content', array(
25
+ 'label' => esc_html__( 'Testimonials Content', 'm-shop' ),
26
+ 'section' => 'm_shop_testimonial',
27
+ 'priority' => 15,
28
+ 'add_field_label' => esc_html__( 'Add new Testimonial', 'm-shop' ),
29
+ 'item_name' => esc_html__( 'Testimonial', 'm-shop' ),
30
+ 'customizer_repeater_icon_control' => false,
31
+ 'customizer_repeater_image_control' => true,
32
+ 'customizer_repeater_title_control' => true,
33
+ 'customizer_repeater_price_control' => false,
34
+ 'customizer_repeater_subtitle_control' => true,
35
+ 'customizer_repeater_text_control' => true,
36
+ 'customizer_repeater_text2_control' => false,
37
+ 'customizer_repeater_link_control' => true,
38
+ 'customizer_repeater_repeater_control' => false,
39
+ 'customizer_repeater_color_control' => false,
40
+ ),'m_shop_Testimonial_Repeater'
41
+ )
42
+ );
43
+ }
m-shop/customizer/section/frontpage/top-slider.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $wp_customize->add_setting( 'm_shop_disable_top_slider_sec', array(
3
+ 'default' => false,
4
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
5
+ ) );
6
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'm_shop_disable_top_slider_sec', array(
7
+ 'label' => esc_html__('Disable Section', 'm-shop'),
8
+ 'type' => 'checkbox',
9
+ 'section' => 'm_shop_top_slider_section',
10
+ 'settings' => 'm_shop_disable_top_slider_sec',
11
+ ) ) );
12
+
13
+ if(class_exists('M_Shop_WP_Customize_Control_Radio_Image')){
14
+ $wp_customize->add_setting(
15
+ 'm_shop_top_slide_layout', array(
16
+ 'default' => 'slide-layout-1',
17
+ 'sanitize_callback' => 'm_shop_sanitize_radio',
18
+ )
19
+ );
20
+ $wp_customize->add_control(
21
+ new M_Shop_WP_Customize_Control_Radio_Image(
22
+ $wp_customize, 'm_shop_top_slide_layout', array(
23
+ 'label' => esc_html__( 'Slider Layout', 'm-shop' ),
24
+ 'section' => 'm_shop_top_slider_section',
25
+ 'choices' => array(
26
+ 'slide-layout-1' => array(
27
+ 'url' => M_SHOP_SLIDER_LAYOUT_1,
28
+ ),
29
+ 'slide-layout-6' => array(
30
+ 'url' => M_SHOP_SLIDER_LAYOUT_6,
31
+ ),
32
+ 'slide-layout-2' => array(
33
+ 'url' => M_SHOP_SLIDER_LAYOUT_2,
34
+ ),
35
+ 'slide-layout-3' => array(
36
+ 'url' => M_SHOP_SLIDER_LAYOUT_3,
37
+ ),
38
+ 'slide-layout-4' => array(
39
+ 'url' => M_SHOP_SLIDER_LAYOUT_4,
40
+ ),
41
+ 'slide-layout-5' => array(
42
+ 'url' => M_SHOP_SLIDER_LAYOUT_5,
43
+ ),
44
+ ),
45
+ )
46
+ )
47
+ );
48
+ }
49
+ //Slider Content Via Repeater
50
+ if ( class_exists( 'M_Shop_Repeater' ) ){
51
+ $wp_customize->add_setting(
52
+ 'm_shop_top_slide_content', array(
53
+ 'sanitize_callback' => 'm_shop_repeater_sanitize',
54
+ 'default' => '',
55
+ )
56
+ );
57
+ $wp_customize->add_control(
58
+ new M_Shop_Repeater(
59
+ $wp_customize, 'm_shop_top_slide_content', array(
60
+ 'label' => esc_html__( 'Slide Content', 'm-shop' ),
61
+ 'section' => 'm_shop_top_slider_section',
62
+ 'add_field_label' => esc_html__( 'Add new Slide', 'm-shop' ),
63
+ 'item_name' => esc_html__( 'Slide', 'm-shop' ),
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
+ ),'m_shop_top_slide_content'
75
+ )
76
+ );
77
+ }
78
+
79
+
80
+ // Add an option to disable the logo.
81
+ $wp_customize->add_setting( 'm_shop_top_slider_optn', array(
82
+ 'default' => false,
83
+ 'sanitize_callback' => 'm_shop_sanitize_checkbox',
84
+ ) );
85
+ $wp_customize->add_control( new M_Shop_Toggle_Control( $wp_customize, 'm_shop_top_slider_optn', array(
86
+ 'label' => esc_html__( 'Slide Auto Play', 'm-shop' ),
87
+ 'section' => 'm_shop_top_slider_section',
88
+ 'type' => 'toggle',
89
+ 'settings' => 'm_shop_top_slider_optn',
90
+ ) ) );
91
+
92
+ $wp_customize->add_setting('m_shop_slider_speed', array(
93
+ 'default' =>'3000',
94
+ 'capability' => 'edit_theme_options',
95
+ 'sanitize_callback' => 'm_shop_sanitize_number',
96
+ ));
97
+ $wp_customize->add_control( 'm_shop_slider_speed', array(
98
+ 'label' => __('Speed', 'm-shop'),
99
+ 'description' =>__('Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000','m-shop'),
100
+ 'section' => 'm_shop_top_slider_section',
101
+ 'type' => 'number',
102
+ ));
103
+
104
+ $wp_customize->add_setting('m_shop_top_slider_doc', array(
105
+ 'sanitize_callback' => 'm_shop_sanitize_text',
106
+ ));
107
+ $wp_customize->add_control(new M_Shop_Misc_Control( $wp_customize, 'm_shop_top_slider_doc',
108
+ array(
109
+ 'section' => 'm_shop_top_slider_section',
110
+ 'type' => 'doc-link',
111
+ 'url' => 'https://themehunk.com/docs/m-shop/#top-slider',
112
+ 'description' => esc_html__( 'To know more go with this', 'm-shop' ),
113
+ 'priority' =>100,
114
+ )));
m-shop/demo/import.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 m_shop_import_files(){
6
+ return apply_filters(
7
+ 'm_shop_demo_site', array(
8
+ array(
9
+ 'import_file_name' => esc_html__('M Shop Default','m-shop'),
10
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/default/blog.xml'),
11
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/default/customizer.dat'),
12
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/default/widgets.wie'),
13
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/default/default.png'),
14
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/m-shop/'),
15
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'm-shop' ),
16
+ ),
17
+ array(
18
+ 'import_file_name' => esc_html__('Ice Cream Store','m-shop'),
19
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/ice-cream/blog.xml'),
20
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/ice-cream/customizer.dat'),
21
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/ice-cream/widgets.wie'),
22
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/m-shop/ice-cream/ice-cream.png'),
23
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/ice-cream-store/'),
24
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'm-shop' ),
25
+ ),
26
+
27
+ )
28
+ );
29
+ }
30
+ add_filter( 'pt-ocdi/import_files', 'm_shop_import_files');
31
+
32
+ /**
33
+ * OCDI after import.
34
+ *
35
+ * @since 1.0.0
36
+ */
37
+ function m_shop_after_import(){
38
+
39
+ // Assign front page and posts page (blog page).
40
+ $front_page_id = null;
41
+ $blog_page_id = null;
42
+
43
+ $front_page = get_page_by_title( 'home' );
44
+
45
+ if ( $front_page ) {
46
+ if ( is_array( $front_page ) ){
47
+ $first_page = array_shift( $front_page );
48
+ $front_page_id = $first_page->ID;
49
+ } else {
50
+ $front_page_id = $front_page->ID;
51
+ }
52
+ }
53
+
54
+ $blog_page = get_page_by_title( 'blog' );
55
+
56
+ if ( $blog_page ) {
57
+ if ( is_array( $blog_page ) ) {
58
+ $first_page = array_shift( $blog_page );
59
+ $blog_page_id = $first_page->ID;
60
+ } else {
61
+ $blog_page_id = $blog_page->ID;
62
+ }
63
+ }
64
+
65
+ if ( $front_page_id && $blog_page_id ) {
66
+ update_option( 'show_on_front', 'page' );
67
+ update_option( 'page_on_front', $front_page_id );
68
+ update_option( 'page_for_posts', $blog_page_id );
69
+ }
70
+
71
+ // Assign navigation menu locations.
72
+ $menu_location_details = array(
73
+ 'm-shop-above-menu' => 'frontpage',
74
+ 'm-shop-main-menu' => 'frontpage',
75
+ 'm-shop-footer-menu' => 'footer',
76
+ );
77
+
78
+ if ( ! empty( $menu_location_details ) ){
79
+ $navigation_settings = array();
80
+ $current_navigation_menus = wp_get_nav_menus();
81
+ if ( ! empty( $current_navigation_menus ) && ! is_wp_error( $current_navigation_menus ) ) {
82
+ foreach ( $current_navigation_menus as $menu ) {
83
+ foreach ( $menu_location_details as $location => $menu_slug ) {
84
+ if ( $menu->slug === $menu_slug ) {
85
+ $navigation_settings[ $location ] = $menu->term_id;
86
+ }
87
+ }
88
+ }
89
+ }
90
+ set_theme_mod( 'nav_menu_locations', $navigation_settings );
91
+ }
92
+ }
93
+
94
+ add_action( 'pt-ocdi/after_import', 'm_shop_after_import' );
m-shop/include.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ include_once( plugin_dir_path(__FILE__) . 'm-shop-admin/m-shop-shortcode.php' );
3
+ include_once( plugin_dir_path(__FILE__) . 'm-shop-admin/woo/m-shop-admin.php' );
4
+ include_once( plugin_dir_path(__FILE__) . 'm-shop-admin/woo/woo-ajax.php' );
5
+ include_once( plugin_dir_path(__FILE__) . 'customizer/customizer.php' );
m-shop/m-shop-admin/m-shop-shortcode.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+ function m_shop_shortcode_template($section_name=''){
4
+ switch ($section_name){
5
+ case 'm_shop_show_frontpage':
6
+ $section = array(
7
+ 'front-topslider',
8
+ 'front-highlight',
9
+ 'front-tabproduct',
10
+ 'front-categoryslider',
11
+ 'front-tabproductimage',
12
+ 'front-ribbon',
13
+ 'front-productslider',
14
+ 'front-testimonial',
15
+
16
+ 'front-productlist',
17
+ 'front-banner',
18
+ 'front-blog'
19
+ );
20
+ foreach($section as $value):
21
+ require_once (THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'm-shop/m-shop-front-page/'.$value.'.php');
22
+ endforeach;
23
+ break;
24
+ }
25
+ }
26
+ function m_shop_shortcodeid_data($atts){
27
+ $output = '';
28
+ $pull_quote_atts = shortcode_atts(array(
29
+ 'section' => ''
30
+ ), $atts);
31
+ $section_name = wp_kses_post($pull_quote_atts['section']);
32
+ $output = m_shop_shortcode_template($section_name);
33
+ return $output;
34
+ }
35
+ add_shortcode('m-shop', 'm_shop_shortcodeid_data');
m-shop/m-shop-admin/woo/m-shop-admin.php ADDED
@@ -0,0 +1,777 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'WooCommerce' ) ){
3
+ return;
4
+ }
5
+ if ( ! function_exists( 'm_shop_add_to_compare_fltr' ) ){
6
+ /****************/
7
+ // add to compare
8
+ /****************/
9
+ function m_shop_add_to_compare_fltr($pid){
10
+ $product_id = $pid;
11
+ if( is_plugin_active('yith-woocommerce-compare/init.php') && (! class_exists( 'WPCleverWooscp' ))){
12
+ echo '<div class="thunk-compare"><span class="compare-list"><div class="woocommerce product compare-button"><a href="'.home_url().'?action=yith-woocompare-add-product&id='.$product_id.'" class="compare button" data-product_id="'.$product_id.'" rel="nofollow">Compare</a></div></span></div>';
13
+
14
+ }
15
+ if( ( class_exists( 'WPCleverWooscp' ))){
16
+ echo '<div class="thunk-compare">'.do_shortcode('[wooscp id='.$product_id.']').'</div>';
17
+ }
18
+ }
19
+ }
20
+
21
+ if ( ! function_exists( 'm_shop_whish_list' ) ){
22
+ /**********************/
23
+ /** wishlist **/
24
+ /**********************/
25
+ function m_shop_whish_list($pid=''){
26
+ if( shortcode_exists( 'yith_wcwl_add_to_wishlist' ) && (! class_exists( 'WPCleverWoosw' ))){
27
+ echo '<div class="thunk-wishlist"><span class="thunk-wishlist-inner">'.do_shortcode('[yith_wcwl_add_to_wishlist product_id='.$pid.' icon="fa fa-heart" label='.__('wishlist','m-shop').'
28
+ already_in_wishslist_text='.__('Already','m-shop').' browse_wishlist_text='.__('Added','m-shop').']' ).'</span></div>';
29
+ }
30
+ if( ( class_exists( 'WPCleverWoosw' ))){
31
+ echo '<div class="thunk-wishlist"><span class="thunk-wishlist-inner">'.do_shortcode('[woosw id='.$pid.']').'</span></div>';
32
+ }
33
+ }
34
+ }
35
+
36
+
37
+ if(!function_exists('m_shop_product_query')){
38
+ function m_shop_product_query($term_id,$prdct_optn){
39
+ $limit_product = get_theme_mod('m_shop_frnt_prd_shw_no','20');
40
+ // product filter
41
+ $args = array('limit' => $limit_product, 'visibility' => 'catalog');
42
+ if($term_id){
43
+ $term_args = array('hide_empty' => 1,'slug' => $term_id);
44
+ $product_categories = get_terms( 'product_cat', $term_args);
45
+ $product_cat_slug = $product_categories[0]->slug;
46
+ $args['category'] = $product_cat_slug;
47
+ }
48
+ if($prdct_optn=='random'){
49
+ $args['orderby'] = 'rand';
50
+ }elseif($prdct_optn=='featured'){
51
+ $args['featured'] = true;
52
+ }
53
+ if(get_option('woocommerce_hide_out_of_stock_items')=='yes'){
54
+ $args['stock_status'] = 'instock';
55
+ }
56
+ return $args;
57
+ }
58
+ }
59
+
60
+
61
+ if(!function_exists('m_shop_product_slide_list_loop')){
62
+ /********************************/
63
+ //product slider loop
64
+ /********************************/
65
+ function m_shop_product_slide_list_loop($term_id,$prdct_optn){
66
+ $args = m_shop_product_query($term_id,$prdct_optn);
67
+ $products = wc_get_products( $args );
68
+ if (!empty($products)) {
69
+ foreach ($products as $product) {
70
+ $pid = $product->get_id();
71
+ ?>
72
+ <div <?php post_class('product'); ?>>
73
+ <div class="thunk-list">
74
+ <div class="thunk-product-image">
75
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
76
+ <?php echo get_the_post_thumbnail( $pid, 'woocommerce_thumbnail' ); ?>
77
+ </a>
78
+ </div>
79
+ <div class="thunk-product-content">
80
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-title woocommerce-loop-product__link"><?php echo $product->get_title(); ?></a>
81
+ <?php
82
+ $rat_product = wc_get_product($pid);
83
+ $rating_count = $rat_product->get_rating_count();
84
+ $average = $rat_product->get_average_rating();
85
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
86
+ ?>
87
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
88
+
89
+ </div>
90
+ <div class="thunk-quickview">
91
+ <span class="quik-view">
92
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
93
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
94
+ <path d="M14,15h-4v-2h3v-3h2v4C15,14.6,14.6,15,14,15z M13,3h-3V1h4c0.6,0,1,0.4,1,1v4h-2V3z M6,3H3v3H1V2c0-0.6,0.4-1,1-1h4V3z
95
+ M3,13h3v2H2c-0.6,0-1-0.4-1-1v-4h2V13z"></path>
96
+ </svg>
97
+ </a>
98
+ </span>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ <?php }
103
+ } else {
104
+ echo __( 'No products found','m-shop' );
105
+ }
106
+ wp_reset_query();
107
+ }
108
+
109
+ }
110
+ if(!function_exists('m_shop_category_tab_list')){
111
+ /**********************************************
112
+ //Funtion Category list show
113
+ **********************************************/
114
+ function m_shop_category_tab_list( $term_id ){
115
+ if( taxonomy_exists( 'product_cat' ) && !empty($term_id)){
116
+ // category filter
117
+ $args = array(
118
+ 'orderby' => 'menu_order',
119
+ 'order' => 'ASC',
120
+ 'hide_empty' => 1,
121
+ 'slug' => $term_id
122
+ );
123
+ $product_categories = get_terms( 'product_cat', $args );
124
+ $count = count($product_categories);
125
+ $cat_list = $cate_product = '';
126
+ $cat_list_drop = '';
127
+ $i=1;
128
+ $dl=0;
129
+ ?>
130
+ <?php
131
+ //Detect special conditions devices
132
+ $iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
133
+ $iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
134
+ $iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
135
+ $Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
136
+ $webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
137
+
138
+ //do something with this information
139
+ if( $iPod || $iPhone ){
140
+ $device_cat = '1';
141
+ //browser reported as an iPhone/iPod touch -- do something here
142
+ }else if($iPad){
143
+ $device_cat = '3';
144
+ //browser reported as an iPad -- do something here
145
+ }else if($Android){
146
+ $device_cat = '2';
147
+ //browser reported as an Android device -- do something here
148
+ }else if($webOS){
149
+ $device_cat = '4';
150
+ //browser reported as a webOS device -- do something here
151
+ }else{
152
+ $device_cat = '5';
153
+ }
154
+ if ( $count > 0 ){
155
+ foreach ( $product_categories as $product_category ){
156
+ //global $product;
157
+ $category_product = array();
158
+ $current_class = '';
159
+ $cat_list .='
160
+ <li>
161
+ <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).'">
162
+ '.esc_html($product_category->name).'</a>
163
+ </li>';
164
+ if ($i++ == $device_cat) break;
165
+ }
166
+ if($count > $device_cat){
167
+ foreach ( $product_categories as $product_category ){
168
+ //global $product;
169
+ $dl++;
170
+ if($dl <= $device_cat) continue;
171
+ $category_product = array();
172
+ $current_class = '';
173
+ $cat_list_drop .='
174
+ <li>
175
+ <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).'">
176
+ '.esc_html($product_category->name).'</a>
177
+ </li>';
178
+ }
179
+ }
180
+ $return = '<div class="tab-head" catlist="'.esc_attr($i).'" >
181
+ <div class="tab-link-wrap">
182
+ <ul class="tab-link">';
183
+ $return .= $cat_list;
184
+ $return .= '</ul>';
185
+ if($count > $device_cat){
186
+ $return .= '<div class="header__cat__item dropdown"><a href="#" class="more-cat" title="More categories...">•••</a><ul class="dropdown-link">';
187
+ $return .= $cat_list_drop;
188
+ $return .= '</ul></div>';
189
+ }
190
+ $return .= '</div></div>';
191
+
192
+ echo $return;
193
+ }
194
+ }
195
+ }
196
+ }
197
+ if(!function_exists('m_shop_product_cat_filter_default_loop')){
198
+ /********************************/
199
+ //product cat filter loop
200
+ /********************************/
201
+ function m_shop_product_cat_filter_default_loop($term_id,$prdct_optn){
202
+ // product filter
203
+ $args = m_shop_product_query($term_id,$prdct_optn);
204
+ $products = wc_get_products( $args );
205
+ if (!empty($products)) {
206
+ foreach ($products as $product) {
207
+ $pid = $product->get_id();
208
+ ?>
209
+ <div <?php post_class('product'); ?>>
210
+ <div class="thunk-product-wrap">
211
+ <div class="thunk-product">
212
+ <div class="thunk-product-image">
213
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
214
+ <?php $sale = get_post_meta( $pid, '_sale_price', true);
215
+ if( $sale) {
216
+ // Get product prices
217
+ $regular_price = (float) $product->get_regular_price(); // Regular price
218
+ $sale_price = (float) $product->get_price(); // Sale price
219
+ $saving_price = wc_price( $regular_price - $sale_price );
220
+ echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
221
+ }?>
222
+ <?php
223
+ echo get_the_post_thumbnail( $pid, 'full' );
224
+ $hover_style = get_theme_mod( 'm_shop_woo_product_animation' );
225
+ // the_post_thumbnail();
226
+ if ( 'swap' === $hover_style ){
227
+ $attachment_ids = $product->get_gallery_image_ids($pid);
228
+ if(!empty($attachment_ids)){
229
+
230
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
231
+ echo $category_product['glr'] = $glr;
232
+
233
+ }
234
+
235
+ }
236
+ if ( 'slide' === $hover_style ){
237
+ $attachment_ids = $product->get_gallery_image_ids($pid);
238
+ if(!empty($attachment_ids)){
239
+
240
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
241
+ echo $category_product['glr'] = $glr;
242
+
243
+ }
244
+
245
+ }
246
+ ?>
247
+ </a>
248
+ <div class="thunk-hover-icon">
249
+ <?php
250
+ echo m_shop_whish_list($pid);
251
+ echo m_shop_add_to_compare_fltr($pid);
252
+ ?>
253
+ </div>
254
+ <?php if(get_theme_mod( 'm_shop_woo_quickview_enable', true )){?>
255
+ <div class="thunk-quickview">
256
+ <span class="quik-view">
257
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
258
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
259
+ <path d="M14,15h-4v-2h3v-3h2v4C15,14.6,14.6,15,14,15z M13,3h-3V1h4c0.6,0,1,0.4,1,1v4h-2V3z M6,3H3v3H1V2c0-0.6,0.4-1,1-1h4V3z
260
+ M3,13h3v2H2c-0.6,0-1-0.4-1-1v-4h2V13z"></path>
261
+ </svg>
262
+ <span><?php _e('Quick View','m-shop');?></span>
263
+ </a>
264
+ </span>
265
+ </div>
266
+ <?php }?>
267
+ </div>
268
+ <div class="thunk-product-content">
269
+ <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></h2>
270
+ <?php
271
+ $rat_product = wc_get_product($pid);
272
+ $rating_count = $rat_product->get_rating_count();
273
+ $average = $rat_product->get_average_rating();
274
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
275
+ ?>
276
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
277
+ <?php echo m_shop_add_to_cart_url($product);?>
278
+ </div>
279
+
280
+ </div>
281
+ </div>
282
+ </div>
283
+ <?php }
284
+ } else {
285
+ echo __( 'No products found','m-shop' );
286
+ }
287
+ wp_reset_query();
288
+ }
289
+ }
290
+
291
+ if(!function_exists('m_shop_product_filter_loop')){
292
+
293
+ function m_shop_product_filter_loop($args){
294
+ $products = wc_get_products( $args );
295
+ if (!empty($products)) {
296
+ foreach ($products as $product) {
297
+ $pid = $product->get_id();
298
+ $hover_style = get_theme_mod( 'm_shop_woo_product_animation' );
299
+ if('swap' === $hover_style){
300
+ global $product;
301
+ $attachment_ids = $product->get_gallery_image_ids();
302
+ if(count($attachment_ids) > '0'){
303
+ $swapclasses='m-shop-swap-item-hover';
304
+ }
305
+ }elseif('slide' === $hover_style){
306
+ global $product;
307
+ $attachment_ids = $product->get_gallery_image_ids();
308
+ if(count($attachment_ids) > '0'){
309
+ $swapclasses='m-shop-slide-item-hover';
310
+ }
311
+ } else{
312
+ $swapclasses='';
313
+ }
314
+ ?>
315
+ <div <?php post_class($swapclasses,$pid); ?>>
316
+ <div class="thunk-product-wrap">
317
+ <div class="thunk-product">
318
+ <div class="thunk-product-image">
319
+ <a href="<?php echo get_permalink($pid); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">
320
+ <?php $sale = get_post_meta( $pid, '_sale_price', true);
321
+ if( $sale) {
322
+ // Get product prices
323
+ $regular_price = (float) $product->get_regular_price(); // Regular price
324
+ $sale_price = (float) $product->get_price(); // Sale price
325
+ $saving_price = wc_price( $regular_price - $sale_price );
326
+ echo $sale = '<span class="onsale">-'.$saving_price.'</span>';
327
+ }?>
328
+ <?php
329
+ echo get_the_post_thumbnail( $pid, 'full' );
330
+ $hover_style = get_theme_mod( 'm_shop_woo_product_animation' );
331
+ // the_post_thumbnail();
332
+ if ( 'swap' === $hover_style ){
333
+ $attachment_ids = $product->get_gallery_image_ids($pid);
334
+ if(!empty($attachment_ids)){
335
+
336
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-hover' ));
337
+ echo $category_product['glr'] = $glr;
338
+
339
+ }
340
+
341
+ }
342
+ if ( 'slide' === $hover_style ){
343
+ $attachment_ids = $product->get_gallery_image_ids($pid);
344
+ if(!empty($attachment_ids)){
345
+
346
+ $glr = wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array( 'class' => 'show-on-slide' ));
347
+ echo $category_product['glr'] = $glr;
348
+
349
+ }
350
+
351
+ }
352
+ ?>
353
+ </a>
354
+ <div class="thunk-hover-icon">
355
+ <?php
356
+ echo m_shop_whish_list($pid);
357
+ echo m_shop_add_to_compare_fltr($pid);
358
+ ?>
359
+ </div>
360
+ <?php if(get_theme_mod( 'm_shop_woo_quickview_enable', true )){?>
361
+ <div class="thunk-quickview">
362
+ <span class="quik-view">
363
+ <a href="#" class="opn-quick-view-text" data-product_id="<?php echo esc_attr($pid); ?>">
364
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
365
+ <path d="M14,15h-4v-2h3v-3h2v4C15,14.6,14.6,15,14,15z M13,3h-3V1h4c0.6,0,1,0.4,1,1v4h-2V3z M6,3H3v3H1V2c0-0.6,0.4-1,1-1h4V3z
366
+ M3,13h3v2H2c-0.6,0-1-0.4-1-1v-4h2V13z"></path>
367
+ </svg>
368
+ <span><?php _e('Quick View','m-shop');?></span>
369
+ </a>
370
+ </span>
371
+ </div>
372
+ <?php }?>
373
+ </div>
374
+ <div class="thunk-product-content">
375
+ <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></h2>
376
+ <?php
377
+ $rat_product = wc_get_product($pid);
378
+ $rating_count = $rat_product->get_rating_count();
379
+ $average = $rat_product->get_average_rating();
380
+ echo $rating_count = wc_get_rating_html( $average, $rating_count );
381
+ ?>
382
+ <div class="price"><?php echo $product->get_price_html(); ?></div>
383
+ <?php echo m_shop_add_to_cart_url($product);?>
384
+ </div>
385
+
386
+ </div>
387
+ </div>
388
+ </div>
389
+ <?php }
390
+ } else {
391
+ echo __( 'No products found','m-shop' );
392
+ }
393
+ wp_reset_query();
394
+ }
395
+ }
396
+ if(!function_exists('m_shop_widget_product_query')){
397
+ /*****************************/
398
+ // Product show function
399
+ /****************************/
400
+ function m_shop_widget_product_query($query){
401
+ $productType = $query['prd-orderby'];
402
+ $count = $query['count'];
403
+ $cat_slug = $query['cate'];
404
+ global $th_cat_slug;
405
+ $th_cat_slug = $cat_slug;
406
+ $args = array(
407
+ 'hide_empty' => 1,
408
+ 'posts_per_page' => $count,
409
+ 'post_type' => 'product',
410
+ 'post_status' => 'publish',
411
+ 'orderby' => 'date',
412
+ 'order' => 'DESC',
413
+ );
414
+ if($productType == 'featured'){
415
+ $taxquery = array(
416
+ 'relation' => 'AND',
417
+ array(
418
+ 'taxonomy' => 'product_cat',
419
+ 'field' => 'slug',
420
+ 'terms' => $cat_slug
421
+ ),
422
+ array(
423
+ 'taxonomy' => 'product_visibility',
424
+ 'terms' => array( 'exclude-from-catalog' ),
425
+ 'field' => 'name',
426
+ 'operator' => 'NOT IN',
427
+ )
428
+ );
429
+ $args = array(
430
+
431
+ 'tax_query' => $taxquery,
432
+ 'post_type' => 'product',
433
+ 'post_status' => 'publish',
434
+ 'post__in' => wc_get_featured_product_ids(),
435
+ );
436
+ }
437
+ elseif($productType == 'random'){
438
+ //random product
439
+ $args['orderby'] = 'rand';
440
+ }
441
+ elseif($productType == 'sale') {
442
+ //sale product
443
+ $args['meta_query'] = array(
444
+ 'relation' => 'OR',
445
+ array( // Simple products type
446
+ 'key' => '_sale_price',
447
+ 'value' => 0,
448
+ 'compare' => '>',
449
+ 'type' => 'numeric'
450
+ ),
451
+ array( // Variable products type
452
+ 'key' => '_min_variation_sale_price',
453
+ 'value' => 0,
454
+ 'compare' => '>',
455
+ 'type' => 'numeric'
456
+ )
457
+ );
458
+ }
459
+ $args['meta_key'] = '_thumbnail_id';
460
+ if($cat_slug != '0'){
461
+ //$args['product_cat'] = $cat_slug;
462
+ $args['tax_query'] = array(
463
+ 'relation' => 'AND',
464
+ array(
465
+ 'taxonomy' => 'product_cat',
466
+ 'field' => 'term_id',
467
+ 'terms' => $cat_slug,
468
+ ),
469
+ array(
470
+ 'taxonomy' => 'product_visibility',
471
+ 'terms' => array( 'exclude-from-catalog' ),
472
+ 'field' => 'name',
473
+ 'operator' => 'NOT IN',
474
+ )
475
+ );
476
+ }
477
+ $return = new WP_Query($args);
478
+ return $return;
479
+ }
480
+ }
481
+
482
+ if(!function_exists('m_shop_post_query')){
483
+ /*****************************/
484
+ // Product show function
485
+ /****************************/
486
+ function m_shop_post_query($query){
487
+
488
+ $args = array(
489
+ 'orderby' => $query['orderby'],
490
+ 'order' => 'DESC',
491
+ 'ignore_sticky_posts' => $query['sticky'],
492
+ 'post_type' => 'post',
493
+ 'post_status' => 'publish',
494
+ 'posts_per_page' => $query['count'],
495
+ 'cat' => $query['cate'],
496
+ 'meta_key' => '_thumbnail_id',
497
+
498
+ );
499
+
500
+ if($query['thumbnail']){
501
+ $args['meta_key'] = '_thumbnail_id';
502
+ }
503
+
504
+ $return = new WP_Query($args);
505
+
506
+ return $return;
507
+ }
508
+ }
509
+
510
+ if ( ! function_exists( 'm_shop_front_banner' ) ){
511
+ /******************/
512
+ //Banner Function
513
+ /******************/
514
+ function m_shop_front_banner(){
515
+ $m_shop_banner_layout = get_theme_mod( 'm_shop_banner_layout','bnr-two');
516
+ // first
517
+ $m_shop_bnr_1_img = get_theme_mod( 'm_shop_bnr_1_img','');
518
+ $m_shop_bnr_1_url = get_theme_mod( 'm_shop_bnr_1_url','');
519
+ // second
520
+ $m_shop_bnr_2_img = get_theme_mod( 'm_shop_bnr_2_img','');
521
+ $m_shop_bnr_2_url = get_theme_mod( 'm_shop_bnr_2_url','');
522
+ // third
523
+ $m_shop_bnr_3_img = get_theme_mod( 'm_shop_bnr_3_img','');
524
+ $m_shop_bnr_3_url = get_theme_mod( 'm_shop_bnr_3_url','');
525
+ // fouth
526
+ $m_shop_bnr_4_img = get_theme_mod( 'm_shop_bnr_4_img','');
527
+ $m_shop_bnr_4_url = get_theme_mod( 'm_shop_bnr_4_url','');
528
+ // fifth
529
+ $m_shop_bnr_5_img = get_theme_mod( 'm_shop_bnr_5_img','');
530
+ $m_shop_bnr_5_url = get_theme_mod( 'm_shop_bnr_5_url','');
531
+
532
+ if($m_shop_banner_layout=='bnr-one'){?>
533
+ <div class="thunk-banner-wrap bnr-layout-1 thnk-col-1">
534
+ <div class="thunk-banner-col1">
535
+ <div class="thunk-banner-col1-content"><a href="<?php echo esc_url($m_shop_bnr_1_url);?>"><img src="<?php echo esc_url($m_shop_bnr_1_img );?>"></a>
536
+ </div>
537
+ </div>
538
+ </div>
539
+ <?php }elseif($m_shop_banner_layout=='bnr-two'){?>
540
+ <div class="thunk-banner-wrap bnr-layout-2 thnk-col-2">
541
+ <div class="thunk-banner-col1">
542
+ <div class="thunk-banner-col1-content"><a href="<?php echo esc_url($m_shop_bnr_1_url);?>"><img src="<?php echo esc_url($m_shop_bnr_1_img );?>"></a></div>
543
+ </div>
544
+ <div class="thunk-banner-col2">
545
+ <div class="thunk-banner-col2-content"><a href="<?php echo esc_url($m_shop_bnr_2_url);?>"><img src="<?php echo esc_url($m_shop_bnr_2_img );?>"></a></div>
546
+ </div>
547
+ </div>
548
+
549
+ <?php }?>
550
+
551
+ <?php
552
+
553
+ }
554
+ }
555
+ if ( ! function_exists( 'm_shop_top_single_slider_content' ) ){
556
+ /**********************/
557
+ // Top Slider Function
558
+ /**********************/
559
+ //Slider ontent output function layout 1
560
+ function m_shop_top_slider_content( $m_shop_slide_content_id, $default ){
561
+ //passing the seeting ID and Default Values
562
+ $m_shop_slide_content = get_theme_mod( $m_shop_slide_content_id, $default );
563
+ if ( ! empty( $m_shop_slide_content ) ) :
564
+ $m_shop_slide_content = json_decode( $m_shop_slide_content );
565
+ if ( ! empty( $m_shop_slide_content) ) {
566
+ foreach ( $m_shop_slide_content as $slide_item ) :
567
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->image_url, 'Top Slider section' ) : '';
568
+ $logo_image = ! empty( $slide_item->logo_image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->logo_image_url, 'Top Slider section' ) : '';
569
+ $title = ! empty( $slide_item->title ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->title, 'Top Slider section' ) : '';
570
+ $subtitle = ! empty( $slide_item->subtitle ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->subtitle, 'Top Slider section' ) : '';
571
+ $text = ! empty( $slide_item->text ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->text, 'Top Slider section' ) : '';
572
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->link, 'Top Slider section' ) : '';
573
+ ?>
574
+ <?php if($image!==''):?>
575
+ <div>
576
+ <img data-u="image" src="<?php echo esc_url($image); ?>" />
577
+ <div class="slide-content-wrap">
578
+ <div class="slide-content">
579
+ <div class="logo">
580
+ <a href="<?php echo esc_url($link); ?>"><img src="<?php echo esc_url($logo_image); ?>"></a>
581
+ </div>
582
+ <h2><?php echo esc_html($title); ?></h2>
583
+ <p><?php echo esc_html($subtitle); ?></p>
584
+ <?php if($text!==''): ?>
585
+ <a class="slide-btn" href="<?php echo esc_url($link); ?>"><?php echo esc_html($text); ?></a>
586
+ <?php endif; ?>
587
+ </div>
588
+ </div>
589
+ </div>
590
+
591
+ <?php
592
+ endif;
593
+ endforeach;
594
+ } // End if().
595
+
596
+ endif;
597
+ }
598
+ }
599
+
600
+ if ( ! function_exists( 'm_shop_top_single_slider_content' ) ){
601
+ //Single Slider ontent output function layout 5
602
+ function m_shop_top_single_slider_content( $m_shop_slide_content_id, $default ){
603
+ //passing the seeting ID and Default Values
604
+ $m_shop_slide_content = get_theme_mod( $m_shop_slide_content_id, $default );
605
+ if ( ! empty( $m_shop_slide_content ) ) :
606
+ $m_shop_slide_content = json_decode( $m_shop_slide_content );
607
+ if ( ! empty( $m_shop_slide_content) ) {
608
+ foreach ( $m_shop_slide_content as $slide_item ) :
609
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->image_url, 'Top Slider section' ) : '';
610
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->link, 'Top Slider section' ) : '';
611
+ ?>
612
+ <?php if($image!==''):?>
613
+ <div>
614
+ <img data-u="image" src="<?php echo esc_url($image); ?>" />
615
+ <a href="<?php echo esc_url($link); ?>"></a>
616
+ </div>
617
+
618
+ <?php
619
+ endif;
620
+ endforeach;
621
+ } // End if().
622
+
623
+ endif;
624
+ }
625
+ }
626
+ if ( ! function_exists( 'm_shop_top_slider_2_content' ) ){
627
+ // slider layout 2
628
+ function m_shop_top_slider_2_content( $m_shop_slide_content_id, $default ){
629
+ //passing the seeting ID and Default Values
630
+ $m_shop_slide_content = get_theme_mod( $m_shop_slide_content_id, $default );
631
+ if ( ! empty( $m_shop_slide_content ) ) :
632
+ $m_shop_slide_content = json_decode( $m_shop_slide_content );
633
+ if ( ! empty( $m_shop_slide_content) ) {
634
+ foreach ( $m_shop_slide_content as $slide_item ) :
635
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->image_url, 'Top Slider section' ) : '';
636
+ $logo_image = ! empty( $slide_item->logo_image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->logo_image_url, 'Top Slider section' ) : '';
637
+ $title = ! empty( $slide_item->title ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->title, 'Top Slider section' ) : '';
638
+ $subtitle = ! empty( $slide_item->subtitle ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->subtitle, 'Top Slider section' ) : '';
639
+ $text = ! empty( $slide_item->text ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->text, 'Top Slider section' ) : '';
640
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->link, 'Top Slider section' ) : '';
641
+ ?>
642
+ <?php if($image!==''):?>
643
+ <div class="thunk-to2-slide-list">
644
+ <img src="<?php echo esc_url($image); ?>">
645
+ <div class="slider-content-caption">
646
+ <h2 class="animated delay-0.5s" data-animation-in="fadeInLeft" data-animation-out="animate-out fadeInRight"><a href="<?php echo esc_url($link); ?>"><?php echo esc_html($title); ?></a></h2>
647
+ <p class="animated delay-0.8s" data-animation-in="fadeInLeft" data-animation-out="animate-out fadeInRight"><?php echo esc_html($subtitle); ?></p>
648
+ <?php if($text!==''): ?>
649
+ <a class="slide-btn animated delay-0.8s" data-animation-in="fadeInLeft" data-animation-out="animate-out fadeInRight" href="<?php echo esc_url($link); ?>"><?php echo esc_html($text); ?></a>
650
+ <?php endif;?>
651
+ </div>
652
+ </div>
653
+ <?php
654
+ endif;
655
+ endforeach;
656
+ } // End if().
657
+
658
+ endif;
659
+ }
660
+ }
661
+ if ( ! function_exists( 'm_shop_top_slider_6_content' ) ){
662
+ // slider layout 2
663
+ function m_shop_top_slider_6_content( $m_shop_slide_content_id, $default ){
664
+ $cap_cls='';
665
+ //passing the seeting ID and Default Values
666
+ $m_shop_slide_content = get_theme_mod( $m_shop_slide_content_id, $default );
667
+ if ( ! empty( $m_shop_slide_content ) ) :
668
+ $m_shop_slide_content = json_decode( $m_shop_slide_content );
669
+ if ( ! empty( $m_shop_slide_content) ) {
670
+ foreach ( $m_shop_slide_content as $slide_item ) :
671
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->image_url, 'Top Slider section' ) : '';
672
+ $logo_image = ! empty( $slide_item->logo_image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->logo_image_url, 'Top Slider section' ) : '';
673
+ $title = ! empty( $slide_item->title ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->title, 'Top Slider section' ) : '';
674
+ $subtitle = ! empty( $slide_item->subtitle ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->subtitle, 'Top Slider section' ) : '';
675
+ $text = ! empty( $slide_item->text ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->text, 'Top Slider section' ) : '';
676
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->link, 'Top Slider section' ) : '';
677
+ ?>
678
+ <?php if($image ==''){
679
+ $cap_cls ='center-cap';
680
+ }else{
681
+ $cap_cls ='';
682
+ }?>
683
+ <div class="thunk-top6-slide-list">
684
+ <div class="container">
685
+ <div class="thunk-top6-slide-list-wrap <?php echo esc_attr($cap_cls);?>">
686
+
687
+ <div class="slider-content-caption6">
688
+ <h2 class="animated delay-0.5s" data-animation-in="fadeInLeft" data-animation-out="animate-out fadeInRight"><a href="<?php echo esc_url($link); ?>"><?php echo esc_html($title); ?></a></h2>
689
+ <p class="animated delay-0.8s" data-animation-in="fadeInLeft" data-animation-out="animate-out fadeInRight"><?php echo esc_html($subtitle); ?></p>
690
+ <?php if($text!==''): ?>
691
+ <a class="slide-btn animated delay-0.8s" data-animation-in="fadeInLeft" data-animation-out="animate-out fadeInRight" href="<?php echo esc_url($link); ?>"><?php echo esc_html($text); ?></a>
692
+ <?php endif;?>
693
+ </div>
694
+
695
+ <?php if($image!==''){?>
696
+ <div class="image-wrap">
697
+ <img src="<?php echo esc_url($image); ?>">
698
+ </div>
699
+ <?php } ?>
700
+ </div>
701
+ </div>
702
+ </div>
703
+ <?php
704
+ endforeach;
705
+ } // End if().
706
+
707
+ endif;
708
+ }
709
+ }
710
+ if ( ! function_exists( 'm_shop_top_slider_multi_content' ) ){
711
+ function m_shop_top_slider_multi_content( $m_shop_slide_content_id, $default ){
712
+ //passing the seeting ID and Default Values
713
+ $m_shop_slide_content = get_theme_mod( $m_shop_slide_content_id, $default );
714
+ if ( ! empty( $m_shop_slide_content ) ) :
715
+ $m_shop_slide_content = json_decode( $m_shop_slide_content );
716
+ if ( ! empty( $m_shop_slide_content) ) {
717
+ foreach ( $m_shop_slide_content as $slide_item ) :
718
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->image_url, 'Top Slider section' ) : '';
719
+ $logo_image = ! empty( $slide_item->logo_image_url ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->logo_image_url, 'Top Slider section' ) : '';
720
+ $title = ! empty( $slide_item->title ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->title, 'Top Slider section' ) : '';
721
+ $subtitle = ! empty( $slide_item->subtitle ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->subtitle, 'Top Slider section' ) : '';
722
+ $text = ! empty( $slide_item->text ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->text, 'Top Slider section' ) : '';
723
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'm-shop_translate_single_string', $slide_item->link, 'Top Slider section' ) : '';
724
+ ?>
725
+ <?php if($image!==''):?>
726
+
727
+ <div class="thunk-slider-multi-item">
728
+ <a href="<?php echo esc_url($link); ?>">
729
+ <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr($title); ?>">
730
+ </a>
731
+ <div class="slide-item-wrapper">
732
+ <div class="item-title"><h3><a href="<?php echo esc_url($link); ?>"><?php echo esc_html($title); ?></a></h3></div>
733
+ <?php if($text!==''){?>
734
+ <div class="item-button"><a href="<?php echo esc_url($link); ?>"><?php echo esc_html($text); ?></a></div>
735
+ <?php }?>
736
+ </div>
737
+ </div>
738
+ <?php
739
+ endif;
740
+ endforeach;
741
+ } // End if().
742
+
743
+ endif;
744
+ }
745
+ }
746
+ //*********************//
747
+ // Highlight feature
748
+ //*********************//
749
+ if ( ! function_exists( 'm_shop_highlight_content' ) ){
750
+ function m_shop_highlight_content($m_shop_highlight_content_id,$default){
751
+ $m_shop_highlight_content= get_theme_mod( $m_shop_highlight_content_id, $default );
752
+ //passing the seeting ID and Default Values
753
+
754
+ if ( ! empty( $m_shop_highlight_content ) ) :
755
+
756
+ $m_shop_highlight_content = json_decode( $m_shop_highlight_content );
757
+ if ( ! empty( $m_shop_highlight_content ) ) {
758
+ foreach ( $m_shop_highlight_content as $ship_item ) :
759
+ $icon = ! empty( $ship_item->icon_value ) ? apply_filters( 'm_shop_translate_single_string', $ship_item->icon_value, '' ) : '';
760
+ $title = ! empty( $ship_item->title ) ? apply_filters( 'm_shop_translate_single_string', $ship_item->title, '' ) : '';
761
+ $subtitle = ! empty( $ship_item->subtitle ) ? apply_filters( 'm_shop_translate_single_string', $ship_item->subtitle, '' ) : '';
762
+ ?>
763
+ <div class="thunk-highlight-col">
764
+ <div class="thunk-hglt-box">
765
+ <div class="thunk-hglt-icon"><i class="<?php echo "fa ".esc_attr($icon); ?>"></i></div>
766
+ <div class="content">
767
+ <h6><?php echo esc_html($title);?></h6>
768
+ <p><?php echo esc_html($subtitle);?></p>
769
+ </div>
770
+ </div>
771
+ </div>
772
+ <?php
773
+ endforeach;
774
+ }
775
+ endif;
776
+ }
777
+ }
m-shop/m-shop-admin/woo/woo-ajax.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'WooCommerce' ) ){
3
+ return;
4
+ }
5
+ /***************************/
6
+ //category product section product ajax filter
7
+ /***************************/
8
+ add_action('wp_ajax_m_shop_cat_filter_ajax', 'm_shop_cat_filter_ajax');
9
+ add_action('wp_ajax_nopriv_m_shop_cat_filter_ajax', 'm_shop_cat_filter_ajax');
10
+ function m_shop_cat_filter_ajax(){
11
+
12
+ if(isset($_POST['data_cat_slug'])){
13
+ $prdct_optn = get_theme_mod('m_shop_category_optn','recent');
14
+ $args = m_shop_product_query(sanitize_key($_POST['data_cat_slug']),$prdct_optn);
15
+ m_shop_product_filter_loop($args);
16
+ }
17
+ exit;
18
+ }
m-shop/m-shop-front-page/front-banner.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_banner_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-banner-section">
7
+
8
+ <?php m_shop_display_customizer_shortcut( 'm_shop_banner' );?>
9
+ <div class="content-wrap">
10
+ <?php m_shop_front_banner(); ?>
11
+ </div>
12
+
13
+ </section>
m-shop/m-shop-front-page/front-blog.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_blog_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-blog-section">
7
+ <?php m_shop_display_customizer_shortcut( 'm_shop_blog' );?>
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('m_shop_blog_heading','Blog'));?></span>
12
+ </h4>
13
+ </div>
14
+ <div class="blog_cat_view"><a href="<?php echo esc_url(m_shop_get_blog_url(get_theme_mod('m_shop_blog_slider_cat'))); ?>"><?php echo esc_html('View All','m-shop');?></a></div>
15
+ </div>
16
+ <div class="content-wrap">
17
+ <div class="thunk-blog-wrap">
18
+ <?php
19
+
20
+ $count_post = get_theme_mod('m_shop_post_show','4');
21
+ $cat = get_theme_mod('m_shop_blog_slider_cat');
22
+ $loop = new WP_Query(array(
23
+ 'posts_per_page' => $count_post,
24
+ 'order' => 'DESC',
25
+ 'ignore_sticky_posts' => true,
26
+ 'cat' => $cat,
27
+ ));
28
+ if ( $loop->have_posts() ) {
29
+ while($loop->have_posts()): $loop->the_post();
30
+ ?>
31
+ <article class="post-item">
32
+ <div class="post-thumb">
33
+ <a href="<?php the_permalink(); ?>">
34
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
35
+ the_post_thumbnail();
36
+ }
37
+ ?>
38
+ </a>
39
+ </div>
40
+ <div class="entry-body">
41
+ <div class="post-item-content">
42
+ <a href="<?php the_permalink(); ?>"><span class="title"><?php the_title(); ?></span></a>
43
+ <div class="entry-meta">
44
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
45
+ </div>
46
+
47
+ </div>
48
+ </div>
49
+ </article>
50
+ <?php endwhile; ?>
51
+ <?php } wp_reset_postdata(); ?>
52
+ </div>
53
+ </div>
54
+ </section>
m-shop/m-shop-front-page/front-categoryslider.php ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_category_slide_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+
7
+ <section class="thunk-category-slide-section">
8
+
9
+
10
+ <?php m_shop_display_customizer_shortcut( 'm_shop_cat_slide_section' );?>
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('m_shop_cat_slider_heading','Woo Category'));?></span>
15
+ </h4>
16
+ </div>
17
+ </div>
18
+ <div class="content-wrap">
19
+ <?php if(get_theme_mod('m_shop_cat_slide_layout','cat-layout-1')=='cat-layout-1'):?>
20
+ <div class="thunk-slide thunk-cat-slide owl-carousel">
21
+ <?php
22
+ if( taxonomy_exists( 'product_cat' ) ){
23
+ $term_id = get_theme_mod('m_shop_category_slide_list');
24
+ // category filter
25
+ $args = array(
26
+
27
+ 'orderby' => 'menu_order',
28
+ 'order' => 'ASC',
29
+ 'hide_empty' => 1,
30
+ 'slug' => $term_id
31
+ );
32
+
33
+ $product_categories = get_terms( 'product_cat', $args );
34
+
35
+ $count = count($product_categories);
36
+
37
+ $category_list = $cate_product = '';
38
+ if ( $count > 0 ){
39
+ foreach ( $product_categories as $product_category ){
40
+ //global $product;
41
+ $category_product = array();
42
+ $term_link = get_term_link( $product_category, 'product_cat' );
43
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
44
+ $image = wp_get_attachment_url( $thumbnail_id );
45
+
46
+ $current_class = '';
47
+
48
+ $category_list .='<div class="thunk-category">';
49
+ if(!empty($image)){
50
+ $category_list .='<div class="thunk-cat-box">
51
+ <a href="'.$term_link.'">';
52
+ $category_list .=' <img src="' . $image . '" alt="" />';
53
+ $category_list .='</a>
54
+ </div>';
55
+ }
56
+ $category_list .='<div class="thunk-cat-text">
57
+ <div class="thunk-cat-title">
58
+ <a href="'.$term_link.'"><span class="title">'.$product_category->name. '</span></a>
59
+ </div>
60
+
61
+ </div>
62
+
63
+ </div>';
64
+ }
65
+ echo $category_list;
66
+ }
67
+ }
68
+
69
+ ?>
70
+ </div>
71
+ <?php elseif(get_theme_mod('m_shop_cat_slide_layout')=='cat-layout-2'):?>
72
+ <div class="cat-wrap cat-layout-2">
73
+ <div class="cat-content">
74
+ <?php
75
+ if( taxonomy_exists( 'product_cat' ) ){
76
+ $term_id = get_theme_mod('m_shop_category_slide_list');
77
+ // category filter
78
+ $args = array(
79
+
80
+ 'orderby' => 'title',
81
+ 'order' => 'ASC',
82
+ 'hide_empty' => 1,
83
+ 'slug' => $term_id
84
+ );
85
+
86
+ $product_categories = get_terms( 'product_cat', $args );
87
+
88
+ $count = count($product_categories);
89
+
90
+ $category_list = $cate_product = '';
91
+ if ( $count > 0 ){
92
+ foreach ( $product_categories as $product_category ){
93
+ //global $product;
94
+ $category_product = array();
95
+ $term_link = get_term_link( $product_category, 'product_cat' );
96
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
97
+ $image = wp_get_attachment_url( $thumbnail_id );
98
+ $current_class = '';
99
+ $category_list .='<div class="cat-list">
100
+ <a href="'.esc_url($term_link).'">
101
+ <img src="'.esc_url($image).'">
102
+ <span>'.esc_html($product_category->name).'</span>
103
+ </a>
104
+ </div>';
105
+ }
106
+ echo $category_list;
107
+ }
108
+ }
109
+ ?>
110
+ </div>
111
+ </div>
112
+ <?php elseif(get_theme_mod('m_shop_cat_slide_layout')=='cat-layout-3'):?>
113
+ <div class="cat-wrap cat-layout-3">
114
+ <div class="cat-content-3">
115
+
116
+
117
+
118
+ <?php
119
+ if( taxonomy_exists( 'product_cat' ) ){
120
+ $term_id = get_theme_mod('m_shop_category_slide_list');
121
+ // category filter
122
+ $args = array(
123
+
124
+ 'orderby' => 'title',
125
+ 'order' => 'ASC',
126
+ 'hide_empty' => 1,
127
+ 'slug' => $term_id
128
+ );
129
+
130
+ $product_categories = get_terms( 'product_cat', $args );
131
+
132
+ $count = count($product_categories);
133
+
134
+ $category_list = $cate_product = '';
135
+ if ( $count > 0 ){
136
+ foreach ( $product_categories as $product_category ){
137
+ //global $product;
138
+ $category_product = array();
139
+ $term_link = get_term_link( $product_category, 'product_cat' );
140
+ $thumbnail_id = get_term_meta( $product_category->term_id, 'thumbnail_id', true ); // Get Category Thumbnail
141
+ $image = wp_get_attachment_url( $thumbnail_id );
142
+ $current_class = '';
143
+ $category_list .='<div class="cat-col">
144
+ <div class="cat-col-wrap">
145
+ <img src="'.esc_url($image).'">
146
+ <div class="hover-area">
147
+ <span class="cat-title">'.esc_html($product_category->name).'</span>
148
+ <div class="prd-total-number"><span class="item">'.$product_category->count.esc_html('Product','m-shop').'</span></div>
149
+ </div>
150
+ <a href="'.esc_url($term_link).'"> </a>
151
+ </div></div>';
152
+ }
153
+ echo $category_list;
154
+ }
155
+ }
156
+ ?>
157
+ </div>
158
+ </div>
159
+ <?php endif;?>
160
+ </div>
161
+
162
+ </section>
m-shop/m-shop-front-page/front-highlight.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_highlight_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-highlight-section">
7
+
8
+ <?php m_shop_display_customizer_shortcut( 'm_shop_highlight' );?>
9
+ <div class="content-wrap">
10
+ <div class="thunk-highlight-feature-wrap">
11
+ <?php
12
+ $default = M_Shop_Defaults_Models::instance()->get_feature_default();
13
+ m_shop_highlight_content('m_shop_highlight_content', $default);
14
+ ?>
15
+ </div>
16
+ </div>
17
+
18
+ </section>
m-shop/m-shop-front-page/front-productlist.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_product_list_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-list-section">
7
+
8
+ <?php m_shop_display_customizer_shortcut( 'm_shop_product_slide_list' );?>
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('m_shop_product_list_heading','Product List Carousel'));?></span>
13
+ </h4>
14
+ </div>
15
+ <div class="product_cat_view"><a href="<?php echo esc_url(m_shop_get_prdct_url(get_theme_mod('m_shop_product_list_cat'))); ?>"><?php echo esc_html('View All','m-shop');?></a></div>
16
+ </div>
17
+ <div class="content-wrap">
18
+ <div class="thunk-slide thunk-product-list owl-carousel">
19
+ <?php
20
+ $term_id = get_theme_mod('m_shop_product_list_cat');
21
+ $prdct_optn = get_theme_mod('m_shop_product_list_optn','recent');
22
+ m_shop_product_slide_list_loop($term_id,$prdct_optn);
23
+ ?>
24
+ </div>
25
+ </div>
26
+
27
+ </section>
m-shop/m-shop-front-page/front-productslider.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_product_slide_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-slide-section">
7
+ <?php m_shop_display_customizer_shortcut( 'm_shop_product_slide_section' );?>
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('m_shop_product_slider_heading','Product Carousel'));?></span>
12
+ </h4>
13
+ </div>
14
+ <div class="product_cat_view"><a href="<?php echo esc_url(m_shop_get_prdct_url(get_theme_mod('m_shop_product_slider_cat'))); ?>"><?php echo esc_html('View All','m-shop');?></a></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('m_shop_product_slider_cat');
20
+ $prdct_optn = get_theme_mod('m_shop_product_slide_optn','recent');
21
+ m_shop_product_cat_filter_default_loop($term_id,$prdct_optn);
22
+ ?>
23
+ </div>
24
+ </div>
25
+
26
+ </section>
m-shop/m-shop-front-page/front-ribbon.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_ribbon_sec',false) == true){
3
+ return;
4
+ }
5
+ if(get_theme_mod('m_shop_ribbon_background','image')=='image'){
6
+ ?>
7
+ <section class="thunk-ribbon-section bg-image">
8
+ <?php m_shop_display_customizer_shortcut( 'm_shop_ribbon' );?>
9
+ <div class="content-wrap">
10
+ <div class="container">
11
+ <div class="thunk-ribbon-content">
12
+ <div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('m_shop_ribbon_text','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue lorem id porta volutpat.')); ?></h3>
13
+ </div>
14
+ <?php if(get_theme_mod('m_shop_ribbon_btn_text','Call To Action')!==''):?>
15
+ <div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('m_shop_ribbon_btn_link','#'));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('m_shop_ribbon_btn_text','Call To Action'));?></a>
16
+ </div>
17
+ <?php endif; ?>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </section>
22
+ <?php }elseif(get_theme_mod('m_shop_ribbon_background')=='video'){?>
23
+ <section class="thunk-ribbon-section">
24
+ <video autoplay="autoplay" loop playsinline id="bgvid" muted poster="<?php echo get_theme_mod( 'm_shop_ribbon_video_poster_image'); ?>">
25
+ <source src="<?php echo get_theme_mod( 'm_shop_ribbon_bg_video'); ?>" type="video/mp4" />
26
+ </video>
27
+ <?php m_shop_display_customizer_shortcut( 'm_shop_ribbon' );?>
28
+ <div class="content-wrap">
29
+ <div class="container">
30
+ <div class="thunk-ribbon-content">
31
+ <div class="thunk-ribbon-content-col1" ><h3><?php echo esc_html(get_theme_mod('m_shop_ribbon_text','')); ?></h3>
32
+ </div>
33
+ <?php if(get_theme_mod('m_shop_ribbon_btn_text','')!==''):?>
34
+ <div class="thunk-ribbon-content-col2" ><a href="<?php echo esc_url(get_theme_mod('m_shop_ribbon_btn_link',''));?>" class="ribbon-btn"><?php echo esc_html(get_theme_mod('m_shop_ribbon_btn_text',''));?></a>
35
+ </div>
36
+ <?php endif; ?>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </section>
41
+ <?php }?>
m-shop/m-shop-front-page/front-tabproduct.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_cat_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-product-tab-section">
7
+ <?php m_shop_display_customizer_shortcut( 'm_shop_category_tab_section' );?>
8
+ <!-- thunk head start -->
9
+ <div id="thunk-cat-tab" class="thunk-cat-tab">
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('m_shop_cat_tab_heading','Tabbed Product Carousel'));?></span>
14
+ </h4>
15
+ </div>
16
+ <!-- tab head start -->
17
+ <?php $term_id = get_theme_mod('m_shop_category_tab_list');
18
+ m_shop_category_tab_list($term_id);
19
+ ?>
20
+ </div>
21
+ <!-- tab head end -->
22
+ <div class="content-wrap">
23
+ <div class="tab-content">
24
+ <div class="thunk-slide thunk-product-cat-slide owl-carousel">
25
+ <?php
26
+ $term_id = get_theme_mod('m_shop_category_tab_list');
27
+ $prdct_optn = get_theme_mod('m_shop_category_optn','recent');
28
+ m_shop_product_cat_filter_default_loop($term_id,$prdct_optn);
29
+ ?>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </section>
m-shop/m-shop-front-page/front-tabproductimage.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_product_img_sec',false) == true){
3
+ return;
4
+ }
5
+ if (get_theme_mod('m_shop_product_img_sec_adimg','') != '') {
6
+ $banner_img = 'image-enable';
7
+ }
8
+ else{
9
+ $banner_img = 'image-disable';
10
+ }
11
+ ?>
12
+ <section class="thunk-product-image-tab-section">
13
+ <?php m_shop_display_customizer_shortcut( 'm_shop_product_tab_image' );?>
14
+ <!-- thunk head start -->
15
+ <div id="thunk-cat-tab" class="thunk-cat-tab">
16
+ <div class="thunk-heading-wrap">
17
+ <div class="thunk-heading">
18
+ <h4 class="thunk-title">
19
+ <span class="title"><?php echo esc_html(get_theme_mod('m_shop_product_img_sec_heading','Product Tab Image Carousel'));?></span>
20
+ </h4>
21
+ </div>
22
+ <!-- tab head start -->
23
+ <?php $term_id = get_theme_mod('m_shop_product_img_sec_cat_list');
24
+ m_shop_category_tab_list($term_id);
25
+ ?>
26
+ </div>
27
+ <!-- tab head end -->
28
+ <div class="content-wrap <?php echo esc_attr(get_theme_mod('m_shop_product_img_sec_side')); ?>">
29
+ <?php if (get_theme_mod('m_shop_product_img_sec_adimg','') != '') { ?>
30
+ <div class="tab-image">
31
+ <img src="<?php echo esc_url(get_theme_mod('m_shop_product_img_sec_adimg','')); ?>">
32
+ </div>
33
+ <?php } ?>
34
+ <div class="tab-content <?php echo esc_attr($banner_img); ?>">
35
+ <div class="thunk-slide thunk-product-image-cat-slide owl-carousel">
36
+ <?php
37
+ $term_id = get_theme_mod('m_shop_product_img_sec_cat_list');
38
+ $prdct_optn = get_theme_mod('m_shop_product_img_sec_optn','recent');
39
+ m_shop_product_cat_filter_default_loop($term_id,$prdct_optn);
40
+ ?>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </section>
m-shop/m-shop-front-page/front-testimonial.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_testimonial_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="testimonial-section">
7
+ <?php m_shop_display_customizer_shortcut( 'm_shop_testimonial' );?>
8
+ <div class="thunk-testimonials-wrapper">
9
+ <div class="thunk-testimonial-part">
10
+ <div class="container">
11
+ <div class="th-testimonial owl-carousel">
12
+ <?php
13
+ $default = M_Shop_Defaults_Models::instance()->get_testimonials_default();
14
+
15
+ m_shop_testimonials_content('m_shop_testimonials_content', $default);
16
+ ?>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </section>
m-shop/m-shop-front-page/front-topslider.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(get_theme_mod('m_shop_disable_top_slider_sec',false) == true){
3
+ return;
4
+ }
5
+ ?>
6
+ <section class="thunk-slider-section <?php echo esc_attr(get_theme_mod('m_shop_top_slide_layout','slide-layout-1'));?>">
7
+
8
+ <?php
9
+ m_shop_display_customizer_shortcut( 'm_shop_top_slider_section' );
10
+ if(get_theme_mod('m_shop_top_slide_layout','slide-layout-1')=='slide-layout-1'){?>
11
+ <div class="thunk-slider-content-wrap">
12
+
13
+ <div class="thunk-slider-content-bar">
14
+ <div class="thunk-slider-full-slide owl-carousel">
15
+ <?php m_shop_top_slider_2_content('m_shop_top_slide_content', ''); ?>
16
+ </div>
17
+ </div>
18
+
19
+ </div>
20
+ <?php }elseif(get_theme_mod('m_shop_top_slide_layout')=='slide-layout-6'){?>
21
+
22
+ <div class="thunk-slider-content-wrap">
23
+
24
+ <div class="thunk-slider-content-bar">
25
+ <div class="thunk-slider-full-slide owl-carousel">
26
+ <?php m_shop_top_slider_6_content('m_shop_top_slide_content', ''); ?>
27
+ </div>
28
+ </div>
29
+
30
+ </div>
31
+ <?php } ?>
32
+
33
+ </section>
notify/assets/css/notice.css ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .th-notice-slide-wrapper{
3
+ background: #ffff;
4
+ border: 1px solid #c3c4c7;
5
+ border-left-color: #4f94d4;
6
+ border-inline-start-width: 4px;
7
+ -webkit-box-shadow: var(--e-notice-box-shadow);
8
+ box-shadow: var(--e-notice-box-shadow);
9
+ margin: 5px 20px 5px 2px;
10
+ }
11
+ .th-notice-slide-wrap .thunk-notice {
12
+ padding: 1rem;
13
+ display: flex;
14
+ }
15
+ .th-notice-slide-wrap .thunk-review-thumbnail img{
16
+ width:500px;
17
+ vertical-align: middle;
18
+ }
19
+ .th-notice-slide-wrap .thunk-review-thumbnail {
20
+ float: left;
21
+ text-align: center;
22
+ position: relative;
23
+ display: block;
24
+ margin-right:20px;
25
+ }
26
+ .th-notice-slide-wrap .thunk-review-ul li {
27
+ display: inline-block;
28
+ margin-right:10px;
29
+ }
30
+ .th-notice-slide-wrap .thunk-notice-text{
31
+ position: relative;
32
+ }
33
+ .th-notice-slide-wrap .thunk-notice-text h3 {
34
+ font-size: 24px;
35
+ margin: 0 0 5px;
36
+ font-weight: 400;
37
+ line-height: 1.3;
38
+ }
39
+ .th-notice-slide-wrap .thunk-notice-text p{
40
+ font-size:15px;
41
+ line-height:27px;
42
+ }
notify/assets/images/m-shop.png ADDED
Binary file
notify/notify-html.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="notice th-notice-slide-wrapper" style="display:<?php echo $display; ?>;">
3
+ <div class="th-notice-slide-wrap">
4
+ <?php
5
+ if($theme !== 'm-shop'){ ?>
6
+
7
+ <div class="thunk-notice">
8
+ <div class="thunk-review-thumbnail">
9
+ <a href="https://themehunk.com/product/m-shop"
10
+ target="_blank">
11
+ <img src="<?php echo THEMEHUNK_CUSTOMIZER_PLUGIN_URL; ?>notify/assets/images/m-shop.png"
12
+ alt="Royal Shop - New Free WooCommerce Theme"/>
13
+ </a>
14
+ </div>
15
+ <div class="thunk-notice-text">
16
+ <h3>M Shop - Best Free WooCommerce Theme</h3>
17
+ <a href="?notice-disable=1" class="notice-dismiss dashicons dashicons-dismiss dashicons-dismiss-icon"></a>
18
+ <p>M Shop is an eCommerce WordPress theme specially made for shopping websites. You can create any type of online store website using it. Theme is best suited for Fashion & Clothing store, furniture, grocery, clothing, electronic, gadget store and decorative gifts stores.
19
+ </p>
20
+ <ul class="thunk-review-ul">
21
+ <li class="show-mor-message">
22
+ <a href="https://themehunk.com/product/m-shop/#themedemo/"
23
+ target="_blank">
24
+ <span class="dashicons dashicons-desktop"></span>
25
+ Live Demo
26
+ </a>
27
+ </li>
28
+ <li class="free-download-message">
29
+ <a href="https://themehunk.com/product/m-shop/"
30
+ target="_blank">
31
+ <span class="dashicons dashicons-external"></span>
32
+ Check Detail
33
+ </a>
34
+ </li>
35
+ </ul>
36
+ </div>
37
+ </div> <!--end-->
38
+
39
+ <?php } ?>
40
+
41
+
42
+
43
+ </div>
44
+ </div>
notify/notify.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly.
3
+ if (!defined('ABSPATH')){
4
+ exit;
5
+ }
6
+
7
+ if ( ! class_exists( 'ThemeHunk_Notify' ) ){
8
+
9
+ class ThemeHunk_Notify{
10
+
11
+ function __construct(){
12
+
13
+ if(isset($_GET['notice-disable']) && $_GET['notice-disable'] == true){
14
+ add_action('admin_init', array($this,'set_cookie'));
15
+ }
16
+
17
+
18
+ if(!isset($_COOKIE['thc_time'])) {
19
+ add_action( 'admin_notices', array($this,'notify'));
20
+ add_action( 'admin_enqueue_scripts', array($this,'enqueue') );
21
+
22
+ }
23
+
24
+ if(isset($_COOKIE['thc_time'])) {
25
+ add_action( 'admin_notices', array($this,'unset_cookie'));
26
+ }
27
+
28
+ }
29
+
30
+ function enqueue(){
31
+ wp_enqueue_style( 'hunk-companion-notice', THEMEHUNK_CUSTOMIZER_PLUGIN_URL.'notify/assets/css/notice.css', array(), '1.0.0' );
32
+ }
33
+
34
+
35
+ function set_cookie() {
36
+
37
+ $visit_time = date('F j, Y g:i a');
38
+
39
+ $cok_time = time()+(86457*30);
40
+
41
+ if(!isset($_COOKIE['thc_time'])) {
42
+
43
+ // set a cookie for 1 year
44
+ setcookie('thc_time', $cok_time, time()+(86457*30));
45
+
46
+ }
47
+
48
+ }
49
+
50
+ function unset_cookie(){
51
+
52
+ $visit_time = time();
53
+ $cookie_time = $_COOKIE['thc_time'];
54
+
55
+ if ($cookie_time < $visit_time) {
56
+ setcookie('thc_time', null, strtotime('-1 day'));
57
+ }
58
+ }
59
+
60
+ function notify(){
61
+ $my_theme = wp_get_theme();
62
+ $theme = esc_html( $my_theme->get( 'TextDomain' ) );
63
+ $display = isset($_GET['notice-disable'])?'none':'block';
64
+
65
+ require_once THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . 'notify/notify-html.php';
66
+
67
+
68
+ }
69
+
70
+
71
+ }
72
+
73
+ $obj = New ThemeHunk_Notify();
74
+
75
+ } // if class end ?>
oneline-lite/customizer/custom-customizer.php CHANGED
File without changes
oneline-lite/customizer/customizer.php CHANGED
File without changes
oneline-lite/customizer/customizer_styles.css CHANGED
File without changes
oneline-lite/customizer/js/customizer.js CHANGED
File without changes
oneline-lite/customizer/js/widget.js CHANGED
File without changes
oneline-lite/demo/import-data.php CHANGED
@@ -1,7 +1,6 @@
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 onelinelite_import_files(){
6
  return apply_filters(
7
  'onelinelite_demo_site', array(
@@ -10,6 +9,15 @@ function onelinelite_import_files(){
10
  'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/blogs.xml'),
11
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/customizer.dat'),
12
  'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/widgets.wie'),
 
 
 
 
 
 
 
 
 
13
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'oneline-lite' ),
14
  ),
15
  )
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
  function onelinelite_import_files(){
5
  return apply_filters(
6
  'onelinelite_demo_site', array(
9
  'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/blogs.xml'),
10
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/customizer.dat'),
11
  'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/widgets.wie'),
12
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/thumb.png'),
13
+ 'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'oneline-lite' ),
14
+ ),
15
+ array(
16
+ 'import_file_name' => esc_html__('OnelineLite Dark','oneline-lite'),
17
+ 'import_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/dark/blogs.xml'),
18
+ 'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/dark/customizer.dat'),
19
+ 'import_widget_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/dark/widgets.wie'),
20
+ 'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/oneline-lite/dark/thumb.png'),
21
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'oneline-lite' ),
22
  ),
23
  )
oneline-lite/images/slider.jpeg CHANGED
File without changes
oneline-lite/images/team.jpg CHANGED
File without changes
oneline-lite/images/testimonia.png CHANGED
File without changes
oneline-lite/inc/constant.php CHANGED
File without changes
oneline-lite/inc/custom-style.php CHANGED
File without changes
oneline-lite/inc/install.php CHANGED
File without changes
oneline-lite/inc/shortcode.php CHANGED
@@ -198,7 +198,7 @@ function themehunk_customizer_oneline_social(){
198
  $social = '<ul>
199
  <li class="post-social-social-fb"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.get_permalink().'"></a></li>
200
  <li class="post-social-social-tw"><a target="_blank" href="https://twitter.com/home?status='.get_the_title().'-'.get_permalink().'"></a></li>
201
- <li class="post-social-social-gm"><a target="_blank" href="https://plus.google.com/share?url='.get_permalink().'"></a></li>
202
  <li class="post-social-social-ln"><a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url='. get_permalink().'&title='.get_the_title().'&source=LinkedIn"></a></li>
203
  </ul>';
204
  return $social;
198
  $social = '<ul>
199
  <li class="post-social-social-fb"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.get_permalink().'"></a></li>
200
  <li class="post-social-social-tw"><a target="_blank" href="https://twitter.com/home?status='.get_the_title().'-'.get_permalink().'"></a></li>
201
+ <li class="post-social-social-wt"><a target="_blank" href="https://api.whatsapp.com/send?text='.get_permalink().'" ></a></li>
202
  <li class="post-social-social-ln"><a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url='. get_permalink().'&title='.get_the_title().'&source=LinkedIn"></a></li>
203
  </ul>';
204
  return $social;
oneline-lite/widget/services.php CHANGED
File without changes
oneline-lite/widget/team.php CHANGED
File without changes
oneline-lite/widget/testimonial.php CHANGED
File without changes
readme.txt CHANGED
@@ -1,257 +1,361 @@
1
- ====== ThemeHunk Customizer ========
2
- Contributors: ThemeHunk
3
- Author URI: : https://www.themehunk.com/
4
- Tags: themehunk, customizer, oneline-lite,Testimonial,Team, service
5
- Requires at least: 4.5
6
- Tested up to: 5.3.2
7
- Stable tag: 2.2.9
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- ThemeHunk Customiser plugin will add features of testimonial, team and service.
12
-
13
- == Description ==
14
-
15
- ThemeHunk Customiser plugin will allow you to add features of testimonial, team and service section. Which will be visible on front page of site.
16
-
17
- == Installation ==
18
-
19
- 1. Upload the `themehunk-customizer.zip` to the `/wp-content/plugins/` directory
20
- 2. Activate the plugin through the 'Plugins' menu in WordPress
21
-
22
- == Frequently Asked Questions ==
23
-
24
- = How to Install Plugin =
25
- Just upload the `themehunk-customizer.zip` to the `/wp-content/plugins/` directory, and then activate it from 'Plugins' menu in WordPress.
26
-
27
- 1. [Support Forum](https://wordpress.org/support/plugin/themehunk-customizer)
28
-
29
- == Screenshots ==
30
-
31
- == Changelog ==
32
-
33
- = 2.2.9 =
34
- * shopline - woocommerce issue fixed.
35
-
36
- = 2.2.8 =
37
- * shopline - woocommerce issue fixed.
38
-
39
- = 2.2.7 =
40
- * Featuredlite - animation issue fixed.
41
-
42
- = 2.2.6 =
43
- * Shopline - google plus icon remove and social icon issue fixed.
44
-
45
- = 2.2.5 =
46
- * Shopline - styling issue fixed.
47
- * Featuredlite - Customizer issue fixed.
48
-
49
- = 2.2.3 =
50
- * Shopline - customizer issue fixed.
51
- * Featuredlite - demo import feature added.
52
-
53
- = 2.2.2 =
54
- * Shopline - demo import path change.
55
-
56
- = 2.2.1 =
57
- * online-lite - Demo import issue fixed.
58
-
59
- = 2.2.0 =
60
- * online-lite - Demo import feature added.
61
-
62
- = 2.1.11 =
63
- * shopline - Demo import issue fixed
64
-
65
- = 2.1.10 =
66
- * shopline - product issue fixed.
67
-
68
- = 2.1.9 =
69
- * featuredlite - tel: issue fixed in contact section.
70
-
71
- = 2.1.8=
72
- * featuredlite - fontawsome issue fixed.
73
-
74
- = 2.1.7=
75
- * featuredlite - button scroll issue fixed.
76
-
77
- = 2.1.6=
78
- * shopline - bug fixed.
79
-
80
- = 2.1.5=
81
- * elanzalite - shortcode issue fixed.
82
-
83
- = 2.1.4=
84
- * elanzalite - issue fixed.
85
-
86
- = 2.1.3=
87
- * shopline- php7.2 Deprecated function 'create_function()' issue fixed.
88
-
89
- = 2.1.2=
90
- * shopline- Deprecated function issue fixed.
91
-
92
- = 2.1.1=
93
- * shopline- error fixed.
94
-
95
- = 2.1.0=
96
- * shopline- section ordering issue fixed.
97
- * shopline- no-header inner page issue fixed.
98
-
99
- = 2.0.27=
100
- * Widget issue fixed.
101
-
102
- = 2.0.26=
103
- * shopline - Radio image issue fixed.
104
-
105
- = 2.0.25=
106
- * shopline - customizer issue fixed.
107
-
108
- = 2.0.24=
109
- * shopline - scrolling issue fixed.
110
-
111
- = 2.0.23=
112
- * shopline - header redirect issue fixed.
113
-
114
- = 2.0.22=
115
- * shopline - product category issue fixed.
116
-
117
- = 2.0.21=
118
- * shopline - images change.
119
-
120
- = 2.0.20=
121
- * shopline - bug fixed.
122
- * shopline - woocommerce error fixed.
123
- * featuredlite - team section social icon hide issue fixed.
124
-
125
- = 2.0.19=
126
- * shopline - heading issue fixed.
127
- * featuredlite - team section social icon link fixed.
128
-
129
- = 2.0.18=
130
- * shopline - new shortcode added.
131
-
132
- = 2.0.17=
133
- * shopline - new file added and bug fixed.
134
-
135
- = 2.0.16=
136
- * shopline - New customizer design added.
137
-
138
- = 2.0.15=
139
- * shopline - shopline issue fixed.
140
-
141
- = 2.0.14=
142
- * elanzalite - new file added.
143
-
144
- = 2.0.13=
145
- * elanzalite - new feature added.
146
-
147
- = 2.0.12=
148
- * elanzalite - issue fixed.
149
-
150
- = 2.0.11=
151
- * elanzalite - new tricker file added.
152
- * style issue fixed.
153
-
154
- = 2.0.10=
155
- * elanzalite - customizer and style issue fixed.
156
-
157
- = 2.0.9=
158
- * elanzalite text issue fixed.
159
-
160
- = 2.0.8 =
161
- * elanzalite new file added.
162
-
163
- = 2.0.7 =
164
- * elanzalite widget added.
165
-
166
- = 2.0.6 =
167
- * elanzalite style improved.
168
-
169
- = 2.0.5 =
170
- * Elanzalite: sidebar and without sidebar magazine tempalte widget added.
171
-
172
- = 2.0.4 =
173
- * Elanzalite theme error issue fixed.
174
-
175
- = 2.0.3 =
176
- * Elanzalite recent post error issue fixed.
177
-
178
- = 2.0.2 =
179
- * Elanzalite customizer option change.
180
-
181
- = 2.0.1 =
182
- * Shopline theme error issue fixed.
183
-
184
- = 2.0.0 =
185
- * elanzalite theme customizer added.
186
-
187
- = 1.1.9 =
188
- * alpha color picker issue fixed.
189
-
190
- = 1.1.8 =
191
- * WordPress 4.9 tested.
192
- * online-lite theme issue fixed.
193
-
194
- = 1.1.7 =
195
- * Shopline customizer error issue fixed.
196
-
197
- = 1.1.6 =
198
- * Shopline error issue fixed.
199
-
200
- = 1.1.5 =
201
- * Shopline Theme issue fixed.
202
-
203
- = 1.1.4 =
204
- * Shopline Theme improved.
205
-
206
- = 1.1.3 =
207
- * Shopline Theme add new feature.
208
-
209
- = 1.1.2 =
210
- * Shopline Theme style improved.
211
-
212
- = 1.1.1 =
213
- * Shopline Theme image console issue fixed.
214
-
215
- = 1.1.0 =
216
- * Shopline Theme Customizer added.
217
-
218
- = 1.0.12 =
219
- * Checkbox js issue fixed.
220
-
221
- = 1.0.11 =
222
- * online-lite js issue fixed.
223
-
224
- = 1.0.10 =
225
- * Child Theme issue fixed.
226
-
227
- = 1.0.9 =
228
- * online-lite theme issue fixed.
229
-
230
- = 1.0.8 =
231
- * Add color option.
232
- * All issue fixed.
233
-
234
- = 1.0.7 =
235
- * New section add.
236
-
237
- = 1.0.6 =
238
- * error issue fixd.
239
-
240
- = 1.0.5 =
241
- * deprecated issue fixd.
242
-
243
- = 1.0.4 =
244
- * delete old folders
245
-
246
- = 1.0.3 =
247
- * fix issue
248
-
249
- = 1.0.2 =
250
- * new shortcode added.
251
- * issue fix.
252
-
253
- = 1.0.1 =
254
- * woocommerce shortcode added.
255
-
256
- = 1.0.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  Initial release
1
+ ====== ThemeHunk Customizer ========
2
+ 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.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ ThemeHunk Customiser plugin will add features of testimonial, team and service.
12
+
13
+ == Description ==
14
+
15
+ ThemeHunk Customiser plugin will allow you to add features of testimonial, team and service section. Which will be visible on front page of site.
16
+
17
+ == Installation ==
18
+
19
+ 1. Upload the `themehunk-customizer.zip` to the `/wp-content/plugins/` directory
20
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
21
+
22
+ == Frequently Asked Questions ==
23
+
24
+ = How to Install Plugin =
25
+ Just upload the `themehunk-customizer.zip` to the `/wp-content/plugins/` directory, and then activate it from 'Plugins' menu in WordPress.
26
+
27
+ 1. [Support Forum](https://wordpress.org/support/plugin/themehunk-customizer)
28
+
29
+ == Screenshots ==
30
+
31
+ == Changelog ==
32
+ = 2.5.1 =
33
+ * Jot-Shop Theme Added.
34
+
35
+ = 2.5.0 =
36
+ * M-shop post publish and image cropping issue fixed.
37
+ * Shopline post publish and image cropping issue fixed.
38
+ * Elanzalite post publish issue fixed.
39
+
40
+ = 2.4.15 =
41
+ * Notify slider removed.
42
+
43
+ = 2.4.14 =
44
+ * Big store - Product Catalog Cropping added.
45
+
46
+ = 2.4.13 =
47
+ * Issue Fixed.
48
+
49
+ = 2.4.12 =
50
+ * Notify Updated.
51
+
52
+ = 2.4.11 =
53
+ * Demo import preview link updated in all Themes.
54
+
55
+ = 2.4.10 =
56
+ * Big Store - bug fixed.
57
+
58
+ = 2.4.9 =
59
+ * iframe notify issue fixed.
60
+
61
+ = 2.4.8 =
62
+ * iframe notify add.
63
+
64
+ = 2.4.7 =
65
+ * mshop notify images add.
66
+
67
+ = 2.4.6 =
68
+ * mshop theme image issue fixed.
69
+
70
+ = 2.4.5 =
71
+ * mshop theme issue fixed.
72
+
73
+ = 2.4.4 =
74
+ * mshop theme added.
75
+
76
+ = 2.4.3 =
77
+ * bug fixed.
78
+
79
+ = 2.4.2 =
80
+ * wp_query change and product issue fix.
81
+
82
+ = 2.4.1 =
83
+ * New theme notify information add.
84
+
85
+ = 2.4.0 =
86
+ * Big store - new plugin added.
87
+
88
+ = 2.3.13 =
89
+ * Themehunk notify style issue fixed.
90
+
91
+ = 2.3.12 =
92
+ * Big store issue fixed.
93
+
94
+ = 2.3.11 =
95
+ * Themehunk notify issue fixed.
96
+
97
+ = 2.3.10 =
98
+ * big store bug fixed.
99
+
100
+ = 2.3.9 =
101
+ * big store bug fixed.
102
+
103
+ = 2.3.8 =
104
+ * big store new demo added
105
+
106
+ = 2.3.7 =
107
+ * big store link issue solved.
108
+
109
+ = 2.3.6 =
110
+ * Big Store - demo file include issue fixed.
111
+ * new theme image add.
112
+
113
+ = 2.3.5 =
114
+ * Big Store - Demo file added.
115
+
116
+ = 2.3.4 =
117
+ * Big Store - new shop theme added.
118
+
119
+ = 2.3.3 =
120
+ * shopline - product price color issue fixed.
121
+
122
+ = 2.3.2 =
123
+ * shopline - customizer issue fixed.
124
+
125
+ = 2.3.1 =
126
+ * wordpress 5.5 compatible issue checked.
127
+
128
+ = 2.3.0 =
129
+ * oneline-lite - new demo added.
130
+
131
+ = 2.2.11 =
132
+ * oneline-lite - shortcode issue fixed.
133
+
134
+ = 2.2.10 =
135
+ * shopline - issue fixed.
136
+
137
+ = 2.2.9 =
138
+ * shopline - woocommerce issue fixed.
139
+
140
+ = 2.2.8 =
141
+ * shopline - woocommerce issue fixed.
142
+
143
+ = 2.2.7 =
144
+ * Featuredlite - animation issue fixed.
145
+
146
+ = 2.2.6 =
147
+ * Shopline - google plus icon remove and social icon issue fixed.
148
+
149
+ = 2.2.5 =
150
+ * Shopline - styling issue fixed.
151
+ * Featuredlite - Customizer issue fixed.
152
+
153
+ = 2.2.3 =
154
+ * Shopline - customizer issue fixed.
155
+ * Featuredlite - demo import feature added.
156
+
157
+ = 2.2.2 =
158
+ * Shopline - demo import path change.
159
+
160
+ = 2.2.1 =
161
+ * online-lite - Demo import issue fixed.
162
+
163
+ = 2.2.0 =
164
+ * online-lite - Demo import feature added.
165
+
166
+ = 2.1.11 =
167
+ * shopline - Demo import issue fixed
168
+
169
+ = 2.1.10 =
170
+ * shopline - product issue fixed.
171
+
172
+ = 2.1.9 =
173
+ * featuredlite - tel: issue fixed in contact section.
174
+
175
+ = 2.1.8=
176
+ * featuredlite - fontawsome issue fixed.
177
+
178
+ = 2.1.7=
179
+ * featuredlite - button scroll issue fixed.
180
+
181
+ = 2.1.6=
182
+ * shopline - bug fixed.
183
+
184
+ = 2.1.5=
185
+ * elanzalite - shortcode issue fixed.
186
+
187
+ = 2.1.4=
188
+ * elanzalite - issue fixed.
189
+
190
+ = 2.1.3=
191
+ * shopline- php7.2 Deprecated function 'create_function()' issue fixed.
192
+
193
+ = 2.1.2=
194
+ * shopline- Deprecated function issue fixed.
195
+
196
+ = 2.1.1=
197
+ * shopline- error fixed.
198
+
199
+ = 2.1.0=
200
+ * shopline- section ordering issue fixed.
201
+ * shopline- no-header inner page issue fixed.
202
+
203
+ = 2.0.27=
204
+ * Widget issue fixed.
205
+
206
+ = 2.0.26=
207
+ * shopline - Radio image issue fixed.
208
+
209
+ = 2.0.25=
210
+ * shopline - customizer issue fixed.
211
+
212
+ = 2.0.24=
213
+ * shopline - scrolling issue fixed.
214
+
215
+ = 2.0.23=
216
+ * shopline - header redirect issue fixed.
217
+
218
+ = 2.0.22=
219
+ * shopline - product category issue fixed.
220
+
221
+ = 2.0.21=
222
+ * shopline - images change.
223
+
224
+ = 2.0.20=
225
+ * shopline - bug fixed.
226
+ * shopline - woocommerce error fixed.
227
+ * featuredlite - team section social icon hide issue fixed.
228
+
229
+ = 2.0.19=
230
+ * shopline - heading issue fixed.
231
+ * featuredlite - team section social icon link fixed.
232
+
233
+ = 2.0.18=
234
+ * shopline - new shortcode added.
235
+
236
+ = 2.0.17=
237
+ * shopline - new file added and bug fixed.
238
+
239
+ = 2.0.16=
240
+ * shopline - New customizer design added.
241
+
242
+ = 2.0.15=
243
+ * shopline - shopline issue fixed.
244
+
245
+ = 2.0.14=
246
+ * elanzalite - new file added.
247
+
248
+ = 2.0.13=
249
+ * elanzalite - new feature added.
250
+
251
+ = 2.0.12=
252
+ * elanzalite - issue fixed.
253
+
254
+ = 2.0.11=
255
+ * elanzalite - new tricker file added.
256
+ * style issue fixed.
257
+
258
+ = 2.0.10=
259
+ * elanzalite - customizer and style issue fixed.
260
+
261
+ = 2.0.9=
262
+ * elanzalite text issue fixed.
263
+
264
+ = 2.0.8 =
265
+ * elanzalite new file added.
266
+
267
+ = 2.0.7 =
268
+ * elanzalite widget added.
269
+
270
+ = 2.0.6 =
271
+ * elanzalite style improved.
272
+
273
+ = 2.0.5 =
274
+ * Elanzalite: sidebar and without sidebar magazine tempalte widget added.
275
+
276
+ = 2.0.4 =
277
+ * Elanzalite theme error issue fixed.
278
+
279
+ = 2.0.3 =
280
+ * Elanzalite recent post error issue fixed.
281
+
282
+ = 2.0.2 =
283
+ * Elanzalite customizer option change.
284
+
285
+ = 2.0.1 =
286
+ * Shopline theme error issue fixed.
287
+
288
+ = 2.0.0 =
289
+ * elanzalite theme customizer added.
290
+
291
+ = 1.1.9 =
292
+ * alpha color picker issue fixed.
293
+
294
+ = 1.1.8 =
295
+ * WordPress 4.9 tested.
296
+ * online-lite theme issue fixed.
297
+
298
+ = 1.1.7 =
299
+ * Shopline customizer error issue fixed.
300
+
301
+ = 1.1.6 =
302
+ * Shopline error issue fixed.
303
+
304
+ = 1.1.5 =
305
+ * Shopline Theme issue fixed.
306
+
307
+ = 1.1.4 =
308
+ * Shopline Theme improved.
309
+
310
+ = 1.1.3 =
311
+ * Shopline Theme add new feature.
312
+
313
+ = 1.1.2 =
314
+ * Shopline Theme style improved.
315
+
316
+ = 1.1.1 =
317
+ * Shopline Theme image console issue fixed.
318
+
319
+ = 1.1.0 =
320
+ * Shopline Theme Customizer added.
321
+
322
+ = 1.0.12 =
323
+ * Checkbox js issue fixed.
324
+
325
+ = 1.0.11 =
326
+ * online-lite js issue fixed.
327
+
328
+ = 1.0.10 =
329
+ * Child Theme issue fixed.
330
+
331
+ = 1.0.9 =
332
+ * online-lite theme issue fixed.
333
+
334
+ = 1.0.8 =
335
+ * Add color option.
336
+ * All issue fixed.
337
+
338
+ = 1.0.7 =
339
+ * New section add.
340
+
341
+ = 1.0.6 =
342
+ * error issue fixd.
343
+
344
+ = 1.0.5 =
345
+ * deprecated issue fixd.
346
+
347
+ = 1.0.4 =
348
+ * delete old folders
349
+
350
+ = 1.0.3 =
351
+ * fix issue
352
+
353
+ = 1.0.2 =
354
+ * new shortcode added.
355
+ * issue fix.
356
+
357
+ = 1.0.1 =
358
+ * woocommerce shortcode added.
359
+
360
+ = 1.0.0 =
361
  Initial release
shopline/customizer/custom-customizer.php CHANGED
File without changes
shopline/customizer/customizer.php CHANGED
@@ -329,7 +329,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
329
  'section' => 'header_setting',
330
  'tabs' => array(
331
  'woo_cat_setting' => array(
332
- 'nicename' => esc_html__( 'Setting', 'hestia' ),
333
  'controls' => array(
334
  'shopline_sticky_header_disable',
335
  'hdr_bg_trnsparent_active',
@@ -339,7 +339,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
339
  ),
340
  ),
341
  'woo_cat_style' => array(
342
- 'nicename' => esc_html__( 'Style', 'hestia' ),
343
  'controls' => array(
344
  'header_break_color',
345
  'headr_bckg',
@@ -621,7 +621,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
621
  'section' => 'front_page_hero',
622
  'tabs' => array(
623
  'woo_cat_setting' => array(
624
- 'nicename' => esc_html__( 'Setting', 'hestia' ),
625
  'controls' => array(
626
  'front_page_doc_link',
627
  'shopline_front_page_set',
@@ -670,7 +670,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
670
  ),
671
  ),
672
  'woo_cat_style' => array(
673
- 'nicename' => esc_html__( 'Style', 'hestia' ),
674
  'controls' => array(
675
  'hero_overlay_set',
676
  'normal_slider_bg_overly',
@@ -1520,7 +1520,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
1520
  'section' => 'inner_page_hero',
1521
  'tabs' => array(
1522
  'woo_cat_setting' => array(
1523
- 'nicename' => esc_html__( 'Setting', 'hestia' ),
1524
  'controls' => array(
1525
  'inner_page_doc_link',
1526
  'shopline_inner_page_set',
@@ -1541,7 +1541,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
1541
  ),
1542
  ),
1543
  'woo_cat_style' => array(
1544
- 'nicename' => esc_html__( 'Style', 'hestia' ),
1545
  'controls' => array(
1546
  'inner_hero_overlay_set',
1547
  'inner_bg_overly',
@@ -1765,7 +1765,7 @@ $wp_customize->add_setting(
1765
  $wp_customize, 'inner_hero_image', array(
1766
  'priority' => 25,
1767
  'section' => 'inner_page_hero',
1768
- 'button_text' => esc_html__( 'Header Image', 'hestia' ),
1769
  'button_class' => 'focus-customizer-header-image',
1770
 
1771
  )
@@ -1937,7 +1937,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
1937
  'section' => 'woo_cate_slider_setting',
1938
  'tabs' => array(
1939
  'woo_cat_setting' => array(
1940
- 'nicename' => esc_html__( 'Setting', 'hestia' ),
1941
  'controls' => array(
1942
  'cat_doc',
1943
  'woo_cate_section_hide',
@@ -1954,7 +1954,7 @@ if ( class_exists( 'Themehunk_Customize_Control_Tabs' ) ) {
1954
  ),
1955
  ),
1956
  'woo_cat_style' => array(
1957
- 'nicename' => esc_html__( 'Style', 'hestia' ),
1958
  'controls' => array(
1959
  'woo_cate_image_bg',
1960
  'woo_cat_svg_style',
@@ -5535,7 +5535,7 @@ $wp_customize->add_setting(
5535
  $wp_customize, 'widget_redirect', array(
5536
  'priority' => 25,
5537
  'section' => 'footer_setting',
5538
- 'button_text' => esc_html__( 'Go to widget', 'hestia' ),
5539
  'button_class' => 'focus-customizer-widget-redirect',
5540
 
5541
  )
@@ -5565,7 +5565,7 @@ $wp_customize->add_setting(
5565
  $wp_customize, 'menu_redirect', array(
5566
  'priority' => 27,
5567
  'section' => 'footer_setting',
5568
- 'button_text' => esc_html__( 'Go to Menu', 'hestia' ),
5569
  'button_class' => 'focus-customizer-menu-redirect',
5570
 
5571
  )
329
  'section' => 'header_setting',
330
  'tabs' => array(
331
  'woo_cat_setting' => array(
332
+ 'nicename' => esc_html__( 'Setting', 'shopline' ),
333
  'controls' => array(
334
  'shopline_sticky_header_disable',
335
  'hdr_bg_trnsparent_active',
339
  ),
340
  ),
341
  'woo_cat_style' => array(
342
+ 'nicename' => esc_html__( 'Style', 'shopline' ),
343
  'controls' => array(
344
  'header_break_color',
345
  'headr_bckg',
621
  'section' => 'front_page_hero',
622
  'tabs' => array(
623
  'woo_cat_setting' => array(
624
+ 'nicename' => esc_html__( 'Setting', 'shopline' ),
625
  'controls' => array(
626
  'front_page_doc_link',
627
  'shopline_front_page_set',
670
  ),
671
  ),
672
  'woo_cat_style' => array(
673
+ 'nicename' => esc_html__( 'Style', 'shopline' ),
674
  'controls' => array(
675
  'hero_overlay_set',
676
  'normal_slider_bg_overly',
1520
  'section' => 'inner_page_hero',
1521
  'tabs' => array(
1522
  'woo_cat_setting' => array(
1523
+ 'nicename' => esc_html__( 'Setting', 'shopline' ),
1524
  'controls' => array(
1525
  'inner_page_doc_link',
1526
  'shopline_inner_page_set',
1541
  ),
1542
  ),
1543
  'woo_cat_style' => array(
1544
+ 'nicename' => esc_html__( 'Style', 'shopline' ),
1545
  'controls' => array(
1546
  'inner_hero_overlay_set',
1547
  'inner_bg_overly',
1765
  $wp_customize, 'inner_hero_image', array(
1766
  'priority' => 25,
1767
  'section' => 'inner_page_hero',
1768
+ 'button_text' => esc_html__( 'Header Image', 'shopline' ),
1769
  'button_class' => 'focus-customizer-header-image',
1770
 
1771
  )
1937
  'section' => 'woo_cate_slider_setting',
1938
  'tabs' => array(
1939
  'woo_cat_setting' => array(
1940
+ 'nicename' => esc_html__( 'Setting', 'shopline' ),
1941
  'controls' => array(
1942
  'cat_doc',
1943
  'woo_cate_section_hide',
1954
  ),
1955
  ),
1956
  'woo_cat_style' => array(
1957
+ 'nicename' => esc_html__( 'Style', 'shopline' ),
1958
  'controls' => array(
1959
  'woo_cate_image_bg',
1960
  'woo_cat_svg_style',
5535
  $wp_customize, 'widget_redirect', array(
5536
  'priority' => 25,
5537
  'section' => 'footer_setting',
5538
+ 'button_text' => esc_html__( 'Go to widget', 'shopline' ),
5539
  'button_class' => 'focus-customizer-widget-redirect',
5540
 
5541
  )
5565
  $wp_customize, 'menu_redirect', array(
5566
  'priority' => 27,
5567
  'section' => 'footer_setting',
5568
+ 'button_text' => esc_html__( 'Go to Menu', 'shopline' ),
5569
  'button_class' => 'focus-customizer-menu-redirect',
5570
 
5571
  )
shopline/customizer/customizer_styles.css CHANGED
@@ -125,7 +125,7 @@ li.customize-control textarea,
125
  li.customize-control select,
126
  li.customize-control .wp-picker-container,
127
  li.customize-control #input_front_garedient_hero,
128
- li.customize-control .selection span,.hestia-tabs-control,
129
  li.customize-control ul,
130
  li.customize-control .description,
131
  li#customize-control-testm_play,
125
  li.customize-control select,
126
  li.customize-control .wp-picker-container,
127
  li.customize-control #input_front_garedient_hero,
128
+ li.customize-control .selection span,.shopline-tabs-control,
129
  li.customize-control ul,
130
  li.customize-control .description,
131
  li#customize-control-testm_play,
shopline/customizer/images/th-logo.png CHANGED
File without changes
shopline/customizer/js/customizer.js CHANGED
File without changes
shopline/customizer/js/pe-customize-controls.js CHANGED
File without changes
shopline/customizer/js/widget.js CHANGED
File without changes
shopline/customizer/pe-customize-controls.css CHANGED
File without changes
shopline/demo/import-shopline-data.php CHANGED
@@ -9,7 +9,7 @@ function shopline_import_files(){
9
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-1/customizer.dat'),
10
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-1/widgets.wie'),
11
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-1/thumb.png'),
12
- 'preview_url'=> esc_url('https://themehunk.com/wp-themes/shopline/'),
13
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
14
  ),
15
  array(
@@ -18,7 +18,7 @@ function shopline_import_files(){
18
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-2/customizer.dat'),
19
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-2/widgets.wie'),
20
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-2/thumb.png'),
21
- 'preview_url'=> esc_url('https://themehunk.com/wp-themes/shopline-demo3/'),
22
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
23
  ),
24
  array(
@@ -27,7 +27,7 @@ function shopline_import_files(){
27
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-3/customizer.dat'),
28
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-3/widgets.wie'),
29
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-3/thumb.png'),
30
- 'preview_url'=> esc_url('https://themehunk.com/wp-themes/shopline-demo2/'),
31
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
32
  ),
33
  array(
@@ -36,7 +36,7 @@ function shopline_import_files(){
36
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-4/customizer.dat'),
37
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-4/widgets.wie'),
38
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-4/thumb.png'),
39
- 'preview_url'=> esc_url('https://themehunk.com/wp-themes/shopline-demo1/'),
40
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
41
  ),
42
  );
9
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-1/customizer.dat'),
10
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-1/widgets.wie'),
11
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-1/thumb.png'),
12
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/shopline/'),
13
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
14
  ),
15
  array(
18
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-2/customizer.dat'),
19
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-2/widgets.wie'),
20
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-2/thumb.png'),
21
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/shopline-demo3/'),
22
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
23
  ),
24
  array(
27
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-3/customizer.dat'),
28
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-3/widgets.wie'),
29
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-3/thumb.png'),
30
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/shopline-demo2/'),
31
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
32
  ),
33
  array(
36
  'import_customizer_file_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-4/customizer.dat'),
37
  'import_widget_file_url'=>esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-4/widgets.wie'),
38
  'import_preview_image_url'=> esc_url('https://themehunk.com/wp-content/uploads/sites-demo/shopline-lite/demo-4/thumb.png'),
39
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/shopline-demo1/'),
40
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'shopline' ),
41
  ),
42
  );
shopline/inc/constant.php CHANGED
File without changes
shopline/inc/custom-style.php CHANGED
@@ -8,14 +8,14 @@ $theme_color = get_theme_mod('theme_color','#e7c09c');
8
  $shopline_style .=".cart-widget .cart-crl, .cat-grid .catli figure.cat-img:hover .caption-heading{background:{$theme_color};}
9
  .add_to_wishlist_a .show a:before, #testimonial_section a.web-link:hover, .lst-post figure.blog-list .blog-date b, .lst-post figure.blog-list i, .lst-post .read-more a, .lst-post figure.blog-list h3 a:hover, #best_sell_section a:hover,
10
  #shopmain #wp-calendar tbody td a, #shopmain #wp-calendar tbody
11
- td#today, .sidenav a:hover, #shopmain .woocommerce-breadcrumb, .woocommerce-page .yith-wcwl-wishlistexistsbrowse.show:before, .woocommerce-page .yith-wcwl-wishlistaddedbrowse.show:before, .sidebar-inner-widget ul li a:hover, .woocommerce a.button.alt, .woocommerce input.button.alt, #shopmain .woocommerce-MyAccount-navigation ul li a:hover, #shopmain .woocommerce-info a:hover, #shopmain.woocommerce.woocommerce-account input.button:hover, .woocommerce a.button:hover,.woocommerce input.button:hover, #accordion .sidebar-quickcart p.buttons a:hover, figure.post-content span.read-more a:hover, .product-content-wrapper .add_to_wishlist_url .show a:before, #shopmain .woocommerce-MyAccount-content p strong, .woocommerce .price_slider_amount button.button:hover, .featured-grid .yith-wcwl-wishlistaddedbrowse.show a:before, .featured-grid .yith-wcwl-wishlistexistsbrowse.show a:before,.widget p.buttons a,.th-widget-recent-post .th-recent-post h5 a:hover, #shopmain #wp-calendar tfoot td#prev a:hover, .breadcrumb ul li a, .breadcrumb ul li span, .breadcrumb-trail,.last-btn.shrink #menu >li:last-child > a{color:{$theme_color};}
12
  .lst-post .read-more a, .lst-post .read-more a:hover, .widget p.buttons a, #shopmain #wp-calendar tbody
13
  td#today, #accordion .sidebar-quickcart p.buttons a, .woocommerce a.button.alt, .woocommerce a.button.alt:hover, .woocommerce input.button.alt, .woocommerce input.button.alt:hover, #shopmain .woocommerce-info a, #shopmain .woocommerce-info a:hover, #shopmain.woocommerce.woocommerce-account input.button, .woocommerce a.button:hover, .woocommerce a.button, .woocommerce input.button, .woocommerce input.button:hover, #accordion .sidebar-quickcart p.buttons a:hover, .woocommerce .widget a.button:hover, figure.post-content span.read-more a,.woocommerce .price_slider_amount button.button,
14
  #commentform textarea#comment:focus,
15
  #commentform input#author:focus,
16
  #commentform input#email:focus,
17
- #commentform input#url:focus{border-color:{$theme_color};}
18
- .lst-post .read-more a:hover, #accordion .sidebar-quickcart p.buttons a, .woocommerce a.button, .woocommerce input.button, .woocommerce a.button.alt:hover, #shopmain .woocommerce-info a, .woocommerce input.button.alt:hover, #shopmain.woocommerce-account .addresses .title .edit, figure.post-content span.read-more a, .tagcloud a:hover, .navigation.pagination span.current, .navigation.pagination span:hover, .navigation.pagination a:hover,.woocommerce .price_slider_amount button.button,.last-btn.shrink #menu >li:last-child.menu-item-has-children > a:after, .last-btn.shrink #menu >li:last-child.menu-item-has-children > a:before{background:{$theme_color};}
19
  #shopmain.woocommerce a.remove{color:{$theme_color}!important;}
20
  #shopmain.woocommerce nav.woocommerce-pagination ul li a:focus,#shopmain.woocommerce nav.woocommerce-pagination ul li a:hover, #shopmain.woocommerce nav.woocommerce-pagination ul li span.current, .post-comment a, #move-to-top{
21
  background:{$theme_color};}
8
  $shopline_style .=".cart-widget .cart-crl, .cat-grid .catli figure.cat-img:hover .caption-heading{background:{$theme_color};}
9
  .add_to_wishlist_a .show a:before, #testimonial_section a.web-link:hover, .lst-post figure.blog-list .blog-date b, .lst-post figure.blog-list i, .lst-post .read-more a, .lst-post figure.blog-list h3 a:hover, #best_sell_section a:hover,
10
  #shopmain #wp-calendar tbody td a, #shopmain #wp-calendar tbody
11
+ td#today, .sidenav a:hover, #shopmain .woocommerce-breadcrumb, .woocommerce-page .yith-wcwl-wishlistexistsbrowse.show:before, .woocommerce-page .yith-wcwl-wishlistaddedbrowse.show:before, .sidebar-inner-widget ul li a:hover, .woocommerce a.button.alt, .woocommerce input.button.alt, #shopmain .woocommerce-MyAccount-navigation ul li a:hover, #shopmain .woocommerce-info a:hover, #shopmain.woocommerce.woocommerce-account input.button:hover, .woocommerce a.button:hover,.woocommerce input.button:hover, #accordion .sidebar-quickcart p.buttons a:hover, figure.post-content span.read-more a:hover, .product-content-wrapper .add_to_wishlist_url .show a:before, #shopmain .woocommerce-MyAccount-content p strong, .woocommerce .price_slider_amount button.button:hover, .featured-grid .yith-wcwl-wishlistaddedbrowse.show a:before, .featured-grid .yith-wcwl-wishlistexistsbrowse.show a:before,.widget p.buttons a,.th-widget-recent-post .th-recent-post h5 a:hover, #shopmain #wp-calendar tfoot td#prev a:hover, .breadcrumb ul li a, .breadcrumb ul li span, .breadcrumb-trail,.last-btn.shrink #menu >li:last-child > a,.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover{color:{$theme_color};}
12
  .lst-post .read-more a, .lst-post .read-more a:hover, .widget p.buttons a, #shopmain #wp-calendar tbody
13
  td#today, #accordion .sidebar-quickcart p.buttons a, .woocommerce a.button.alt, .woocommerce a.button.alt:hover, .woocommerce input.button.alt, .woocommerce input.button.alt:hover, #shopmain .woocommerce-info a, #shopmain .woocommerce-info a:hover, #shopmain.woocommerce.woocommerce-account input.button, .woocommerce a.button:hover, .woocommerce a.button, .woocommerce input.button, .woocommerce input.button:hover, #accordion .sidebar-quickcart p.buttons a:hover, .woocommerce .widget a.button:hover, figure.post-content span.read-more a,.woocommerce .price_slider_amount button.button,
14
  #commentform textarea#comment:focus,
15
  #commentform input#author:focus,
16
  #commentform input#email:focus,
17
+ #commentform input#url:focus,.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button{border-color:{$theme_color};}
18
+ .lst-post .read-more a:hover, #accordion .sidebar-quickcart p.buttons a, .woocommerce a.button, .woocommerce input.button, .woocommerce a.button.alt:hover, #shopmain .woocommerce-info a, .woocommerce input.button.alt:hover, #shopmain.woocommerce-account .addresses .title .edit, figure.post-content span.read-more a, .tagcloud a:hover, .navigation.pagination span.current, .navigation.pagination span:hover, .navigation.pagination a:hover,.woocommerce .price_slider_amount button.button,.last-btn.shrink #menu >li:last-child.menu-item-has-children > a:after, .last-btn.shrink #menu >li:last-child.menu-item-has-children > a:before,.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button{background:{$theme_color};}
19
  #shopmain.woocommerce a.remove{color:{$theme_color}!important;}
20
  #shopmain.woocommerce nav.woocommerce-pagination ul li a:focus,#shopmain.woocommerce nav.woocommerce-pagination ul li a:hover, #shopmain.woocommerce nav.woocommerce-pagination ul li span.current, .post-comment a, #move-to-top{
21
  background:{$theme_color};}
shopline/inc/image-crop.php CHANGED
File without changes
shopline/inc/service.php CHANGED
File without changes
shopline/inc/shortcode.php CHANGED
File without changes
shopline/inc/testimonial.php CHANGED
File without changes
shopline/include.php CHANGED
File without changes
shopline/woo/ajax-woocommerce.php CHANGED
@@ -1,192 +1,193 @@
1
- <?php
2
- /** remove cart product **/
3
- if ( ! function_exists( 'shopline_product_remove' ) ) :
4
-
5
- add_action( 'wp_ajax_shopline_product_remove', 'shopline_product_remove' );
6
- add_action( 'wp_ajax_nopriv_shopline_product_remove', 'shopline_product_remove' );
7
- function shopline_product_remove() {
8
- global $woocommerce;
9
- $cart = $woocommerce->cart;
10
- foreach ($woocommerce->cart->get_cart() as $cart_item_key => $cart_item){
11
- if($cart_item['product_id'] == $_POST['product_id'] ){
12
- // Remove product in the cart using cart_item_key.
13
- $cart->remove_cart_item($cart_item_key);
14
- woocommerce_mini_cart();
15
- exit();
16
- }
17
- }
18
- die();
19
- }
20
- endif;
21
-
22
- if ( ! function_exists( 'shopline_product_count_update' ) ) :
23
-
24
- add_action( 'wp_ajax_shopline_product_count_update', 'shopline_product_count_update' );
25
- add_action( 'wp_ajax_nopriv_shopline_product_count_update', 'shopline_product_count_update' );
26
- function shopline_product_count_update() {
27
- global $woocommerce; ?>
28
- <a href="<?php echo wc_get_cart_url(); ?>" class="cart-contents" ><i class="fa fa-shopping-cart"></i><div class="cart-crl"><?php echo $woocommerce->cart->cart_contents_count; ?></div></a>
29
- <?php
30
- die();
31
- }
32
- endif;
33
- if ( ! function_exists( 'addtocart' ) ) :
34
-
35
- function addtocart(){
36
- return $woocommerce->cart->add_to_cart( 1133 );
37
- }
38
- endif;
39
-
40
- if ( ! function_exists( 'shopline_popup_product' ) ) :
41
-
42
- add_action('wp_ajax_shopline_popup_product', 'shopline_popup_product');
43
- add_action( 'wp_ajax_nopriv_shopline_popup_product', 'shopline_popup_product' );
44
-
45
- function shopline_popup_product() {
46
- if(isset($_POST['popup'])){
47
- $productId = $_POST['popup'];
48
-
49
-
50
- global $woocommerce;
51
-
52
-
53
- $myarray = array($productId);
54
-
55
- $args = array('post_type' => 'product',
56
- 'post__in' => $myarray
57
- );
58
-
59
- // The Query
60
- $query = new WP_Query( $args );
61
- if($query->have_posts()) :
62
- while($query->have_posts()) : $query->the_post();
63
- global $product;
64
- $priceing = $product->get_price_html();
65
- $excerpt = $product->post->post_excerpt;
66
- $title =get_the_title();
67
- $rating =$product->get_rating_html();
68
-
69
- $category = wc_get_product_category_list($productId,' / ');
70
-
71
-
72
- $attachment_ids = $product->get_gallery_attachment_ids();
73
- $img = $label = '';
74
- if(!empty($attachment_ids)):
75
- foreach( $attachment_ids as $attachment_id )
76
- {
77
- // Display the image URL
78
- $url = wp_get_attachment_url( $attachment_id );
79
-
80
- $img .='<input id="popup-slide-dot-'.$attachment_id.'" type="radio" name="slides" checked>
81
- <div style="background-image: url('.$url.');" class="popup-slide slide-'.$attachment_id.'"></div>';
82
-
83
- $label .='<label for="popup-slide-dot-'.$attachment_id.'"></label>';
84
- // Display Image instead of URL
85
- // $img .= wp_get_attachment_image($attachment_id, 'full');
86
-
87
- }
88
- else:
89
-
90
- $img .='<input id="popup-slide-dot-'.$productId.'" type="radio" name="slides" checked>
91
- <div style="background-image: url('.wc_placeholder_img_src().');" class="popup-slide slide-'.$productId.'"></div>';
92
- $label .='<label for="popup-slide-dot-'.$productId.'"></label>';
93
-
94
- endif;
95
-
96
- if ($average = $product->get_average_rating()) :
97
- $rating = '<div class="star-rating" title="'.sprintf(__( 'Rated %s out of 5', 'woocommerce' ), $average).'"><span style="width:'.( ( $average / 5 ) * 100 ) . '%"><strong itemprop="ratingValue" class="rating">'.$average.'</strong> '.__( 'out of 5', 'woocommerce' ).'</span></div>';
98
- endif;
99
-
100
- $cart = shopline_add_to_cart_url($product);
101
-
102
- echo '<div id="shopline-popup-boxes">
103
- <div id="dialog" class="product window">
104
- <div class="header">
105
- <div class="back close"></div>
106
- </div>
107
- <div class="main">
108
- <div class="head">
109
- <h1>'.$title.'</h1>
110
- <h2>'.$category.'</h2></div>
111
- <div class="left">
112
- <div class="popup-slider-container">
113
- <div class="popup-menu">
114
- '.$label.'
115
- </div>
116
- '.$img.'
117
- </div>
118
- </div>
119
- <div class="right">
120
- <p>'.$excerpt.'</p>'.$rating.shopline_whish_list().'
121
- <p class="quantity">Quantity'.shopline_quantity_add_to_cart($product).'</p>
122
- </div>
123
- </div>
124
- <div class="footer">
125
- <div class="left">
126
- <p id="price">'.$priceing.'</p>
127
- </div>
128
- <div class="right">
129
- '.$cart.'
130
- </div>
131
- </div>
132
- </div><div style="display: none; opacity: 0.8;" id="mask"></div>';
133
- endwhile;
134
- wp_reset_postdata();
135
-
136
- endif;
137
- }
138
- die();
139
- }
140
- endif;
141
-
142
- /**
143
- * Loop Add to Cart -- with quantity and AJAX
144
- */
145
- if ( ! function_exists( 'shopline_quantity_add_to_cart' ) ) :
146
-
147
- function shopline_quantity_add_to_cart($product){
148
- $quantity = '';
149
- if( $product->get_price() === '' && $product->product_type != 'external' ) return;
150
-
151
- if ( ! $product->is_in_stock() ) : ?>
152
-
153
- <a href="<?php echo get_permalink($product->id); ?>" class="button"><?php echo apply_filters('out_of_stock_add_to_cart_text', __('Read More', 'shopline')); ?></a>
154
-
155
- <?php else :
156
-
157
- switch ( $product->product_type ) {
158
- case "variable" :
159
- $link = get_permalink($product->id);
160
- $label = apply_filters('variable_add_to_cart_text', __('Select options', 'shopline'));
161
- break;
162
- case "grouped" :
163
- $link = get_permalink($product->id);
164
- $label = apply_filters('grouped_add_to_cart_text', __('View options', 'shopline'));
165
- break;
166
- case "external" :
167
- $link = get_permalink($product->id);
168
- $label = apply_filters('external_add_to_cart_text', __('Read More', 'shopline'));
169
- break;
170
- default :
171
- $link = esc_url( $product->add_to_cart_url() );
172
- $label = apply_filters('add_to_cart_text', __('Add to cart', 'shopline'));
173
- break;
174
- }
175
-
176
- if ( $product->product_type == 'simple' ) {
177
- $quantity = '<form action="'.esc_url( $product->add_to_cart_url() ).'" class="cart" method="post" enctype="multipart/form-data">
178
-
179
- '. woocommerce_quantity_input( array(), $product, false ) .'
180
- </form>';
181
-
182
-
183
- // <button type="submit" data-quantity="1" data-product_id="'. $product->id .'"
184
- // class="button alt ajax_add_to_cart add_to_cart_button product_type_simple">'. $label .'</button>
185
- } else {
186
- $form = sprintf('<a href="%s" rel="nofollow" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', $link, $product->id, $product->product_type, $label);
187
- }
188
- endif;
189
-
190
- return $quantity;
191
- }
192
- endif;
 
1
+ <?php
2
+ /** remove cart product **/
3
+ if ( ! function_exists( 'shopline_product_remove' ) ) :
4
+
5
+ add_action( 'wp_ajax_shopline_product_remove', 'shopline_product_remove' );
6
+ add_action( 'wp_ajax_nopriv_shopline_product_remove', 'shopline_product_remove' );
7
+ function shopline_product_remove() {
8
+ global $woocommerce;
9
+ $cart = $woocommerce->cart;
10
+ foreach ($woocommerce->cart->get_cart() as $cart_item_key => $cart_item){
11
+ if($cart_item['product_id'] == $_POST['product_id'] ){
12
+ // Remove product in the cart using cart_item_key.
13
+ $cart->remove_cart_item($cart_item_key);
14
+ woocommerce_mini_cart();
15
+ exit();
16
+ }
17
+ }
18
+ die();
19
+ }
20
+ endif;
21
+
22
+ if ( ! function_exists( 'shopline_product_count_update' ) ) :
23
+
24
+ add_action( 'wp_ajax_shopline_product_count_update', 'shopline_product_count_update' );
25
+ add_action( 'wp_ajax_nopriv_shopline_product_count_update', 'shopline_product_count_update' );
26
+ function shopline_product_count_update() {
27
+ global $woocommerce; ?>
28
+ <a href="<?php echo wc_get_cart_url(); ?>" class="cart-contents" ><i class="fa fa-shopping-cart"></i><div class="cart-crl"><?php echo $woocommerce->cart->cart_contents_count; ?></div></a>
29
+ <?php
30
+ die();
31
+ }
32
+ endif;
33
+ if ( ! function_exists( 'addtocart' ) ) :
34
+
35
+ function addtocart(){
36
+ return $woocommerce->cart->add_to_cart( 1133 );
37
+ }
38
+ endif;
39
+
40
+ if ( ! function_exists( 'shopline_popup_product' ) ) :
41
+
42
+ add_action('wp_ajax_shopline_popup_product', 'shopline_popup_product');
43
+ add_action( 'wp_ajax_nopriv_shopline_popup_product', 'shopline_popup_product' );
44
+
45
+ function shopline_popup_product() {
46
+ if(isset($_POST['popup'])){
47
+ $productId = $_POST['popup'];
48
+
49
+
50
+ global $woocommerce;
51
+
52
+
53
+ $myarray = array($productId);
54
+
55
+ $args = array('post_type' => 'product',
56
+ 'post_status' => 'publish',
57
+ 'post__in' => $myarray
58
+ );
59
+
60
+ // The Query
61
+ $query = new WP_Query( $args );
62
+ if($query->have_posts()) :
63
+ while($query->have_posts()) : $query->the_post();
64
+ global $product;
65
+ $priceing = $product->get_price_html();
66
+ $excerpt = $product->post->post_excerpt;
67
+ $title =get_the_title();
68
+ $rating =$product->get_rating_html();
69
+
70
+ $category = wc_get_product_category_list($productId,' / ');
71
+
72
+
73
+ $attachment_ids = $product->get_gallery_attachment_ids();
74
+ $img = $label = '';
75
+ if(!empty($attachment_ids)):
76
+ foreach( $attachment_ids as $attachment_id )
77
+ {
78
+ // Display the image URL
79
+ $url = wp_get_attachment_url( $attachment_id );
80
+
81
+ $img .='<input id="popup-slide-dot-'.$attachment_id.'" type="radio" name="slides" checked>
82
+ <div style="background-image: url('.$url.');" class="popup-slide slide-'.$attachment_id.'"></div>';
83
+
84
+ $label .='<label for="popup-slide-dot-'.$attachment_id.'"></label>';
85
+ // Display Image instead of URL
86
+ // $img .= wp_get_attachment_image($attachment_id, 'full');
87
+
88
+ }
89
+ else:
90
+
91
+ $img .='<input id="popup-slide-dot-'.$productId.'" type="radio" name="slides" checked>
92
+ <div style="background-image: url('.wc_placeholder_img_src().');" class="popup-slide slide-'.$productId.'"></div>';
93
+ $label .='<label for="popup-slide-dot-'.$productId.'"></label>';
94
+
95
+ endif;
96
+
97
+ if ($average = $product->get_average_rating()) :
98
+ $rating = '<div class="star-rating" title="'.sprintf(__( 'Rated %s out of 5', 'woocommerce' ), $average).'"><span style="width:'.( ( $average / 5 ) * 100 ) . '%"><strong itemprop="ratingValue" class="rating">'.$average.'</strong> '.__( 'out of 5', 'woocommerce' ).'</span></div>';
99
+ endif;
100
+
101
+ $cart = shopline_add_to_cart_url($product);
102
+
103
+ echo '<div id="shopline-popup-boxes">
104
+ <div id="dialog" class="product window">
105
+ <div class="header">
106
+ <div class="back close"></div>
107
+ </div>
108
+ <div class="main">
109
+ <div class="head">
110
+ <h1>'.$title.'</h1>
111
+ <h2>'.$category.'</h2></div>
112
+ <div class="left">
113
+ <div class="popup-slider-container">
114
+ <div class="popup-menu">
115
+ '.$label.'
116
+ </div>
117
+ '.$img.'
118
+ </div>
119
+ </div>
120
+ <div class="right">
121
+ <p>'.$excerpt.'</p>'.$rating.shopline_whish_list().'
122
+ <p class="quantity">Quantity'.shopline_quantity_add_to_cart($product).'</p>
123
+ </div>
124
+ </div>
125
+ <div class="footer">
126
+ <div class="left">
127
+ <p id="price">'.$priceing.'</p>
128
+ </div>
129
+ <div class="right">
130
+ '.$cart.'
131
+ </div>
132
+ </div>
133
+ </div><div style="display: none; opacity: 0.8;" id="mask"></div>';
134
+ endwhile;
135
+ wp_reset_postdata();
136
+
137
+ endif;
138
+ }
139
+ die();
140
+ }
141
+ endif;
142
+
143
+ /**
144
+ * Loop Add to Cart -- with quantity and AJAX
145
+ */
146
+ if ( ! function_exists( 'shopline_quantity_add_to_cart' ) ) :
147
+
148
+ function shopline_quantity_add_to_cart($product){
149
+ $quantity = '';
150
+ if( $product->get_price() === '' && $product->product_type != 'external' ) return;
151
+
152
+ if ( ! $product->is_in_stock() ) : ?>
153
+
154
+ <a href="<?php echo get_permalink($product->id); ?>" class="button"><?php echo apply_filters('out_of_stock_add_to_cart_text', __('Read More', 'shopline')); ?></a>
155
+
156
+ <?php else :
157
+
158
+ switch ( $product->product_type ) {
159
+ case "variable" :
160
+ $link = get_permalink($product->id);
161
+ $label = apply_filters('variable_add_to_cart_text', __('Select options', 'shopline'));
162
+ break;
163
+ case "grouped" :
164
+ $link = get_permalink($product->id);
165
+ $label = apply_filters('grouped_add_to_cart_text', __('View options', 'shopline'));
166
+ break;
167
+ case "external" :
168
+ $link = get_permalink($product->id);
169
+ $label = apply_filters('external_add_to_cart_text', __('Read More', 'shopline'));
170
+ break;
171
+ default :
172
+ $link = esc_url( $product->add_to_cart_url() );
173
+ $label = apply_filters('add_to_cart_text', __('Add to cart', 'shopline'));
174
+ break;
175
+ }
176
+
177
+ if ( $product->product_type == 'simple' ) {
178
+ $quantity = '<form action="'.esc_url( $product->add_to_cart_url() ).'" class="cart" method="post" enctype="multipart/form-data">
179
+
180
+ '. woocommerce_quantity_input( array(), $product, false ) .'
181
+ </form>';
182
+
183
+
184
+ // <button type="submit" data-quantity="1" data-product_id="'. $product->id .'"
185
+ // class="button alt ajax_add_to_cart add_to_cart_button product_type_simple">'. $label .'</button>
186
+ } else {
187
+ $form = sprintf('<a href="%s" rel="nofollow" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', $link, $product->id, $product->product_type, $label);
188
+ }
189
+ endif;
190
+
191
+ return $quantity;
192
+ }
193
+ endif;
shopline/woo/filter-woocommerce.php CHANGED
File without changes
shopline/woo/hooks-function.php CHANGED
File without changes
shopline/woo/hooks.php CHANGED
File without changes
shopline/woo/woo-inc.php CHANGED
File without changes
shopline/woo/woocommerce.php CHANGED
@@ -1,746 +1,752 @@
1
- <?php
2
- if ( ! function_exists( 'shopline_whishlist_url' ) ) {
3
-
4
- function shopline_whishlist_url(){
5
- global $wpdb;
6
- $table = $wpdb->prefix.'posts';
7
- $search_query = "SELECT guid FROM $table WHERE post_type = 'page'
8
- AND post_content LIKE %s LIMIT 1";
9
- $search = '[yith_wcwl_wishlist]';
10
- $like = '%'.$search.'%';
11
- $results = $wpdb->get_results($wpdb->prepare($search_query, $like), ARRAY_A);
12
- $url = (isset($results[0]['guid']))?$results[0]['guid']:'';
13
- return $url ;
14
- }
15
-
16
- }
17
-
18
- if ( ! function_exists( 'shopline_cart_total_item' ) ) {
19
- /**
20
- * Cart Link
21
- * Displayed a link to the cart including the number of items present and the cart total
22
- */
23
- function shopline_cart_total_item() {
24
- global $woocommerce;
25
- ?>
26
- <a href="<?php echo wc_get_cart_url(); ?>" class="cart-contents" ><i class="fa fa-shopping-cart"></i><div class="cart-crl"><?php echo $woocommerce->cart->cart_contents_count; ?></div></a>
27
- <?php
28
- }
29
- }
30
-
31
-
32
- if ( ! function_exists( 'shopline_header_cart' ) ) {
33
-
34
- function shopline_header_cart() {
35
- if ( shopline_is_woocommerce_activated() ) {
36
- shopline_cart_total_item();
37
- }
38
- }
39
- }
40
-
41
- /** Sidebar Add Cart Product **/
42
- if ( ! function_exists( 'shopline_menu_woo_cart_product' ) ) :
43
-
44
- function shopline_menu_woo_cart_product(){
45
- global $woocommerce;
46
- ?>
47
- <div class="sidebar-quickcart">
48
-
49
- <?php
50
- if ( ! function_exists( 'shopline_header_cart' ) ) {
51
- woocommerce_mini_cart();
52
- }
53
- ?>
54
- </div>
55
- <?php
56
- }
57
- endif;
58
- if ( ! function_exists( 'shopline_slider_product' ) ) :
59
- function shopline_slider_product(){
60
- if( taxonomy_exists( 'product_cat' ) ){
61
- $prduct_type = get_theme_mod('section_slider_filter_type','featured');
62
- $posts_per_page = get_theme_mod('section_slider_count',5);
63
- $term_id = get_theme_mod('section_slider_list',0);
64
-
65
- $args = array('posts_per_page' => $posts_per_page,
66
- 'post_type' => 'product',
67
- 'post_status'=> 'publish',
68
- 'orderby' =>'date',
69
- 'order' => 'DESC');
70
-
71
- if($term_id==true){
72
- $args['tax_query'] = array(
73
- array( 'taxonomy' => 'product_cat',
74
- 'field' => 'term_id',
75
- 'terms' => $term_id,
76
- ) );
77
- }
78
-
79
-
80
- if($prduct_type=='featured'){
81
- $args['meta_query'] = array( array(
82
- 'key' => '_featured',
83
- 'value' => 'yes'
84
- ) ) ;
85
- }elseif($prduct_type=='sale'){
86
- $args['meta_query'] = array(
87
- 'relation' => 'OR',
88
- array( // Simple products type
89
- 'key' => '_sale_price',
90
- 'value' => 0,
91
- 'compare' => '>',
92
- 'type' => 'numeric'
93
- ),
94
- array( // Variable products type
95
- 'key' => '_min_variation_sale_price',
96
- 'value' => 0,
97
- 'compare' => '>',
98
- 'type' => 'numeric'
99
- )
100
- );
101
- }
102
-
103
- $loop = new WP_Query( $args );
104
- while ( $loop->have_posts() ) : $loop->the_post();
105
- global $product;
106
- $pid = $product->get_id();
107
- $category = wc_get_product_category_list($pid,' / ');
108
-
109
- echo '<div class="da-slide">
110
- <div class="da-caption">
111
- <h3>'.get_the_title() .'</h3>
112
- <div class="da-border"></div>
113
- <h4 class="da-category">'.$category.'</h4><div class="prd-price">
114
- '.$product->get_price_html().'</div>';
115
- woocommerce_template_loop_add_to_cart( $pid, $product );
116
- echo '<a popupid = "'.$pid.'" class="da-buy quickview">Buy Now</a>
117
- </div>
118
- <div class="da-img">'. woocommerce_get_product_thumbnail().'</div>
119
- </div>';
120
- endwhile;
121
- wp_reset_query();
122
- }
123
- }
124
- endif;
125
-
126
- /*
127
- * category product images
128
- */
129
- if ( ! function_exists( 'shopline_category_image' ) ) :
130
-
131
- function shopline_category_image() {
132
- if ( shopline_is_woocommerce_activated() ) {
133
- $cate_include = get_theme_mod('woo_cate_slider_list',0);
134
- $prod_categories = get_terms( 'product_cat', array(
135
- 'orderby' => 'name',
136
- 'order' => 'ASC',
137
- 'hide_empty' => true,
138
- 'include' => $cate_include,
139
- ));
140
-
141
- foreach( $prod_categories as $prod_cat ) :
142
- $cat_thumb_id = get_term_meta( $prod_cat->term_id, 'thumbnail_id', true );
143
- $shop_catalog_img = wp_get_attachment_image_src( $cat_thumb_id, 'shop_catalog' );
144
- if($shop_catalog_img=='') continue;
145
- $term_link = get_term_link( $prod_cat, 'product_cat' );
146
- ?>
147
-
148
- <div class="catli item">
149
- <figure class="cat-img">
150
- <div class="fig-img">
151
- <img src="<?php echo $shop_catalog_img[0]; ?>" alt="<?php echo $prod_cat->name; ?>" />
152
- </div>
153
- <figcaption>
154
- <div class="caption-heading">
155
- <p><?php echo $prod_cat->name; ?></p>
156
- </div>
157
- </figcaption>
158
- <a href="<?php echo $term_link; ?>"></a>
159
- </figure>
160
- </div>
161
-
162
- <?php endforeach; wp_reset_query(); ?>
163
- <?php
164
- }
165
- }
166
- endif;
167
- /*
168
- * ###### FrontPage Featured producr show ########
169
- */
170
- if ( ! function_exists( 'shopline_featured_products' ) ) :
171
-
172
- function shopline_featured_products() {
173
- if ( shopline_is_woocommerce_activated() ) {
174
- echo '<section id="featured-prd" class="featured-prd"><div class="container">';
175
-
176
- do_action( 'shopline_homepage_before_featured_products' );
177
-
178
- echo '<div class="featured-wrap"><h4 class="section-title">' . __("FEATURED PRODUCT",'shopline') . '</h4></div>';
179
-
180
- do_action( 'shopline_homepage_after_featured_products_title' );
181
-
182
- $meta_query = WC()->query->get_meta_query();
183
-
184
- $meta_query[] = array(
185
- 'key' => '_featured',
186
- 'value' => 'yes'
187
- );
188
-
189
- $args = array(
190
- 'post_type' => 'product',
191
- 'stock' => 1,
192
- 'showposts' => 6,
193
- 'columns' => 4,
194
- 'orderby' => 'date',
195
- 'order' => 'DESC',
196
- 'meta_query' => $meta_query
197
- );
198
-
199
- echo ' <div id="owl-demo" class="owl-carousel owl-theme">';
200
-
201
- $featured_query = new WP_Query( $args );
202
-
203
- while( $featured_query->have_posts() ) : $featured_query->the_post(); global $product; ?>
204
- <div class="item">
205
- <div class="products-grid">
206
- <div class="product-block">
207
- <figure class="image">
208
- <a href="" class="product-image">
209
- <?php
210
- if ( has_post_thumbnail( $featured_query->post->ID ) )
211
- echo get_the_post_thumbnail( $featured_query->post->ID, 'shop_catalog' );
212
- else
213
- echo '<img src="' . wc_placeholder_img_src() . '" alt="product" class="image-hover wp-post-image" />';
214
- ?>
215
- </a>
216
- <div class="icons">
217
- <div class="add-cart">
218
- <?php
219
- woocommerce_template_loop_add_to_cart( $featured_query->post, $product ); ?>Ï
220
- <a href="" class=" button product_type_simple add_to_cart_button ajax_add_to_cart"><i class="fa fa-cart-plus"></i></a>
221
- </div>
222
-
223
- <div class="yith-wcwl-add-button show">
224
- <a href="" class="add_to_wishlist">
225
- <i class="fas fa-heart"></i><span></span></a>
226
- </div>
227
- <div class="quick-view">
228
- <a href="<?php echo esc_url(get_permalink()); ?>" class="quickview yith-wcqv-button" data-product_id="<?php echo $featured_query->post->ID; ?>" style="zoom: 1;">
229
- <span><i class="fas fa-eye"> </i></span>
230
- </a>
231
- </div>
232
- </div>
233
- </figure>
234
- <div class="meta">
235
- <h3 class="name">
236
- <a href="<?php echo esc_url(get_permalink()); ?>"><?php the_title(); ?></a>
237
- </h3>
238
- <span class="price">
239
- <?php echo $product->get_price_html(); ?>
240
- </span>
241
- </div>
242
- </div>
243
- </div>
244
- </div>
245
- <?php
246
- endwhile;
247
-
248
- do_action( 'shopline_homepage_after_featured_products' );
249
- echo "</div></div></section><div class='clearfix'></div>";
250
- }
251
- }
252
- endif;
253
-
254
- /*
255
- * ###### FrontPage Category Product show ########
256
- */
257
- if ( ! function_exists( 'shopline_woo_product' ) ) :
258
- function shopline_woo_product(){
259
- shopline_category_products();
260
-
261
- }
262
- endif;
263
- /*
264
- * ###### FrontPage Slider Product show ########
265
- */
266
- if ( ! function_exists( 'shopline_woo_product_slide' ) ) :
267
- function shopline_woo_product_slide(){
268
- shopline_slide_category_products();
269
- }
270
- endif;
271
-
272
- if ( ! function_exists( 'shopline_add_to_cart_url' ) ) :
273
- function shopline_add_to_cart_url($product){
274
- $cart_url = apply_filters( 'woocommerce_loop_add_to_cart_link',
275
- sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="button %s %s"><span>%s</span></a>',
276
- esc_url( $product->add_to_cart_url() ),
277
- esc_attr( $product->get_id() ),
278
- esc_attr( $product->get_sku() ),
279
- esc_attr( isset( $quantity ) ? $quantity : 1 ),
280
- $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',
281
- esc_html( $product->add_to_cart_text() )
282
- ),$product );
283
- return $cart_url;
284
- }
285
- endif;
286
- if ( ! function_exists( 'shopline_woo_product_heading' ) ) :
287
- function shopline_woo_product_heading(){
288
- $hdn = get_theme_mod("woo_cate_product_heading","");
289
- if($hdn!=''){
290
- $return = '<h2>'.get_theme_mod("woo_cate_product_heading","Weekly Featured Product").'</h2><div class="heading-border"></div>';
291
-
292
- }else{
293
- $return = '<h2>Weekly Featured Product</h2><div class="heading-border"></div>';
294
- }
295
- return $return;
296
- }
297
- endif;
298
-
299
- if ( ! function_exists( 'shopline_woo_category_list' ) ) :
300
- function shopline_woo_category_list($category_list){
301
- $cate_list = '<div class="block-heading wow thmkfadeIn" data-wow-duration="3s">'.shopline_woo_product_heading().'
302
- <div class="featured-filter button-group filters-button-group"><ul>
303
- '.$category_list.'
304
- </ul></div>
305
- </div>';
306
- return $cate_list;
307
- }
308
- endif;
309
-
310
- function shopline_category_open($productArr){
311
-
312
- if($productArr['style']=='li'){
313
- $return = '<li class="featured-isotope cd-item featured-list '.$productArr['slug'].'" id="post-'.$productArr['pid'].'">';
314
- }elseif($productArr['style']=='div'){
315
- $return = '<div class="product-slide item">';
316
- }
317
- return $return;
318
- }
319
- function shopline_category_close($productArr){
320
- if($productArr['style']=='li'){
321
- $return = '</li>';
322
- } elseif($productArr['style']=='div'){
323
- $return = '</div>';
324
- }
325
- return $return;
326
-
327
- }
328
-
329
-
330
-
331
- if ( ! function_exists( 'shopline_woo_category_product_grid' ) ) :
332
-
333
- function shopline_woo_category_product_grid($productArr){
334
- $product_list = shopline_category_open($productArr).'
335
- <div class="product-block">
336
-
337
- <figure class="image">
338
- '.$productArr['sale'].'
339
- <a href="'.$productArr['permalink'].'" class="product-image">
340
- '.$productArr['thumb'].'</a>
341
- <div>
342
- <div class="icons">
343
- <div class="add-cart tooltip">
344
- '.$productArr['cart_url'].'
345
- <span class="tooltiptext">Cart</span>
346
- </div>
347
- <div class="add_to_wishlist_a tooltip">
348
- '.shopline_whish_list().'
349
- <span class="tooltiptext">Wishlist</span>
350
- </div>
351
-
352
- <div class="quick-view tooltip">
353
- <a popupid = "'.$productArr['pid'].'" class="quickview cd-trigger" data-product_id="65" style="zoom: 1;">
354
- <span><i class="fas fa-eye"> </i></span>
355
- <span class="tooltiptext">View</span>
356
- </a>
357
- </div>
358
- </div>
359
- </div>
360
- </figure>
361
- <div class="meta">
362
- <h3 class="name">
363
- <a href="'.$productArr['permalink'].'">'. $productArr['title'] .'</a>
364
- </h3>
365
- <div class="price-grid">
366
- <span class="price">
367
- '.$productArr['price'].'
368
- </span>
369
- </div>
370
- </div>
371
- </div>
372
- '.shopline_category_close($productArr);
373
- return $product_list;
374
- }
375
- endif;
376
-
377
- if ( ! function_exists( 'shopline_woo_category_product_boxed' ) ) :
378
-
379
- function shopline_woo_category_product_boxed($productArr){
380
- $boxed = '<li class="featured-isotope featured-boxed '.$productArr['slug'].'"id="post-'.$productArr['pid'].'">
381
- <div class="product-block">
382
- <div class="product-image-wrapper">
383
- <figure class="image">
384
- '.$productArr['sale'].'
385
- <a href="'.$productArr['permalink'].'" class="product-image">
386
- '.$productArr['thumb'].'</a>
387
- </figure>
388
- </div>
389
- <div class="product-content-wrapper">
390
- <div class="meta">
391
- <h2 class="name">
392
- <a href="'.$productArr['permalink'].'">'. $productArr['title'] .'</a></h2>
393
- <div class="heading-border"></div>
394
- <div class="price-grid">
395
- <span class="price">
396
- '.$productArr['price'].'
397
- </span>
398
- <p class="description">
399
- '.$productArr['excerpt'].'
400
- </p>
401
- <div class="icons">
402
- <div class="add-cart tooltip">
403
- '.$productArr['cart_url'].'
404
- <span class="tooltiptext">Cart</span></div>
405
- <div class="add_to_wishlist_url tooltip">
406
- '.shopline_whish_list().'
407
- <span class="tooltiptext">Wishlist</span></div>
408
- <div class="quick-view tooltip">
409
- <a popupid = "'.$productArr['pid'].'" class="quickview yith-wcqv-button" data-product_id="65" style="zoom: 1;">
410
- <span><i class="fas fa-eye"> </i></span>
411
- <span class="tooltiptext">View</span>
412
- </a>
413
- </div>
414
- </div>
415
- </div>
416
- </div>
417
- </div>
418
- </div>
419
- </li>';
420
- return $boxed;
421
- }
422
- endif;
423
-
424
- if ( ! function_exists( 'shopline_category_product_loop' ) ) :
425
- function shopline_category_product_loop($category_product,$args,$layout){
426
- $cate_product = '';
427
- $products = new WP_Query( $args );
428
- if($products->have_posts()) :
429
- while($products->have_posts()) : $products->the_post();
430
- global $product;
431
- $pid = $product->get_id();
432
-
433
- // echo "<pre>"; print_r($product);
434
- //echo "</pre><br></hr>";
435
- $category_product['products'] = $products;
436
- $category_product['pid'] = $pid;
437
- $category_product['title'] = get_the_title();
438
- $category_product['excerpt'] = get_the_excerpt();
439
- $category_product['permalink'] = esc_url(get_permalink());
440
- $category_product['price'] = $product->get_price_html();
441
- $category_product['cart_url'] = shopline_add_to_cart_url($product);
442
-
443
- $sale = get_post_meta( $pid, '_sale_price', true);
444
-
445
- if( $sale) {
446
- $sale = '<span class="onsale">'.__('Sale','shopline').'</span>';
447
- }
448
-
449
- $category_product['sale'] = $sale;
450
-
451
- if (has_post_thumbnail( $pid ) ):
452
- $thumbnail = get_the_post_thumbnail( $pid, 'shop_single' );
453
- else:
454
- $thumbnail = '<img src="' . wc_placeholder_img_src() . '" alt="product" class="image-hover wp-post-image" />';
455
- endif;
456
-
457
- $category_product['thumb'] = $thumbnail;
458
- if($layout=='grid'){
459
- $cate_product .= shopline_woo_category_product_grid($category_product);
460
- } elseif ($layout=='boxed-layout') {
461
- $cate_product .= shopline_woo_category_product_boxed($category_product);
462
- }
463
- endwhile;//Possibility to add else statement
464
- wp_reset_postdata();
465
- return $cate_product;
466
- else:
467
- echo '<p class="not_found">'.__('Sorry, The post you are looking is unavailable!','shopline').'</p>';
468
- endif;
469
- wp_reset_query();
470
- }
471
- endif;
472
-
473
- if ( ! function_exists( 'shopline_category_products' ) ) :
474
- function shopline_category_products() {
475
- if( taxonomy_exists( 'product_cat' ) ){
476
- $layout = 'grid';
477
- $term_id = get_theme_mod('woo_cate_product_list',0);
478
- $posts_per_page = get_theme_mod('woo_cate_product_count',8);
479
- $catetype = get_theme_mod('woo_cate_product_filter_type','cate');
480
-
481
-
482
- $args=array();
483
-
484
- if($catetype=='cate'){
485
- // category filter
486
- $args = array(
487
- //'number' => $count,
488
- 'orderby' => 'title',
489
- 'order' => 'ASC',
490
- 'hide_empty' => 1,
491
- 'include' => $term_id
492
- );
493
- }
494
-
495
- $product_categories = get_terms( 'product_cat', $args );
496
- $count = count($product_categories);
497
- $category_list = $cate_product = '';
498
- if ( $count > 0 && $catetype=='cate'){
499
-
500
- foreach ( $product_categories as $product_category ) {
501
- //global $product;
502
- $category_product = array();
503
- $category_product['style'] = 'li';
504
- $current_class = '';
505
- if($product_category->slug=='albums'){
506
- $current_class = 'current';
507
- }
508
-
509
- $category_list .='<li><a class="button '.$current_class.'" data-filter=".'.$product_category->slug .'">' . $product_category->name . '</a></li>';
510
-
511
- $category_product['slug'] = $product_category->slug;
512
-
513
- // product filter
514
- $args = array(
515
- 'posts_per_page' => $posts_per_page,
516
- 'tax_query' => array(
517
- array(
518
- 'taxonomy' => 'product_cat',
519
- 'field' => 'slug',
520
- // 'terms' => 'white-wines'
521
- 'terms' => $category_product['slug']
522
- )
523
- ),
524
- 'post_type' => 'product',
525
- 'orderby' => 'date'
526
- );
527
-
528
- $cate_product .= shopline_category_product_loop($category_product,$args,$layout);
529
- }
530
-
531
-
532
- }elseif($catetype=='recent'){
533
-
534
- $category_product = array();
535
- $category_product['style'] = 'li';
536
- $category_product['slug'] = 'recent';
537
- $EmptyArray = array_filter($term_id);
538
- if(!empty($EmptyArray)){
539
- $args = array(
540
- 'posts_per_page' => $posts_per_page,
541
- 'post_type' => 'product',
542
- 'tax_query' => array(
543
- array(
544
- 'taxonomy' => 'product_cat',
545
- 'field' => 'term_id',
546
- 'terms' => $term_id,
547
- )
548
- ),
549
- 'orderby' =>'date',
550
- 'order' => 'DESC'
551
- );
552
- }else{
553
- $args = array(
554
- 'posts_per_page' => $posts_per_page,
555
- 'post_type' => 'product',
556
- 'orderby' =>'date',
557
- 'order' => 'DESC'
558
- );
559
-
560
- }
561
- $cate_product .= shopline_category_product_loop($category_product,$args,$layout);
562
-
563
- }
564
-
565
-
566
- $cate_list = shopline_woo_category_list($category_list);
567
-
568
- $cate_list .= '<div class="featured-block">
569
- <ul class="poup-product featured-'.$layout.' wow thmkfadeInDown" data-wow-duration="2s">
570
- '. $cate_product.'
571
- </ul></div>';
572
-
573
- echo $cate_list;
574
- }
575
- }
576
- endif;
577
-
578
-
579
- if ( ! function_exists( 'shopline_slide_category_products' ) ) :
580
- function shopline_slide_category_products() {
581
- if( taxonomy_exists( 'product_cat' ) ){
582
- $count = get_theme_mod('woo_slide_product_count',8);
583
- $cat_slug = get_theme_mod('slide_woo_category','all');
584
- $term_product = get_theme_mod('slide_woo_product','recent');
585
- $layout = 'grid';
586
- $posts_per_page = $count;
587
- $slug = $cat_slug;
588
- $productType = $term_product;
589
- // argument filter
590
- $args = array(
591
- 'hide_empty' => 1,
592
- 'posts_per_page' => $posts_per_page,
593
- 'post_type' => 'product',
594
- 'orderby' => 'date',
595
- 'order' => 'DESC'
596
- );
597
-
598
- if($productType == 'featured'){
599
- // featured product
600
-
601
- $args['meta_query'] = array(
602
- 'key' => '_featured',
603
- 'value' => 'yes'
604
- );
605
- } elseif($productType == 'random'){
606
- //random product
607
- $args['orderby'] = 'rand';
608
-
609
- }elseif($productType == 'sale') {
610
- //sale product
611
- $args['meta_query'] = array(
612
- 'relation' => 'OR',
613
- array( // Simple products type
614
- 'key' => '_sale_price',
615
- 'value' => 0,
616
- 'compare' => '>',
617
- 'type' => 'numeric'
618
- ),
619
- array( // Variable products type
620
- 'key' => '_min_variation_sale_price',
621
- 'value' => 0,
622
- 'compare' => '>',
623
- 'type' => 'numeric'
624
- )
625
- );
626
- }
627
- // category filter
628
- if($slug != 'all'){
629
- // $args['product_cat'] = $slug;
630
- $args['tax_query'] = array(
631
- array(
632
- 'taxonomy' => 'product_cat',
633
- 'field' => 'slug',
634
- // 'terms' => 'white-wines'
635
- 'terms' => $slug
636
- )
637
- );
638
- }
639
- $category_product = array();
640
- $category_product['style'] = 'div';
641
-
642
- $cate_product = shopline_category_product_loop($category_product,$args,$layout);
643
- echo $cate_product;
644
-
645
- }
646
- }
647
- endif;
648
-
649
-
650
- if ( ! function_exists( 'shopline_recent_contegory_product' ) ) :
651
-
652
- function shopline_recent_contegory_product(){
653
- $layout = get_theme_mod('woo_cate_product_layout','grid');
654
- $term_id = get_theme_mod('woo_cate_product_list',0);
655
- $posts_per_page = get_theme_mod('woo_cate_product_count',8);
656
- $category_product = array();
657
-
658
- $category_product['slug'] = 'recent-product';
659
-
660
- $args = array(
661
- 'posts_per_page' => $posts_per_page,
662
- 'post_type' => 'product',
663
- 'tax_query' => array(
664
- array(
665
- 'taxonomy' => 'product_cat',
666
- 'field' => 'term_id',
667
- 'terms' => $term_id,
668
- )
669
- ),
670
- 'orderby' =>'date',
671
- 'order' => 'DESC'
672
- );
673
- $recent_product = shopline_category_product_loop($category_product,$args,$layout);
674
- $cate_list = '<div class="block-heading">'.shopline_woo_product_heading().'</div>';
675
- $cate_list .= '<div class="featured-block">
676
- <ul class="featured-'.$layout.'">
677
- '. $recent_product.'
678
- </ul></div>';
679
-
680
- echo $cate_list;
681
- }
682
-
683
- endif;
684
-
685
- if ( ! function_exists( 'shopline_woo_sidebar' ) ) :
686
- /** Cart,checkout,dashboard page sidebar diable **/
687
- function shopline_woo_sidebar($sidebar = false){
688
- $return =false;
689
- if( is_checkout() || is_cart() ){
690
- $return = $sidebar;
691
- }
692
- return $return;
693
- }
694
-
695
- endif;
696
-
697
- if ( ! function_exists( 'shopline_remove_password_strength' ) ) :
698
- /** Registration weak password disable **/
699
-
700
- function shopline_remove_password_strength() {
701
- if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
702
- wp_dequeue_script( 'wc-password-strength-meter' );
703
- }
704
- }
705
- add_action( 'wp_print_scripts', 'shopline_remove_password_strength', 100 );
706
-
707
-
708
- endif;
709
-
710
- if ( ! function_exists( 'shopline_my_account' ) ) :
711
- /** My Account Menu **/
712
- function shopline_my_account(){
713
- if ( is_user_logged_in() ) {
714
- $return = '<a class="logged-in tooltip" href="'.get_permalink( get_option('woocommerce_myaccount_page_id') ).'"><span>'.__('My Account','shopline').'</span><span class="tooltiptext">Account</span></a>';
715
- }
716
- else {
717
- $return = '<a class="logged-out tooltip" href="'.get_permalink( get_option('woocommerce_myaccount_page_id') ).'">
718
- <span>'.__('Login / Register','shopline').'</span>
719
- <span class="tooltiptext">Register</span></a>'; }
720
- echo $return;
721
- }
722
-
723
-
724
- endif;
725
-
726
- if ( ! function_exists( 'shopline_checkout' ) ) :
727
- /** Checkout Menu **/
728
- function shopline_checkout(){
729
- global $woocommerce;
730
- if ( sizeof( $woocommerce->cart->cart_contents) > 0 ) :
731
- echo '<a href="' . $woocommerce->cart->get_checkout_url() . '" title="' . __( 'Checkout' ) . '">' . __( 'Checkout','shopline' ) . '</a>';
732
- endif;
733
- }
734
-
735
- endif;
736
-
737
- if ( ! function_exists( 'shopline_whish_list' ) ) :
738
-
739
- /** wishlist **/
740
- function shopline_whish_list(){
741
- if( shortcode_exists( 'yith_wcwl_add_to_wishlist' ) ) {
742
- return do_shortcode('[yith_wcwl_add_to_wishlist icon="fas fa-heart" browse_wishlist_text=""]' );
743
- }
744
- }
745
- endif;
 
 
 
 
 
 
746
  ?>
1
+ <?php
2
+ if ( ! function_exists( 'shopline_whishlist_url' ) ) {
3
+
4
+ function shopline_whishlist_url(){
5
+ global $wpdb;
6
+ $table = $wpdb->prefix.'posts';
7
+ $search_query = "SELECT guid FROM $table WHERE post_type = 'page'
8
+ AND post_content LIKE %s LIMIT 1";
9
+ $search = '[yith_wcwl_wishlist]';
10
+ $like = '%'.$search.'%';
11
+ $results = $wpdb->get_results($wpdb->prepare($search_query, $like), ARRAY_A);
12
+ $url = (isset($results[0]['guid']))?$results[0]['guid']:'';
13
+ return $url ;
14
+ }
15
+
16
+ }
17
+
18
+ if ( ! function_exists( 'shopline_cart_total_item' ) ) {
19
+ /**
20
+ * Cart Link
21
+ * Displayed a link to the cart including the number of items present and the cart total
22
+ */
23
+ function shopline_cart_total_item() {
24
+ global $woocommerce;
25
+ ?>
26
+ <a href="<?php echo wc_get_cart_url(); ?>" class="cart-contents" ><i class="fa fa-shopping-cart"></i><div class="cart-crl"><?php echo $woocommerce->cart->cart_contents_count; ?></div></a>
27
+ <?php
28
+ }
29
+ }
30
+
31
+
32
+ if ( ! function_exists( 'shopline_header_cart' ) ) {
33
+
34
+ function shopline_header_cart() {
35
+ if ( shopline_is_woocommerce_activated() ) {
36
+ shopline_cart_total_item();
37
+ }
38
+ }
39
+ }
40
+
41
+ /** Sidebar Add Cart Product **/
42
+ if ( ! function_exists( 'shopline_menu_woo_cart_product' ) ) :
43
+
44
+ function shopline_menu_woo_cart_product(){
45
+ global $woocommerce;
46
+ ?>
47
+ <div class="sidebar-quickcart">
48
+
49
+ <?php
50
+ if ( ! function_exists( 'shopline_header_cart' ) ) {
51
+ woocommerce_mini_cart();
52
+ }
53
+ ?>
54
+ </div>
55
+ <?php
56
+ }
57
+ endif;
58
+ if ( ! function_exists( 'shopline_slider_product' ) ) :
59
+ function shopline_slider_product(){
60
+ if( taxonomy_exists( 'product_cat' ) ){
61
+ $prduct_type = get_theme_mod('section_slider_filter_type','featured');
62
+ $posts_per_page = get_theme_mod('section_slider_count',5);
63
+ $term_id = get_theme_mod('section_slider_list',0);
64
+
65
+ $args = array('posts_per_page' => $posts_per_page,
66
+ 'post_type' => 'product',
67
+ 'post_status' => 'publish',
68
+ 'orderby' =>'date',
69
+ 'order' => 'DESC');
70
+
71
+ if($term_id==true){
72
+ $args['tax_query'] = array(
73
+ array( 'taxonomy' => 'product_cat',
74
+ 'field' => 'term_id',
75
+ 'terms' => $term_id,
76
+ ) );
77
+ }
78
+
79
+
80
+ if($prduct_type=='featured'){
81
+ $args['meta_query'] = array( array(
82
+ 'key' => '_featured',
83
+ 'value' => 'yes'
84
+ ) ) ;
85
+ }elseif($prduct_type=='sale'){
86
+ $args['meta_query'] = array(
87
+ 'relation' => 'OR',
88
+ array( // Simple products type
89
+ 'key' => '_sale_price',
90
+ 'value' => 0,
91
+ 'compare' => '>',
92
+ 'type' => 'numeric'
93
+ ),
94
+ array( // Variable products type
95
+ 'key' => '_min_variation_sale_price',
96
+ 'value' => 0,
97
+ 'compare' => '>',
98
+ 'type' => 'numeric'
99
+ )
100
+ );
101
+ }
102
+
103
+ $loop = new WP_Query( $args );
104
+ while ( $loop->have_posts() ) : $loop->the_post();
105
+ global $product;
106
+ $pid = $product->get_id();
107
+ $category = wc_get_product_category_list($pid,' / ');
108
+
109
+ echo '<div class="da-slide">
110
+ <div class="da-caption">
111
+ <h3>'.get_the_title() .'</h3>
112
+ <div class="da-border"></div>
113
+ <h4 class="da-category">'.$category.'</h4><div class="prd-price">
114
+ '.$product->get_price_html().'</div>';
115
+ woocommerce_template_loop_add_to_cart( $pid, $product );
116
+ echo '<a popupid = "'.$pid.'" class="da-buy quickview">Buy Now</a>
117
+ </div>
118
+ <div class="da-img">'. woocommerce_get_product_thumbnail().'</div>
119
+ </div>';
120
+ endwhile;
121
+ wp_reset_query();
122
+ }
123
+ }
124
+ endif;
125
+
126
+ /*
127
+ * category product images
128
+ */
129
+ if ( ! function_exists( 'shopline_category_image' ) ) :
130
+
131
+ function shopline_category_image() {
132
+ if ( shopline_is_woocommerce_activated() ) {
133
+ $cate_include = get_theme_mod('woo_cate_slider_list',0);
134
+ $prod_categories = get_terms( 'product_cat', array(
135
+ 'orderby' => 'name',
136
+ 'order' => 'ASC',
137
+ 'hide_empty' => true,
138
+ 'include' => $cate_include,
139
+ ));
140
+
141
+ foreach( $prod_categories as $prod_cat ) :
142
+ $cat_thumb_id = get_term_meta( $prod_cat->term_id, 'thumbnail_id', true );
143
+ $shop_catalog_img = wp_get_attachment_image_src( $cat_thumb_id, 'shop_catalog' );
144
+ if($shop_catalog_img=='') continue;
145
+ $term_link = get_term_link( $prod_cat, 'product_cat' );
146
+ ?>
147
+
148
+ <div class="catli item">
149
+ <figure class="cat-img">
150
+ <div class="fig-img">
151
+ <img src="<?php echo $shop_catalog_img[0]; ?>" alt="<?php echo $prod_cat->name; ?>" />
152
+ </div>
153
+ <figcaption>
154
+ <div class="caption-heading">
155
+ <p><?php echo $prod_cat->name; ?></p>
156
+ </div>
157
+ </figcaption>
158
+ <a href="<?php echo $term_link; ?>"></a>
159
+ </figure>
160
+ </div>
161
+
162
+ <?php endforeach; wp_reset_query(); ?>
163
+ <?php
164
+ }
165
+ }
166
+ endif;
167
+ /*
168
+ * ###### FrontPage Featured producr show ########
169
+ */
170
+ if ( ! function_exists( 'shopline_featured_products' ) ) :
171
+
172
+ function shopline_featured_products() {
173
+ if ( shopline_is_woocommerce_activated() ) {
174
+ echo '<section id="featured-prd" class="featured-prd"><div class="container">';
175
+
176
+ do_action( 'shopline_homepage_before_featured_products' );
177
+
178
+ echo '<div class="featured-wrap"><h4 class="section-title">' . __("FEATURED PRODUCT",'shopline') . '</h4></div>';
179
+
180
+ do_action( 'shopline_homepage_after_featured_products_title' );
181
+
182
+ $meta_query = WC()->query->get_meta_query();
183
+
184
+ $meta_query[] = array(
185
+ 'key' => '_featured',
186
+ 'value' => 'yes'
187
+ );
188
+
189
+ $args = array(
190
+ 'post_type' => 'product',
191
+ 'post_status' => 'publish',
192
+ 'stock' => 1,
193
+ 'showposts' => 6,
194
+ 'columns' => 4,
195
+ 'orderby' => 'date',
196
+ 'order' => 'DESC',
197
+ 'meta_query' => $meta_query
198
+ );
199
+
200
+ echo ' <div id="owl-demo" class="owl-carousel owl-theme">';
201
+
202
+ $featured_query = new WP_Query( $args );
203
+
204
+ while( $featured_query->have_posts() ) : $featured_query->the_post(); global $product; ?>
205
+ <div class="item">
206
+ <div class="products-grid">
207
+ <div class="product-block">
208
+ <figure class="image">
209
+ <a href="" class="product-image">
210
+ <?php
211
+ if ( has_post_thumbnail( $featured_query->post->ID ) )
212
+ echo get_the_post_thumbnail( $featured_query->post->ID, 'shop_catalog' );
213
+ else
214
+ echo '<img src="' . wc_placeholder_img_src() . '" alt="product" class="image-hover wp-post-image" />';
215
+ ?>
216
+ </a>
217
+ <div class="icons">
218
+ <div class="add-cart">
219
+ <?php
220
+ woocommerce_template_loop_add_to_cart( $featured_query->post, $product ); ?>Ï
221
+ <a href="" class=" button product_type_simple add_to_cart_button ajax_add_to_cart"><i class="fa fa-cart-plus"></i></a>
222
+ </div>
223
+
224
+ <div class="yith-wcwl-add-button show">
225
+ <a href="" class="add_to_wishlist">
226
+ <i class="fas fa-heart"></i><span></span></a>
227
+ </div>
228
+ <div class="quick-view">
229
+ <a href="<?php echo esc_url(get_permalink()); ?>" class="quickview yith-wcqv-button" data-product_id="<?php echo $featured_query->post->ID; ?>" style="zoom: 1;">
230
+ <span><i class="fas fa-eye"> </i></span>
231
+ </a>
232
+ </div>
233
+ </div>
234
+ </figure>
235
+ <div class="meta">
236
+ <h3 class="name">
237
+ <a href="<?php echo esc_url(get_permalink()); ?>"><?php the_title(); ?></a>
238
+ </h3>
239
+ <span class="price">
240
+ <?php echo $product->get_price_html(); ?>
241
+ </span>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ <?php
247
+ endwhile;
248
+
249
+ do_action( 'shopline_homepage_after_featured_products' );
250
+ echo "</div></div></section><div class='clearfix'></div>";
251
+ }
252
+ }
253
+ endif;
254
+
255
+ /*
256
+ * ###### FrontPage Category Product show ########
257
+ */
258
+ if ( ! function_exists( 'shopline_woo_product' ) ) :
259
+ function shopline_woo_product(){
260
+ shopline_category_products();
261
+
262
+ }
263
+ endif;
264
+ /*
265
+ * ###### FrontPage Slider Product show ########
266
+ */
267
+ if ( ! function_exists( 'shopline_woo_product_slide' ) ) :
268
+ function shopline_woo_product_slide(){
269
+ shopline_slide_category_products();
270
+ }
271
+ endif;
272
+
273
+ if ( ! function_exists( 'shopline_add_to_cart_url' ) ) :
274
+ function shopline_add_to_cart_url($product){
275
+ $cart_url = apply_filters( 'woocommerce_loop_add_to_cart_link',
276
+ sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="button %s %s"><span>%s</span></a>',
277
+ esc_url( $product->add_to_cart_url() ),
278
+ esc_attr( $product->get_id() ),
279
+ esc_attr( $product->get_sku() ),
280
+ esc_attr( isset( $quantity ) ? $quantity : 1 ),
281
+ $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',
282
+ esc_html( $product->add_to_cart_text() )
283
+ ),$product );
284
+ return $cart_url;
285
+ }
286
+ endif;
287
+ if ( ! function_exists( 'shopline_woo_product_heading' ) ) :
288
+ function shopline_woo_product_heading(){
289
+ $hdn = get_theme_mod("woo_cate_product_heading","");
290
+ if($hdn!=''){
291
+ $return = '<h2>'.get_theme_mod("woo_cate_product_heading","Weekly Featured Product").'</h2><div class="heading-border"></div>';
292
+
293
+ }else{
294
+ $return = '<h2>Weekly Featured Product</h2><div class="heading-border"></div>';
295
+ }
296
+ return $return;
297
+ }
298
+ endif;
299
+
300
+ if ( ! function_exists( 'shopline_woo_category_list' ) ) :
301
+ function shopline_woo_category_list($category_list){
302
+ $cate_list = '<div class="block-heading wow thmkfadeIn" data-wow-duration="3s">'.shopline_woo_product_heading().'
303
+ <div class="featured-filter button-group filters-button-group"><ul>
304
+ '.$category_list.'
305
+ </ul></div>
306
+ </div>';
307
+ return $cate_list;
308
+ }
309
+ endif;
310
+
311
+ function shopline_category_open($productArr){
312
+
313
+ if($productArr['style']=='li'){
314
+ $return = '<li class="featured-isotope cd-item featured-list '.$productArr['slug'].'" id="post-'.$productArr['pid'].'">';
315
+ }elseif($productArr['style']=='div'){
316
+ $return = '<div class="product-slide item">';
317
+ }
318
+ return $return;
319
+ }
320
+ function shopline_category_close($productArr){
321
+ if($productArr['style']=='li'){
322
+ $return = '</li>';
323
+ } elseif($productArr['style']=='div'){
324
+ $return = '</div>';
325
+ }
326
+ return $return;
327
+
328
+ }
329
+
330
+
331
+
332
+ if ( ! function_exists( 'shopline_woo_category_product_grid' ) ) :
333
+
334
+ function shopline_woo_category_product_grid($productArr){
335
+ $product_list = shopline_category_open($productArr).'
336
+ <div class="product-block">
337
+
338
+ <figure class="image">
339
+ '.$productArr['sale'].'
340
+ <a href="'.$productArr['permalink'].'" class="product-image">
341
+ '.$productArr['thumb'].'</a>
342
+ <div>
343
+ <div class="icons">
344
+ <div class="add-cart tooltip">
345
+ '.$productArr['cart_url'].'
346
+ <span class="tooltiptext">Cart</span>
347
+ </div>
348
+ <div class="add_to_wishlist_a tooltip">
349
+ '.shopline_whish_list().'
350
+ <span class="tooltiptext">Wishlist</span>
351
+ </div>
352
+
353
+ <div class="quick-view tooltip">
354
+ <a popupid = "'.$productArr['pid'].'" class="quickview cd-trigger" data-product_id="65" style="zoom: 1;">
355
+ <span><i class="fas fa-eye"> </i></span>
356
+ <span class="tooltiptext">View</span>
357
+ </a>
358
+ </div>
359
+ </div>
360
+ </div>
361
+ </figure>
362
+ <div class="meta">
363
+ <h3 class="name">
364
+ <a href="'.$productArr['permalink'].'">'. $productArr['title'] .'</a>
365
+ </h3>
366
+ <div class="price-grid">
367
+ <span class="price">
368
+ '.$productArr['price'].'
369
+ </span>
370
+ </div>
371
+ </div>
372
+ </div>
373
+ '.shopline_category_close($productArr);
374
+ return $product_list;
375
+ }
376
+ endif;
377
+
378
+ if ( ! function_exists( 'shopline_woo_category_product_boxed' ) ) :
379
+
380
+ function shopline_woo_category_product_boxed($productArr){
381
+ $boxed = '<li class="featured-isotope featured-boxed '.$productArr['slug'].'"id="post-'.$productArr['pid'].'">
382
+ <div class="product-block">
383
+ <div class="product-image-wrapper">
384
+ <figure class="image">
385
+ '.$productArr['sale'].'
386
+ <a href="'.$productArr['permalink'].'" class="product-image">
387
+ '.$productArr['thumb'].'</a>
388
+ </figure>
389
+ </div>
390
+ <div class="product-content-wrapper">
391
+ <div class="meta">
392
+ <h2 class="name">
393
+ <a href="'.$productArr['permalink'].'">'. $productArr['title'] .'</a></h2>
394
+ <div class="heading-border"></div>
395
+ <div class="price-grid">
396
+ <span class="price">
397
+ '.$productArr['price'].'
398
+ </span>
399
+ <p class="description">
400
+ '.$productArr['excerpt'].'
401
+ </p>
402
+ <div class="icons">
403
+ <div class="add-cart tooltip">
404
+ '.$productArr['cart_url'].'
405
+ <span class="tooltiptext">Cart</span></div>
406
+ <div class="add_to_wishlist_url tooltip">
407
+ '.shopline_whish_list().'
408
+ <span class="tooltiptext">Wishlist</span></div>
409
+ <div class="quick-view tooltip">
410
+ <a popupid = "'.$productArr['pid'].'" class="quickview yith-wcqv-button" data-product_id="65" style="zoom: 1;">
411
+ <span><i class="fas fa-eye"> </i></span>
412
+ <span class="tooltiptext">View</span>
413
+ </a>
414
+ </div>
415
+ </div>
416
+ </div>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ </li>';
421
+ return $boxed;
422
+ }
423
+ endif;
424
+
425
+ if ( ! function_exists( 'shopline_category_product_loop' ) ) :
426
+ function shopline_category_product_loop($category_product,$args,$layout){
427
+ $cate_product = '';
428
+ $products = new WP_Query( $args );
429
+ if($products->have_posts()) :
430
+ while($products->have_posts()) : $products->the_post();
431
+ global $product;
432
+ $pid = $product->get_id();
433
+
434
+ // echo "<pre>"; print_r($product);
435
+ //echo "</pre><br></hr>";
436
+ $category_product['products'] = $products;
437
+ $category_product['pid'] = $pid;
438
+ $category_product['title'] = get_the_title();
439
+ $category_product['excerpt'] = get_the_excerpt();
440
+ $category_product['permalink'] = esc_url(get_permalink());
441
+ $category_product['price'] = $product->get_price_html();
442
+ $category_product['cart_url'] = shopline_add_to_cart_url($product);
443
+
444
+ $sale = get_post_meta( $pid, '_sale_price', true);
445
+
446
+ if( $sale) {
447
+ $sale = '<span class="onsale">'.__('Sale','shopline').'</span>';
448
+ }
449
+
450
+ $category_product['sale'] = $sale;
451
+
452
+ if (has_post_thumbnail( $pid ) ):
453
+ $thumbnail = get_the_post_thumbnail( $pid, 'shop_single' );
454
+ else:
455
+ $thumbnail = '<img src="' . wc_placeholder_img_src() . '" alt="product" class="image-hover wp-post-image" />';
456
+ endif;
457
+
458
+ $category_product['thumb'] = $thumbnail;
459
+ if($layout=='grid'){
460
+ $cate_product .= shopline_woo_category_product_grid($category_product);
461
+ } elseif ($layout=='boxed-layout') {
462
+ $cate_product .= shopline_woo_category_product_boxed($category_product);
463
+ }
464
+ endwhile;//Possibility to add else statement
465
+ wp_reset_postdata();
466
+ return $cate_product;
467
+ else:
468
+ echo '<p class="not_found">'.__('Sorry, The post you are looking is unavailable!','shopline').'</p>';
469
+ endif;
470
+ wp_reset_query();
471
+ }
472
+ endif;
473
+
474
+ if ( ! function_exists( 'shopline_category_products' ) ) :
475
+ function shopline_category_products() {
476
+ if( taxonomy_exists( 'product_cat' ) ){
477
+ $layout = 'grid';
478
+ $term_id = get_theme_mod('woo_cate_product_list',0);
479
+ $posts_per_page = get_theme_mod('woo_cate_product_count',8);
480
+ $catetype = get_theme_mod('woo_cate_product_filter_type','cate');
481
+
482
+
483
+ $args=array();
484
+
485
+ if($catetype=='cate'){
486
+ // category filter
487
+ $args = array(
488
+ //'number' => $count,
489
+ 'orderby' => 'title',
490
+ 'order' => 'ASC',
491
+ 'hide_empty' => 1,
492
+ 'include' => $term_id
493
+ );
494
+ }
495
+
496
+ $product_categories = get_terms( 'product_cat', $args );
497
+ $count = count($product_categories);
498
+ $category_list = $cate_product = '';
499
+ if ( $count > 0 && $catetype=='cate'){
500
+
501
+ foreach ( $product_categories as $product_category ) {
502
+ //global $product;
503
+ $category_product = array();
504
+ $category_product['style'] = 'li';
505
+ $current_class = '';
506
+ if($product_category->slug=='albums'){
507
+ $current_class = 'current';
508
+ }
509
+
510
+ $category_list .='<li><a class="button '.$current_class.'" data-filter=".'.$product_category->slug .'">' . $product_category->name . '</a></li>';
511
+
512
+ $category_product['slug'] = $product_category->slug;
513
+
514
+ // product filter
515
+ $args = array(
516
+ 'posts_per_page' => $posts_per_page,
517
+ 'tax_query' => array(
518
+ array(
519
+ 'taxonomy' => 'product_cat',
520
+ 'field' => 'slug',
521
+ // 'terms' => 'white-wines'
522
+ 'terms' => $category_product['slug']
523
+ )
524
+ ),
525
+ 'post_type' => 'product',
526
+ 'post_status' => 'publish',
527
+ 'orderby' => 'date'
528
+ );
529
+
530
+ $cate_product .= shopline_category_product_loop($category_product,$args,$layout);
531
+ }
532
+
533
+
534
+ }elseif($catetype=='recent'){
535
+
536
+ $category_product = array();
537
+ $category_product['style'] = 'li';
538
+ $category_product['slug'] = 'recent';
539
+ $EmptyArray = array_filter($term_id);
540
+ if(!empty($EmptyArray)){
541
+ $args = array(
542
+ 'posts_per_page' => $posts_per_page,
543
+ 'post_type' => 'product',
544
+ 'post_status' => 'publish',
545
+ 'tax_query' => array(
546
+ array(
547
+ 'taxonomy' => 'product_cat',
548
+ 'field' => 'term_id',
549
+ 'terms' => $term_id,
550
+ )
551
+ ),
552
+ 'orderby' =>'date',
553
+ 'order' => 'DESC'
554
+ );
555
+ }else{
556
+ $args = array(
557
+ 'posts_per_page' => $posts_per_page,
558
+ 'post_type' => 'product',
559
+ 'post_status' => 'publish',
560
+ 'orderby' =>'date',
561
+ 'order' => 'DESC'
562
+ );
563
+
564
+ }
565
+ $cate_product .= shopline_category_product_loop($category_product,$args,$layout);
566
+
567
+ }
568
+
569
+
570
+ $cate_list = shopline_woo_category_list($category_list);
571
+
572
+ $cate_list .= '<div class="featured-block">
573
+ <ul class="poup-product featured-'.$layout.' wow thmkfadeInDown" data-wow-duration="2s">
574
+ '. $cate_product.'
575
+ </ul></div>';
576
+
577
+ echo $cate_list;
578
+ }
579
+ }
580
+ endif;
581
+
582
+
583
+ if ( ! function_exists( 'shopline_slide_category_products' ) ) :
584
+ function shopline_slide_category_products() {
585
+ if( taxonomy_exists( 'product_cat' ) ){
586
+ $count = get_theme_mod('woo_slide_product_count',8);
587
+ $cat_slug = get_theme_mod('slide_woo_category','all');
588
+ $term_product = get_theme_mod('slide_woo_product','recent');
589
+ $layout = 'grid';
590
+ $posts_per_page = $count;
591
+ $slug = $cat_slug;
592
+ $productType = $term_product;
593
+ // argument filter
594
+ $args = array(
595
+ 'hide_empty' => 1,
596
+ 'posts_per_page' => $posts_per_page,
597
+ 'post_type' => 'product',
598
+ 'post_status' => 'publish',
599
+ 'orderby' => 'date',
600
+ 'order' => 'DESC'
601
+ );
602
+
603
+ if($productType == 'featured'){
604
+ // featured product
605
+
606
+ $args['meta_query'] = array(
607
+ 'key' => '_featured',
608
+ 'value' => 'yes'
609
+ );
610
+ } elseif($productType == 'random'){
611
+ //random product
612
+ $args['orderby'] = 'rand';
613
+
614
+ }elseif($productType == 'sale') {
615
+ //sale product
616
+ $args['meta_query'] = array(
617
+ 'relation' => 'OR',
618
+ array( // Simple products type
619
+ 'key' => '_sale_price',
620
+ 'value' => 0,
621
+ 'compare' => '>',
622
+ 'type' => 'numeric'
623
+ ),
624
+ array( // Variable products type
625
+ 'key' => '_min_variation_sale_price',
626
+ 'value' => 0,
627
+ 'compare' => '>',
628
+ 'type' => 'numeric'
629
+ )
630
+ );
631
+ }
632
+ // category filter
633
+ if($slug != 'all'){
634
+ // $args['product_cat'] = $slug;
635
+ $args['tax_query'] = array(
636
+ array(
637
+ 'taxonomy' => 'product_cat',
638
+ 'field' => 'slug',
639
+ // 'terms' => 'white-wines'
640
+ 'terms' => $slug
641
+ )
642
+ );
643
+ }
644
+ $category_product = array();
645
+ $category_product['style'] = 'div';
646
+
647
+ $cate_product = shopline_category_product_loop($category_product,$args,$layout);
648
+ echo $cate_product;
649
+
650
+ }
651
+ }
652
+ endif;
653
+
654
+
655
+ if ( ! function_exists( 'shopline_recent_contegory_product' ) ) :
656
+
657
+ function shopline_recent_contegory_product(){
658
+ $layout = get_theme_mod('woo_cate_product_layout','grid');
659
+ $term_id = get_theme_mod('woo_cate_product_list',0);
660
+ $posts_per_page = get_theme_mod('woo_cate_product_count',8);
661
+ $category_product = array();
662
+
663
+ $category_product['slug'] = 'recent-product';
664
+
665
+ $args = array(
666
+ 'posts_per_page' => $posts_per_page,
667
+ 'post_type' => 'product',
668
+ 'post_status' => 'publish',
669
+ 'tax_query' => array(
670
+ array(
671
+ 'taxonomy' => 'product_cat',
672
+ 'field' => 'term_id',
673
+ 'terms' => $term_id,
674
+ )
675
+ ),
676
+ 'orderby' =>'date',
677
+ 'order' => 'DESC'
678
+ );
679
+ $recent_product = shopline_category_product_loop($category_product,$args,$layout);
680
+ $cate_list = '<div class="block-heading">'.shopline_woo_product_heading().'</div>';
681
+ $cate_list .= '<div class="featured-block">
682
+ <ul class="featured-'.$layout.'">
683
+ '. $recent_product.'
684
+ </ul></div>';
685
+
686
+ echo $cate_list;
687
+ }
688
+
689
+ endif;
690
+
691
+ if ( ! function_exists( 'shopline_woo_sidebar' ) ) :
692
+ /** Cart,checkout,dashboard page sidebar diable **/
693
+ function shopline_woo_sidebar($sidebar = false){
694
+ $return =false;
695
+ if( is_checkout() || is_cart() ){
696
+ $return = $sidebar;
697
+ }
698
+ return $return;
699
+ }
700
+
701
+ endif;
702
+
703
+ if ( ! function_exists( 'shopline_remove_password_strength' ) ) :
704
+ /** Registration weak password disable **/
705
+
706
+ function shopline_remove_password_strength() {
707
+ if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
708
+ wp_dequeue_script( 'wc-password-strength-meter' );
709
+ }
710
+ }
711
+ add_action( 'wp_print_scripts', 'shopline_remove_password_strength', 100 );
712
+
713
+
714
+ endif;
715
+
716
+ if ( ! function_exists( 'shopline_my_account' ) ) :
717
+ /** My Account Menu **/
718
+ function shopline_my_account(){
719
+ if ( is_user_logged_in() ) {
720
+ $return = '<a class="logged-in tooltip" href="'.get_permalink( get_option('woocommerce_myaccount_page_id') ).'"><span>'.__('My Account','shopline').'</span><span class="tooltiptext">Account</span></a>';
721
+ }
722
+ else {
723
+ $return = '<a class="logged-out tooltip" href="'.get_permalink( get_option('woocommerce_myaccount_page_id') ).'">
724
+ <span>'.__('Login / Register','shopline').'</span>
725
+ <span class="tooltiptext">Register</span></a>'; }
726
+ echo $return;
727
+ }
728
+
729
+
730
+ endif;
731
+
732
+ if ( ! function_exists( 'shopline_checkout' ) ) :
733
+ /** Checkout Menu **/
734
+ function shopline_checkout(){
735
+ global $woocommerce;
736
+ if ( sizeof( $woocommerce->cart->cart_contents) > 0 ) :
737
+ echo '<a href="' . $woocommerce->cart->get_checkout_url() . '" title="' . __( 'Checkout' ) . '">' . __( 'Checkout','shopline' ) . '</a>';
738
+ endif;
739
+ }
740
+
741
+ endif;
742
+
743
+ if ( ! function_exists( 'shopline_whish_list' ) ) :
744
+
745
+ /** wishlist **/
746
+ function shopline_whish_list(){
747
+ if( shortcode_exists( 'yith_wcwl_add_to_wishlist' ) ) {
748
+ return do_shortcode('[yith_wcwl_add_to_wishlist icon="fas fa-heart" browse_wishlist_text=""]' );
749
+ }
750
+ }
751
+ endif;
752
  ?>
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.2.9
6
  Author: ThemeHunk
7
  Text Domain: themehunk-customizer
8
  Author URI: http://www.themehunk.com/
@@ -10,8 +10,10 @@
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
  // Version constant for easy CSS refreshes
13
- define('THEMEHUNK_CUSTOMIZER_VERSION', '2.2.7');
14
  define('THEMEHUNK_CUSTOMIZER_PLUGIN_URL', plugin_dir_url(__FILE__));
 
 
15
  function themehunk_customizer_text_domain(){
16
  $theme = wp_get_theme();
17
  $themeArr=array();
@@ -27,6 +29,13 @@ include_once( plugin_dir_path(__FILE__) . 'oneline-lite/demo/import-data.php' );
27
  include_once( plugin_dir_path(__FILE__) . 'shopline/demo/import-shopline-data.php');
28
  }elseif(in_array("featuredlite", $theme)){
29
  include_once( plugin_dir_path(__FILE__) . 'featuredlite/demo/import-data.php');
 
 
 
 
 
 
 
30
  }
31
 
32
 
@@ -65,5 +74,14 @@ function themehunk_customizer_load_plugin() {
65
  themehunk_customizer_load_file();
66
  include_once( plugin_dir_path(__FILE__) . 'elanzalite/include.php' );
67
  }
 
 
 
 
 
 
 
 
 
68
  }
69
  ?>
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.1
6
  Author: ThemeHunk
7
  Text Domain: themehunk-customizer
8
  Author URI: http://www.themehunk.com/
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
  // Version constant for easy CSS refreshes
13
+ define('THEMEHUNK_CUSTOMIZER_VERSION', '2.5');
14
  define('THEMEHUNK_CUSTOMIZER_PLUGIN_URL', plugin_dir_url(__FILE__));
15
+ define('THEMEHUNK_CUSTOMIZER_PLUGIN_PATH', plugin_dir_path(__FILE__) );
16
+ include_once(plugin_dir_path(__FILE__) . 'notify/notify.php' );
17
  function themehunk_customizer_text_domain(){
18
  $theme = wp_get_theme();
19
  $themeArr=array();
29
  include_once( plugin_dir_path(__FILE__) . 'shopline/demo/import-shopline-data.php');
30
  }elseif(in_array("featuredlite", $theme)){
31
  include_once( plugin_dir_path(__FILE__) . 'featuredlite/demo/import-data.php');
32
+ }elseif(in_array("big-store", $theme)){
33
+ include_once( plugin_dir_path(__FILE__) . 'big-store/demo/import.php' );
34
+ }elseif(in_array("m-shop", $theme)){
35
+ include_once( plugin_dir_path(__FILE__) . 'm-shop/demo/import.php' );
36
+ }
37
+ elseif(in_array("jot-shop", $theme)){
38
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop/demo/import.php' );
39
  }
40
 
41
 
74
  themehunk_customizer_load_file();
75
  include_once( plugin_dir_path(__FILE__) . 'elanzalite/include.php' );
76
  }
77
+ elseif(in_array("big-store", $theme)){
78
+ include_once( plugin_dir_path(__FILE__) . 'big-store/include.php' );
79
+ }
80
+ elseif(in_array("m-shop", $theme)){
81
+ include_once( plugin_dir_path(__FILE__) . 'm-shop/include.php' );
82
+ }
83
+ elseif(in_array("jot-shop", $theme)){
84
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop/include.php' );
85
+ }
86
  }
87
  ?>
themehunk/custom-customizer.php CHANGED
File without changes
themehunk/customizer-font-selector/class/class-oneline-font-selector.php CHANGED
File without changes
themehunk/customizer-font-selector/css/select.css CHANGED
File without changes
themehunk/customizer-font-selector/css/typography.css CHANGED
File without changes
themehunk/customizer-font-selector/functions.php CHANGED
File without changes
themehunk/customizer-font-selector/js/select.js CHANGED
File without changes
themehunk/customizer-font-selector/js/typography.js CHANGED
File without changes
themehunk/customizer-radio-image/class/class-themehunk-customize-control-radio-image.php CHANGED
File without changes
themehunk/customizer-radio-image/img/download.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradient-1.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradient-2.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradient-3.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradientovly-1.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradientovly-2.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradientovly-3.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradientovly-4.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradientovly-5.png CHANGED
File without changes
themehunk/customizer-radio-image/img/gradientovly-6.png CHANGED
File without changes
themehunk/customizer-radio-image/img/svg1.jpg CHANGED
File without changes
themehunk/customizer-radio-image/img/svg2.jpg CHANGED
File without changes
themehunk/customizer-range-value/class/class-oneline-customizer-range-value-control.php CHANGED
File without changes
themehunk/customizer-range-value/css/customizer-range-value-control.css CHANGED
File without changes
themehunk/customizer-range-value/js/customizer-range-value-control.js CHANGED
File without changes
themehunk/customizer-scroll/class/class-themehunk-customize-control-scroll.php CHANGED
File without changes
themehunk/customizer-scroll/js/customizer-addon-script.js CHANGED
File without changes
themehunk/customizer-scroll/js/script.js CHANGED
File without changes
themehunk/customizer-tabs/class/class-themehunk-customize-control-tabs.php CHANGED
File without changes
themehunk/customizer-tabs/css/style.css CHANGED
File without changes
themehunk/customizer-tabs/js/customizer-addon-script.js CHANGED
@@ -14,7 +14,7 @@ var thunk_customize_tabs_focus = function ( $ ) {
14
  $(
15
  function () {
16
  var customize = wp.customize;
17
- $( '.customize-partial-edit-shortcut' ).live(
18
  'DOMNodeInserted', function () {
19
  $( this ).on(
20
  'click', function() {
14
  $(
15
  function () {
16
  var customize = wp.customize;
17
+ $( '.customize-partial-edit-shortcut' ).on(
18
  'DOMNodeInserted', function () {
19
  $( this ).on(
20
  'click', function() {
themehunk/customizer-tabs/js/script.js CHANGED
File without changes
themehunk/images/lrg.png CHANGED
File without changes
themehunk/images/sml.png CHANGED
File without changes
themehunk/js/customizer.js CHANGED
File without changes
themehunk/js/widget.js CHANGED
File without changes