ThemeHunk Customizer - Version 2.5.3

Version Description

  • Jotshop - Ribbon section video issue resolved.
  • Jotshop - About me widget added.
  • Jotshop - Single-post widget Added.
  • Jotshop - Th-variation swatches issue resolved.
  • Jotshop - Import demo files added.
  • Jotshop - Import link changed.
  • Jotshop - Import demo homepage set issue resolved.
Download this release

Release Info

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

Code changes from version 2.5.2 to 2.5.3

jot-shop/demo/import.php CHANGED
@@ -3,42 +3,34 @@ 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
  )
@@ -79,9 +71,12 @@ function jot_shop_after_import(){
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
 
3
  add_filter( 'pt-ocdi/regenerate_thumbnails_in_content_import', '__return_false' );
4
 
5
  function jot_shop_import_files(){
6
+ $file_url = 'https://themehunk.com/wp-content/uploads/sites-demo/jotshop/';
7
  return apply_filters(
8
  'jot_shop_demo_site', array(
9
  array(
10
  'import_file_name' => esc_html__('Jot Shop Default','jot-shop'),
11
+ 'import_file_url'=> esc_url($file_url.'default/blog.xml'),
12
+ 'import_customizer_file_url'=> esc_url($file_url.'default/customizer.dat'),
13
+ 'import_widget_file_url'=> esc_url($file_url.'default/widgets.wie'),
14
+ 'import_preview_image_url'=> esc_url($file_url.'default/thumb.png'),
15
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/jotshop/'),
16
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
17
  ),
18
  array(
19
  'import_file_name' => esc_html__('Jot Shop Groceries','jot-shop'),
20
+ 'import_file_url'=> esc_url($file_url.'groceries/blog.xml'),
21
+ 'import_customizer_file_url'=> esc_url($file_url.'groceries/customizer.dat'),
22
+ 'import_widget_file_url'=> esc_url($file_url.'groceries/widgets.wie'),
23
+ 'import_preview_image_url'=> esc_url($file_url.'groceries/thumb.png'),
24
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/groceries-shop/'),
25
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
26
  ),
27
  array(
28
  'import_file_name' => esc_html__('Jot Shop Electro','jot-shop'),
29
+ 'import_file_url'=> esc_url($file_url.'electro/blog.xml'),
30
+ 'import_customizer_file_url'=> esc_url($file_url.'electro/customizer.dat'),
31
+ 'import_widget_file_url'=> esc_url($file_url.'electro/widgets.wie'),
32
+ 'import_preview_image_url'=> esc_url($file_url.'electro/thumb.png'),
33
+ 'preview_url'=> esc_url('https://wpthemes.themehunk.com/electro-shop/'),
 
 
 
 
 
 
 
 
 
34
  'import_notice' => __( 'Before importing the demo data, Install & Activate the recommended plugins.', 'jot-shop' ),
35
  ),
36
  )
71
  }
72
  }
73
 
74
+ if ( $front_page_id ) {
 
75
  update_option( 'page_on_front', $front_page_id );
76
+ update_option( 'show_on_front', 'page' );
77
+
78
+ }
79
+ if ($blog_page_id) {
80
  update_option( 'page_for_posts', $blog_page_id );
81
  }
82
 
jot-shop/include.php CHANGED
@@ -3,3 +3,7 @@ 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' );
 
 
 
 
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' );
6
+
7
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop-admin/widget/widget-input.php' );
8
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop-admin/widget/about-us-widget.php' );
9
+ include_once( plugin_dir_path(__FILE__) . 'jot-shop-admin/widget/post-single-slide-widget.php' );
jot-shop/jot-shop-admin/widget/about-us-widget.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ /*
4
+ * About me widget
5
+ * user about us
6
+ *
7
+ */
8
+ // add admin scripts
9
+ function jot_shop_widget_enqueue(){
10
+ wp_enqueue_media();
11
+ }
12
+ add_action('admin_enqueue_scripts', 'jot_shop_widget_enqueue');
13
+ // register widget
14
+ function jot_shop_about_us_widget(){
15
+ register_widget( 'Jot_Shop_About_Me' );
16
+ }
17
+ add_action('widgets_init','jot_shop_about_us_widget');
18
+ class Jot_Shop_About_Me extends WP_Widget {
19
+ function __construct() {
20
+ $widget_ops = array('classname' => 'th-about-me',
21
+ 'description' => 'Display member image with description, link and font awesome icons');
22
+ parent::__construct('th-about-me-widget', __('Jot Shop : About Us widget','jot-shop'), $widget_ops);
23
+ }
24
+
25
+ function widget($args, $instance) {
26
+ extract($args);
27
+ // widget content
28
+ echo $before_widget;
29
+ $title = isset($instance['title'])?$instance['title']:'';
30
+ $text = isset($instance['text'])?$instance['text']:'';
31
+ $author_img_uri = isset($instance['author_img_uri'])?$instance['author_img_uri']:'';
32
+ $readlink = isset($instance['readlink'])?$instance['readlink']:'';
33
+ $readtxt = isset($instance['readtxt'])?$instance['readtxt']:'';
34
+ $icon1 = isset($instance['icon1'])?$instance['icon1']:'';
35
+ $icon2 = isset($instance['icon2'])?$instance['icon2']:'';
36
+ $icon3 = isset($instance['icon3'])?$instance['icon3']:'';
37
+ $icon4 = isset($instance['icon4'])?$instance['icon4']:'';
38
+ $linkicon1 = isset($instance['linkicon1'])?$instance['linkicon1']:'Social Link-1';
39
+ $linkicon2 = isset($instance['linkicon2'])?$instance['linkicon2']:'http://';
40
+ $linkicon3 = isset($instance['linkicon3'])?$instance['linkicon3']:'http://';
41
+ $linkicon4 = isset($instance['linkicon4'])?$instance['linkicon4']:'http://';
42
+ ?>
43
+ <div class="th-aboutme">
44
+ <h2 class="widget-title">
45
+ <?php echo apply_filters('widget_title',$title); ?>
46
+ </h2>
47
+ <div class="th-aboutme-description">
48
+ <?php if($author_img_uri!=''): ?>
49
+ <a href="<?php echo esc_url($readlink); ?>"><img src="<?php echo esc_url($author_img_uri); ?>" /></a>
50
+ <?php endif; ?>
51
+ <p><?php echo $text; ?></p>
52
+ <?php if ($readtxt != '') { ?>
53
+ <a class="read-more" href="<?php echo $readlink; ?>"><?php echo $readtxt;?></a>
54
+ <?php } ?>
55
+
56
+ <?php if($icon1!=='') {?>
57
+ <div class="about-social-meta">
58
+ <ul>
59
+ <li class="about-social-social"><a href="<?php echo $linkicon1;?>"><i class="<?php echo $icon1; ?>"></i></a></li>
60
+ <li class="about-social-social"><a href="<?php echo $linkicon2;?>"><i class="<?php echo $icon2; ?>"></i></a></li>
61
+ <li class="about-social-social"><a href="<?php echo $linkicon3;?>"><i class="<?php echo $icon3; ?>"></i></a></li>
62
+ <li class="about-social-social"><a href="<?php echo $linkicon4;?>"><i class="<?php echo $icon4; ?>"></i></a></li>
63
+ </ul>
64
+ </div>
65
+ <?php } ?>
66
+ </div>
67
+ </div>
68
+
69
+ <?php
70
+ echo $after_widget;
71
+
72
+ }
73
+
74
+ function update($new_instance, $old_instance) {
75
+ $instance = $old_instance;
76
+ $instance['text'] = $new_instance['text'];
77
+ $instance['title'] = strip_tags( $new_instance['title'] );
78
+ $instance['author_img_uri'] = strip_tags( $new_instance['author_img_uri'] );
79
+ $instance['readlink'] = $new_instance['readlink'];
80
+ $instance['readtxt'] = $new_instance['readtxt'];
81
+ $instance['icon1'] = $new_instance['icon1'];
82
+ $instance['icon2'] = $new_instance['icon2'];
83
+ $instance['icon3'] = $new_instance['icon3'];
84
+ $instance['icon4'] = $new_instance['icon4'];
85
+ $instance['linkicon1'] = $new_instance['linkicon1'];
86
+ $instance['linkicon2'] = $new_instance['linkicon2'];
87
+ $instance['linkicon3'] = $new_instance['linkicon3'];
88
+ $instance['linkicon4'] = $new_instance['linkicon4'];
89
+ return $instance;
90
+ }
91
+
92
+ function form($instance) {
93
+ if( $instance) {
94
+ $title = $instance['title'];
95
+ $text = $instance['text'];
96
+ $author_img_uri = $instance['author_img_uri'];
97
+ $readlink = $instance['readlink'];
98
+ $readtxt = $instance['readtxt'];
99
+ $icon1 = $instance['icon1'];
100
+ $icon2 = $instance['icon2'];
101
+ $icon3 = $instance['icon3'];
102
+ $icon4 = $instance['icon4'];
103
+ $linkicon1 = $instance['linkicon1'];
104
+ $linkicon2 = $instance['linkicon2'];
105
+ $linkicon3 = $instance['linkicon3'];
106
+ $linkicon4 = $instance['linkicon4'];
107
+
108
+
109
+ } else {
110
+ $title = '';
111
+ $text = '';
112
+ $author_img_uri = '';
113
+ $readtxt = '';
114
+ $readlink = 'https://';
115
+ $icon1 = 'fa fa-facebook';
116
+ $icon2 = 'fa fa-twitter';
117
+ $icon3 = 'fa fa-linkedin';
118
+ $icon4 = 'fa fa-google';
119
+ $linkicon1 = 'Social Link-1';
120
+ $linkicon2 = '';
121
+ $linkicon3 = '';
122
+ $linkicon4 = '';
123
+ }
124
+
125
+
126
+ ?>
127
+ <div class="clearfix"></div>
128
+ <p>
129
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title','jot-shop'); ?></label></p><P>
130
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" value="<?php if(isset($instance["title"])){ echo $instance['title']; } ?>" style="margin-top:5px;">
131
+ </p>
132
+
133
+ <p>
134
+ <label for="<?php echo $this->get_field_id('author_img_uri'); ?>"><?php _e('Member Image','jot-shop'); ?></label>
135
+ <?php
136
+ if ( isset($instance['author_img_uri']) && $instance['author_img_uri'] != '' ) :
137
+ echo '<img id="'.$this->get_field_id('author_img_uri').'" class="custom_media_image" src="' . $instance['author_img_uri'] . '" style="margin:0;padding:0;max-width:100px;float:left;display:inline-block" /><br />';
138
+ endif;
139
+ ?>
140
+ <input type="text" class="widefat custom_media_url" name="<?php echo $this->get_field_name('author_img_uri'); ?>" id="<?php echo $this->get_field_id('author_img_uri'); ?>" value="<?php if(isset($instance["author_img_uri"])){ echo $instance['author_img_uri']; } ?>" style="margin-top:5px;">
141
+ <input type="button" class="button button-primary custom_media_button" id="<?php echo $this->get_field_id('author_img_uri'); ?>" name="<?php echo $this->get_field_name('author_img_uri'); ?>" value="Upload Image" style="margin-top:5px;" />
142
+ </p>
143
+ <p>
144
+ <label for="<?php echo $this->get_field_id('text'); ?>"><?php _e('About Me Description','jot-shop'); ?></label></p><P>
145
+ <textarea name="<?php echo $this->get_field_name('text'); ?>" id="<?php echo $this->get_field_id('text'); ?>" class="widefat" >
146
+ <?php if(isset($instance["text"])){ echo $instance['text']; } ?></textarea>
147
+ </p>
148
+
149
+ <p>
150
+ <label for="<?php echo $this->get_field_id('readtxt'); ?>"><?php _e('Read More Text','jot-shop'); ?></label></p><P>
151
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('readtxt'); ?>" id="<?php echo $this->get_field_id('readtxt'); ?>" value="<?php if(isset($instance["readtxt"])){ echo $instance['readtxt']; } ?>" style="margin-top:5px;">
152
+ </p>
153
+ <p>
154
+ <label for="<?php echo $this->get_field_id('readlink'); ?>"><?php _e('Link','jot-shop'); ?></label></p><P>
155
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('readlink'); ?>" id="<?php echo $this->get_field_id('readlink'); ?>" value="<?php if(isset($instance["readlink"])){ echo $instance['readlink']; } ?>" style="margin-top:5px;">
156
+ </p>
157
+
158
+ <br/><P>
159
+ <label style="padding-bottom: 5px; padding-top:0px;font-size: 12px;font-style: italic;"><?php _e('Go to this link for <a target="_blank" href="//fontawesome.io/icons/">Fontawesome icons</a> and copy the class of icon that you need & paste it below.','jot-shop'); ?></label></p>
160
+ <P>
161
+ <label for="<?php echo $this->get_field_id('icon1'); ?>"><?php _e('Fontawesome Social Icon-1','jot-shop'); ?></label>
162
+ </p>
163
+ <P>
164
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('icon1'); ?>" id="<?php echo $this->get_field_id('icon1'); ?>" value="<?php if(isset($instance["icon1"])){ echo $instance['icon1']; } ?>" style="margin-top:5px;"></p><P>
165
+ <label for="<?php echo $this->get_field_id('icon1'); ?>"><?php _e('Social Icon Link','jot-shop'); ?></label></p><P>
166
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon1'); ?>" id="<?php echo $this->get_field_id('linkicon1'); ?>" value="<?php if(isset($instance["linkicon1"])){ echo $instance['linkicon1']; } ?>" style="margin-top:5px;">
167
+ </p>
168
+ <p>
169
+ <label for="<?php echo $this->get_field_id('icon2'); ?>"><?php _e('Fontawesome Social Icon-2','jot-shop'); ?></label></p><P>
170
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('icon2'); ?>" id="<?php echo $this->get_field_id('icon2'); ?>" value="<?php if(isset($instance["icon2"])){ echo $instance['icon2']; } ?>" style="margin-top:5px;"></p><P>
171
+ <label for="<?php echo $this->get_field_id('icon2'); ?>"><?php _e('Social Icon Link','jot-shop'); ?></label></p><P>
172
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon2'); ?>" id="<?php echo $this->get_field_id('linkicon2'); ?>" value="<?php if(isset($instance["linkicon2"])){ echo $instance['linkicon2']; } ?>" style="margin-top:5px;">
173
+ </p>
174
+ <p>
175
+ <label for="<?php echo $this->get_field_id('icon3'); ?>"><?php _e('Fontawesome Social Icon-3','jot-shop'); ?></label></p><P>
176
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('icon3'); ?>" id="<?php echo $this->get_field_id('icon3'); ?>" value="<?php if(isset($instance["icon3"])){ echo $instance['icon3']; } ?>" style="margin-top:5px;"></p><P>
177
+ <label for="<?php echo $this->get_field_id('icon3'); ?>"><?php _e('Social Icon Link','jot-shop'); ?></label></p><P>
178
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon3'); ?>" id="<?php echo $this->get_field_id('linkicon3'); ?>" value="<?php if(isset($instance["linkicon3"])){ echo $instance['linkicon3']; } ?>" style="margin-top:5px;">
179
+ </p>
180
+ <p>
181
+ <label for="<?php echo $this->get_field_id('icon4'); ?>"><?php _e('Fontawesome Social Icon-4','jot-shop'); ?></label></p><P>
182
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('icon4'); ?>" id="<?php echo $this->get_field_id('icon4'); ?>" value="<?php if(isset($instance["icon4"])){ echo $instance['icon4']; } ?>" style="margin-top:5px;"></p><P>
183
+ <label for="<?php echo $this->get_field_id('icon4'); ?>"><?php _e('Social Icon Link-4','jot-shop'); ?></label></p><P>
184
+ <input type="text" class="widefat" name="<?php echo $this->get_field_name('linkicon4'); ?>" id="<?php echo $this->get_field_id('linkicon4'); ?>" value="<?php if(isset($instance["linkicon4"])){ echo $instance['linkicon4']; } ?>" style="margin-top:5px;">
185
+ </p>
186
+
187
+ <?php
188
+ }
189
+ }
jot-shop/jot-shop-admin/widget/post-single-slide-widget.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // register widget
3
+ function jot_shop_post_slide_widget(){
4
+ register_widget( 'jot_shop_slide_post' );
5
+ }
6
+ add_action('widgets_init','jot_shop_post_slide_widget');
7
+
8
+
9
+ class jot_shop_slide_post extends WP_Widget {
10
+ function __construct() {
11
+ $widget_ops = array('classname' => 'jotshop-pro-slide-post',
12
+ 'description' => 'Display post along with description');
13
+ parent::__construct('themehunk-customizer-section-four', __('Jot Shop : Post Slide widget','jot-shop'), $widget_ops);
14
+ }
15
+
16
+ function widget($args, $instance) {
17
+ extract($args);
18
+ // widget content
19
+ echo $before_widget;
20
+ $query = array();
21
+ $title = isset($instance['title'])?$instance['title']:__('writing your description','jot-shop');
22
+ $query['cate'] = isset($instance['cate']) ? absint($instance['cate']) : 0;
23
+ $query['count'] = isset($instance['count']) ? absint($instance['count']) : 3;
24
+ $query['orderby'] = isset($instance['orderby']) ?$instance['orderby'] : 'post_date';
25
+ $query['thumbnail'] = false;
26
+ $query['sticky'] = true;
27
+ $latest_posts = jot_shop_post_query($query);
28
+ $catelink = get_category_link( $query['cate'] );
29
+ ?>
30
+ <div class="post-slide-widget <?php echo $widget_id; ?>">
31
+ <h2 class="widget-title slide-widget-title "><?php echo $title; ?></h2>
32
+
33
+ <div id="<?php echo $widget_id; ?>" class="slide-post owl-carousel">
34
+ <?php if ( $latest_posts->have_posts() ) { ?>
35
+ <?php while($latest_posts->have_posts()): $latest_posts->the_post();
36
+ ?>
37
+ <div class="post-item">
38
+ <div class="post-thumb">
39
+ <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
40
+ the_post_thumbnail();
41
+ }
42
+ ?>
43
+ </div>
44
+ <div class="entry-body">
45
+ <div class="post-item-content">
46
+ <a href="<?php the_permalink(); ?>"><span class="title"><?php the_title(); ?></span></a>
47
+ <div class="entry-meta">
48
+ <span class="entry-date"><?php the_time( get_option('date_format') ); ?></span>
49
+ </div>
50
+
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <?php endwhile; ?>
55
+ <?php } wp_reset_postdata(); ?>
56
+ </div>
57
+ </div>
58
+
59
+ <script>
60
+ ///-----------------------///
61
+ // product slide script
62
+ ///-----------------------///
63
+ jQuery(document).ready(function(){
64
+ var wdgetid = '<?php echo $widget_id; ?>';
65
+
66
+ jQuery('#'+wdgetid+'.owl-carousel').owlCarousel({
67
+ items:1,
68
+ loop:true,
69
+ nav: true,
70
+ margin:0,
71
+ autoplay:false,
72
+ autoplaySpeed:500,
73
+ autoplayTimeout:2000,
74
+ smartSpeed:500,
75
+ fluidSpeed:true,
76
+ responsiveClass:true,
77
+ dots: false,
78
+ autoplayHoverPause: true, // Stops autoplay
79
+ navText: ["<i class='slick-nav fa fa-angle-left'></i>",
80
+ "<i class='slick-nav fa fa-angle-right'></i>"],
81
+ });
82
+ });
83
+ </script>
84
+ <?php
85
+ echo $after_widget;
86
+
87
+ }
88
+ function update($new_instance, $old_instance) {
89
+ $instance = $old_instance;
90
+ $instance['title'] = strip_tags( $new_instance['title'] );
91
+ $instance["cate"] = absint($new_instance["cate"]);
92
+ $instance['count'] = strip_tags( $new_instance['count'] );
93
+ $instance["orderby"] = $new_instance["orderby"];
94
+ return $instance;
95
+ }
96
+ function form($instance) {
97
+ $widgetInput = New THunkWidgetHtml();
98
+ $title = isset($instance['title']) ? esc_attr($instance['title']) : __('Latest News','jot-shop');
99
+ $cate = isset($instance['cate']) ? absint($instance['cate']) : 0;
100
+ $count = isset($instance['count']) ? absint($instance['count']) : 3;
101
+
102
+
103
+
104
+ $termarr = array('child_of' => 0);
105
+ $terms = get_terms('category' ,$termarr);
106
+ $foption = '<option value="0">All Post Show</option>';
107
+ foreach($terms as $cat) {
108
+ $term_id = $cat->term_id;
109
+ $selected1 = ($cate==$term_id)?'selected':'';
110
+ $foption .= '<option value="'.$term_id.'" '.$selected1.'>'.$cat->name.'</option>';
111
+ }
112
+ ?>
113
+
114
+ <div class="clearfix"></div>
115
+
116
+ <p>
117
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Latest News Title','jot-shop'); ?></label>
118
+ <input name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $title; ?>" >
119
+ </p>
120
+ <p><label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Add Number of Post Show','jot-shop'); ?></label>
121
+ <input id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo $count; ?>" size="3" /></p>
122
+ <p>
123
+ <p>
124
+ <label for="<?php echo $this->get_field_id('cate'); ?>"><?php _e('Select Specific Option To Display Post','jot-shop'); ?></label>
125
+ <select name="<?php echo $this->get_field_name('cate'); ?>" ><?php echo $foption; ?></select>
126
+ </p>
127
+ <?php
128
+ $arr2 = array('id'=>'orderby',
129
+ 'label'=> __('Show Post Orderby ','jot-shop'),
130
+ 'default' => 'post_date',
131
+ 'option' => array('post_date'=>__('Recent Posts','jot-shop'),
132
+ 'rand'=>__('Random Post','jot-shop'),
133
+ 'comment_count' =>__('Popular Posts','jot-shop'))
134
+ );
135
+ $widgetInput->selectBox($this,$instance,$arr2);
136
+ ?>
137
+
138
+ <?php
139
+ $arr1 = array('id'=>'exclude',
140
+ 'h5'=> __('Unique Post Option','jot-shop'),
141
+ 'label'=> __('(Post displaying in this section will be excluded from all bottom sections. You can use this option to stop repeated post)','jot-shop'),
142
+ 'span' => __('Check here to display unique post','jot-shop')
143
+ );
144
+ $widgetInput->radioBox($this,$instance,$arr1);?>
145
+ <?php
146
+ }
147
+ }
148
+ ?>
jot-shop/jot-shop-admin/widget/widget-input.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class THunkWidgetHtml{
3
+ function radioBox($thi,$inst,$custarr){
4
+ $checked ='';
5
+ $id = $custarr['id'];
6
+ if(isset($inst[$id])){
7
+ $checked = checked((bool) $inst[$id], true,false);
8
+ }
9
+ ?>
10
+ <p>
11
+ <h5 class="thnk-widget-checkbox" for="<?php echo $thi->get_field_id($id); ?>"><?php echo $custarr['h5']; ?></h5>
12
+ <span><?php echo $custarr['span']; ?></span>
13
+ <input type="checkbox" id="<?php echo $thi->get_field_id($id); ?>" name="<?php echo $thi->get_field_name($id); ?>" <?php echo $checked; ?>/>
14
+ <label class="thnk-widget-checkbox" for="<?php echo $thi->get_field_id($id); ?>"><?php echo $custarr['label']; ?></label>
15
+ </p>
16
+ <?php
17
+ }
18
+ function selectBox($thi,$inst,$custarr){
19
+ $id = $custarr['id'];
20
+ $orderby = isset($inst[$id]) ? $inst[$id]: $custarr['default'] ;
21
+ ?>
22
+ <p><label for="<?php echo $thi->get_field_id($id); ?>"><?php echo $custarr['label']; ?></label>
23
+ <select id="<?php echo $thi->get_field_id($id); ?>" name="<?php echo $thi->get_field_name($id); ?>" >
24
+ <?php foreach($custarr['option'] as $value=>$title){ ?>
25
+ <option value ="<?php echo $value; ?>" <?php if($orderby==$value){ echo 'selected'; }?> ><?php echo $title; ?> </option>
26
+ <?php } ?>
27
+ </select>
28
+ </p>
29
+ <?php
30
+ }
31
+ }
jot-shop/jot-shop-admin/woo/jot-shop-admin.php CHANGED
@@ -386,6 +386,33 @@ function jot_shop_product_filter_loop($args){
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 = '' ){
386
  }
387
  wp_reset_postdata();
388
  }
389
+ }
390
+ if(!function_exists('jot_shop_post_query')){
391
+ /*****************************/
392
+ // Product show function
393
+ /****************************/
394
+ function jot_shop_post_query($query){
395
+
396
+ $args = array(
397
+ 'orderby' => esc_html($query['orderby']),
398
+ 'order' => 'DESC',
399
+ 'ignore_sticky_posts' => esc_html($query['sticky']),
400
+ 'post_type' => 'post',
401
+ 'posts_per_page' => esc_html($query['count']),
402
+ 'cat' => esc_html($query['cate']),
403
+ 'meta_key' => '_thumbnail_id',
404
+
405
+ );
406
+
407
+ if($query['thumbnail']){
408
+ $args['meta_key'] = '_thumbnail_id';
409
+ }
410
+
411
+ $return = new WP_Query($args);
412
+
413
+ return $return;
414
+ }
415
+
416
  }
417
  if(!function_exists('jot_shop_product_list_categories_slider')){
418
  function jot_shop_product_list_categories_slider( $args = '' ){
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,6 +29,14 @@ Just upload the `themehunk-customizer.zip` to the `/wp-content/plugins/` directo
29
  == Screenshots ==
30
 
31
  == Changelog ==
 
 
 
 
 
 
 
 
32
 
33
  = 2.5.2 =
34
  * Jot-Shop Issue Fixed.
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.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
  == Screenshots ==
30
 
31
  == Changelog ==
32
+ = 2.5.3 =
33
+ * Jotshop - Ribbon section video issue resolved.
34
+ * Jotshop - About me widget added.
35
+ * Jotshop - Single-post widget Added.
36
+ * Jotshop - Th-variation swatches issue resolved.
37
+ * Jotshop - Import demo files added.
38
+ * Jotshop - Import link changed.
39
+ * Jotshop - Import demo homepage set issue resolved.
40
 
41
  = 2.5.2 =
42
  * Jot-Shop Issue Fixed.
themehunk-customizer.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: ThemeHunk Customizer
4
  Description: With the help of ThemeHunk unlimited addon you can add unlimited number of columns for services, Testimonial, and Team with color options for each.
5
- Version: 2.5.2
6
  Author: ThemeHunk
7
  Text Domain: themehunk-customizer
8
  Author URI: http://www.themehunk.com/
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.3
6
  Author: ThemeHunk
7
  Text Domain: themehunk-customizer
8
  Author URI: http://www.themehunk.com/