Woocommerce Products Slider - Version 1.0

Version Description

  • 22/07/2014 Initial release.
Download this release

Release Info

Developer wpkids
Plugin Icon 128x128 Woocommerce Products Slider
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (67) hide show
  1. css/bg/bgnoise_lg.png +0 -0
  2. css/bg/congruent_outline.png +0 -0
  3. css/bg/congruent_pentagon.png +0 -0
  4. css/bg/food.png +0 -0
  5. css/bg/giftly.png +0 -0
  6. css/bg/retina_wood.png +0 -0
  7. css/bg/skulls.png +0 -0
  8. css/bg/wood_pattern.png +0 -0
  9. css/loading.gif +0 -0
  10. css/owl.carousel.css +71 -0
  11. css/owl.theme.css +79 -0
  12. css/ribbons/best.png +0 -0
  13. css/ribbons/dis-10.png +0 -0
  14. css/ribbons/dis-100.png +0 -0
  15. css/ribbons/dis-20.png +0 -0
  16. css/ribbons/dis-30.png +0 -0
  17. css/ribbons/dis-40.png +0 -0
  18. css/ribbons/dis-50.png +0 -0
  19. css/ribbons/dis-60.png +0 -0
  20. css/ribbons/dis-70.png +0 -0
  21. css/ribbons/dis-80.png +0 -0
  22. css/ribbons/dis-90.png +0 -0
  23. css/ribbons/free.png +0 -0
  24. css/ribbons/fresh.png +0 -0
  25. css/ribbons/gift.png +0 -0
  26. css/ribbons/hot.png +0 -0
  27. css/ribbons/new.png +0 -0
  28. css/ribbons/pro.png +0 -0
  29. css/ribbons/sale.png +0 -0
  30. css/ribbons/save.png +0 -0
  31. css/ribbons/top.png +0 -0
  32. css/style.css +212 -0
  33. includes/wcps-functions.php +246 -0
  34. includes/wcps-meta.php +1045 -0
  35. index.php +2 -0
  36. js/color-picker.js +10 -0
  37. js/owl.carousel.js +1512 -0
  38. js/scripts.js +90 -0
  39. readme.txt +75 -0
  40. themes/anti-ruger/images/arrow-next.png +0 -0
  41. themes/anti-ruger/images/arrow-prev.png +0 -0
  42. themes/anti-ruger/index.php +373 -0
  43. themes/anti-ruger/style.css +210 -0
  44. themes/flat/images/arrow-next.png +0 -0
  45. themes/flat/images/arrow-prev.png +0 -0
  46. themes/flat/images/star.png +0 -0
  47. themes/flat/index.php +371 -0
  48. themes/flat/style.css +179 -0
  49. themes/rossi/images/arrow-next.png +0 -0
  50. themes/rossi/images/arrow-prev.png +0 -0
  51. themes/rossi/index.php +362 -0
  52. themes/rossi/style.css +174 -0
  53. themes/ruger/images/arrow-next.png +0 -0
  54. themes/ruger/images/arrow-prev.png +0 -0
  55. themes/ruger/index.php +363 -0
  56. themes/ruger/style.css +206 -0
  57. themes/saiga/images/arrow-next.png +0 -0
  58. themes/saiga/images/arrow-prev.png +0 -0
  59. themes/saiga/index.php +360 -0
  60. themes/saiga/style.css +193 -0
  61. themes/sako/images/arrow-next.png +0 -0
  62. themes/sako/images/arrow-prev.png +0 -0
  63. themes/sako/index.php +359 -0
  64. themes/sako/style.css +206 -0
  65. wcps-help.php +110 -0
  66. wcps-settings.php +266 -0
  67. woocommerce-products-slider.php +326 -0
css/bg/bgnoise_lg.png ADDED
Binary file
css/bg/congruent_outline.png ADDED
Binary file
css/bg/congruent_pentagon.png ADDED
Binary file
css/bg/food.png ADDED
Binary file
css/bg/giftly.png ADDED
Binary file
css/bg/retina_wood.png ADDED
Binary file
css/bg/skulls.png ADDED
Binary file
css/bg/wood_pattern.png ADDED
Binary file
css/loading.gif ADDED
Binary file
css/owl.carousel.css ADDED
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Core Owl Carousel CSS File
3
+ * v1.3.3
4
+ */
5
+
6
+ /* clearfix */
7
+ .owl-carousel .owl-wrapper:after {
8
+ content: ".";
9
+ display: block;
10
+ clear: both;
11
+ visibility: hidden;
12
+ line-height: 0;
13
+ height: 0;
14
+ }
15
+ /* display none until init */
16
+ .owl-carousel{
17
+ display: none;
18
+ position: relative;
19
+ width: 100%;
20
+ -ms-touch-action: pan-y;
21
+ }
22
+ .owl-carousel .owl-wrapper{
23
+ display: none;
24
+ position: relative;
25
+ -webkit-transform: translate3d(0px, 0px, 0px);
26
+ }
27
+ .owl-carousel .owl-wrapper-outer{
28
+ overflow: hidden;
29
+ position: relative;
30
+ width: 100%;
31
+ }
32
+ .owl-carousel .owl-wrapper-outer.autoHeight{
33
+ -webkit-transition: height 500ms ease-in-out;
34
+ -moz-transition: height 500ms ease-in-out;
35
+ -ms-transition: height 500ms ease-in-out;
36
+ -o-transition: height 500ms ease-in-out;
37
+ transition: height 500ms ease-in-out;
38
+ }
39
+
40
+ .owl-carousel .owl-item{
41
+ float: left;
42
+ }
43
+ .owl-controls .owl-page,
44
+ .owl-controls .owl-buttons div{
45
+ cursor: pointer;
46
+ }
47
+ .owl-controls {
48
+ -webkit-user-select: none;
49
+ -khtml-user-select: none;
50
+ -moz-user-select: none;
51
+ -ms-user-select: none;
52
+ user-select: none;
53
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
54
+ }
55
+
56
+ /* mouse grab icon */
57
+ .grabbing {
58
+ cursor:url(grabbing.png) 8 8, move;
59
+ }
60
+
61
+ /* fix */
62
+ .owl-carousel .owl-wrapper,
63
+ .owl-carousel .owl-item{
64
+ -webkit-backface-visibility: hidden;
65
+ -moz-backface-visibility: hidden;
66
+ -ms-backface-visibility: hidden;
67
+ -webkit-transform: translate3d(0,0,0);
68
+ -moz-transform: translate3d(0,0,0);
69
+ -ms-transform: translate3d(0,0,0);
70
+ }
71
+
css/owl.theme.css ADDED
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Owl Carousel Owl Demo Theme
3
+ * v1.3.3
4
+ */
5
+
6
+ .owl-theme .owl-controls{
7
+ margin-top: 10px;
8
+ text-align: center;
9
+ }
10
+
11
+ /* Styling Next and Prev buttons */
12
+
13
+ .owl-theme .owl-controls .owl-buttons div{
14
+ color: #FFF;
15
+ display: inline-block;
16
+ zoom: 1;
17
+ *display: inline;/*IE7 life-saver */
18
+ margin: 5px;
19
+ padding: 3px 10px;
20
+ font-size: 12px;
21
+ -webkit-border-radius: 30px;
22
+ -moz-border-radius: 30px;
23
+ border-radius: 30px;
24
+ background: #869791;
25
+ filter: Alpha(Opacity=50);/*IE7 fix*/
26
+ opacity: 0.5;
27
+ }
28
+ /* Clickable class fix problem with hover on touch devices */
29
+ /* Use it for non-touch hover action */
30
+ .owl-theme .owl-controls.clickable .owl-buttons div:hover{
31
+ filter: Alpha(Opacity=100);/*IE7 fix*/
32
+ opacity: 1;
33
+ text-decoration: none;
34
+ }
35
+
36
+ /* Styling Pagination*/
37
+
38
+ .owl-theme .owl-controls .owl-page{
39
+ display: inline-block;
40
+ zoom: 1;
41
+ *display: inline;/*IE7 life-saver */
42
+ }
43
+ .owl-theme .owl-controls .owl-page span{
44
+ display: block;
45
+ width: 12px;
46
+ height: 12px;
47
+ margin: 5px 7px;
48
+ filter: Alpha(Opacity=50);/*IE7 fix*/
49
+ opacity: 0.5;
50
+ -webkit-border-radius: 20px;
51
+ -moz-border-radius: 20px;
52
+ border-radius: 20px;
53
+ background: #869791;
54
+ }
55
+
56
+ .owl-theme .owl-controls .owl-page.active span,
57
+ .owl-theme .owl-controls.clickable .owl-page:hover span{
58
+ filter: Alpha(Opacity=100);/*IE7 fix*/
59
+ opacity: 1;
60
+ }
61
+
62
+ /* If PaginationNumbers is true */
63
+
64
+ .owl-theme .owl-controls .owl-page span.owl-numbers{
65
+ height: auto;
66
+ width: auto;
67
+ color: #FFF;
68
+ padding: 2px 10px;
69
+ font-size: 12px;
70
+ -webkit-border-radius: 30px;
71
+ -moz-border-radius: 30px;
72
+ border-radius: 30px;
73
+ }
74
+
75
+ /* preloading images */
76
+ .owl-item.loading{
77
+ min-height: 150px;
78
+ background: url(AjaxLoader.gif) no-repeat center center
79
+ }
css/ribbons/best.png ADDED
Binary file
css/ribbons/dis-10.png ADDED
Binary file
css/ribbons/dis-100.png ADDED
Binary file
css/ribbons/dis-20.png ADDED
Binary file
css/ribbons/dis-30.png ADDED
Binary file
css/ribbons/dis-40.png ADDED
Binary file
css/ribbons/dis-50.png ADDED
Binary file
css/ribbons/dis-60.png ADDED
Binary file
css/ribbons/dis-70.png ADDED
Binary file
css/ribbons/dis-80.png ADDED
Binary file
css/ribbons/dis-90.png ADDED
Binary file
css/ribbons/free.png ADDED
Binary file
css/ribbons/fresh.png ADDED
Binary file
css/ribbons/gift.png ADDED
Binary file
css/ribbons/hot.png ADDED
Binary file
css/ribbons/new.png ADDED
Binary file
css/ribbons/pro.png ADDED
Binary file
css/ribbons/sale.png ADDED
Binary file
css/ribbons/save.png ADDED
Binary file
css/ribbons/top.png ADDED
Binary file
css/style.css ADDED
@@ -0,0 +1,212 @@
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+ /*Admin CSS*/
6
+
7
+ #wcps_metabox ul.wcps_bg_img_list{}
8
+
9
+ #wcps_metabox ul.wcps_bg_img_list li {
10
+ display: inline-block;
11
+ margin: 5px;
12
+ }
13
+ #wcps_metabox ul.wcps_bg_img_list li.bg-selected {}
14
+
15
+ #wcps_metabox ul.wcps_bg_img_list li img{border: 2px solid #ffffff;}
16
+
17
+ #wcps_metabox ul.wcps_bg_img_list li.bg-selected img{
18
+ border: 2px solid #ff5a11;
19
+ }
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+ #wcps_metabox ul.tab-nav {
32
+ clear: both;
33
+ margin: 0;
34
+ padding: 0;
35
+ }
36
+
37
+ #wcps_metabox ul.tab-nav li {
38
+ background: #e6e6e6;
39
+ cursor: pointer;
40
+ display: inline-block;
41
+ float: left;
42
+ margin: 0;
43
+ padding: 8px 15px;
44
+ }
45
+
46
+ #wcps_metabox ul.tab-nav li.active{
47
+ background:#d8d6d6;
48
+ border-top:2px solid #11b063;
49
+ padding-top:6px;
50
+ }
51
+ #wcps_metabox ul.box {
52
+ clear: both;
53
+ margin: 0;
54
+ padding: 0;
55
+ }
56
+
57
+ #wcps_metabox ul.box li.tab-box {
58
+ border: 1px solid rgb(153, 153, 153);
59
+ display: none;
60
+ margin: 0;
61
+ padding: 20px 0 10px 10px;
62
+ width: 100%;
63
+ }
64
+
65
+
66
+
67
+
68
+ #wcps_metabox .wcps_loading_taxonomy_category {
69
+ background: url("loading.gif") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
70
+ height: 11px;
71
+ margin-bottom: 20px;
72
+ width: 30px;
73
+ }
74
+
75
+
76
+ #wcps_metabox div..wcps_taxonomy_category{}
77
+
78
+
79
+ #wcps_metabox ul.content_source_area {
80
+ margin-left: 15px;
81
+ }
82
+
83
+ #wcps_metabox ul.content_source_area li{}
84
+
85
+
86
+ #wcps_metabox ul.content_source_area .content-source-box {
87
+ display: none;
88
+ }
89
+
90
+ #wcps_metabox ul.content_source_area li div.active {
91
+ background: none repeat scroll 0 0 #e6e6e6;
92
+ border-left: 3px solid #11b063;
93
+ display: block;
94
+ margin: 10px 10px 0 20px;
95
+ padding: 10px 0 10px 5px;
96
+ }
97
+
98
+ #wcps_metabox .tab-box td {
99
+ border-left: 3px solid #fff;
100
+ }
101
+
102
+ #wcps_metabox .tab-box td:hover {
103
+ background: #e6e6e6;
104
+ border-left: 3px solid #11b063;
105
+ }
106
+
107
+
108
+ #wcps_metabox .tab-box > table {
109
+ width: 100%;
110
+ }
111
+
112
+ #wcps_metabox .wcps_ribbons {
113
+ width: 100%;
114
+ }
115
+
116
+
117
+ .form-table .wcps_ribbons {
118
+ }
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+ /*CSS front page*/
127
+
128
+ .wcps-container {
129
+ margin: 50px 0;
130
+ overflow: hidden;
131
+ padding: 40px 0;
132
+ position: relative;
133
+ }
134
+
135
+ .wcps-container div.wcps-ribbon {
136
+ box-shadow: 0 2px 4px -1px rgb(51, 51, 51);
137
+ height: 24px;
138
+ left: -27px;
139
+ position: absolute;
140
+ top: 14px;
141
+ transform: rotate(-50deg);
142
+ width: 90px;
143
+ z-index: 10;
144
+ }
145
+
146
+
147
+
148
+
149
+ .wcps-container div.wcps-ribbon.wcps-ribbon-none{
150
+ background:url("ribbons/none.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
151
+ display:none !important;
152
+ }
153
+ .wcps-container div.wcps-ribbon.wcps-ribbon-free{
154
+ background:url("ribbons/free.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
155
+ }
156
+ .wcps-container div.wcps-ribbon.wcps-ribbon-save{
157
+ background:url("ribbons/save.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
158
+ }
159
+ .wcps-container div.wcps-ribbon.wcps-ribbon-hot{
160
+ background:url("ribbons/hot.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
161
+ }
162
+ .wcps-container div.wcps-ribbon.wcps-ribbon-pro{
163
+ background:url("ribbons/pro.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
164
+ }
165
+ .wcps-container div.wcps-ribbon.wcps-ribbon-best{
166
+ background:url("ribbons/best.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
167
+ }
168
+ .wcps-container div.wcps-ribbon.wcps-ribbon-gift{
169
+ background:url("ribbons/gift.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
170
+ }
171
+ .wcps-container div.wcps-ribbon.wcps-ribbon-sale{
172
+ background:url("ribbons/sale.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
173
+ }
174
+ .wcps-container div.wcps-ribbon.wcps-ribbon-new{
175
+ background:url("ribbons/new.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
176
+ }
177
+ .wcps-container div.wcps-ribbon.wcps-ribbon-top{
178
+ background:url("ribbons/top.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
179
+ }
180
+ .wcps-container div.wcps-ribbon.wcps-ribbon-fresh{
181
+ background:url("ribbons/fresh.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
182
+ }
183
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-10{
184
+ background:url("ribbons/dis-10.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
185
+ }
186
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-20{
187
+ background:url("ribbons/dis-20.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
188
+ }
189
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-30{
190
+ background:url("ribbons/dis-30.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
191
+ }
192
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-40{
193
+ background:url("ribbons/dis-40.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
194
+ }
195
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-50{
196
+ background:url("ribbons/dis-50.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
197
+ }
198
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-60{
199
+ background:url("ribbons/dis-60.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
200
+ }
201
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-70{
202
+ background:url("ribbons/dis-70.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
203
+ }
204
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-80{
205
+ background:url("ribbons/dis-80.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
206
+ }
207
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-90{
208
+ background:url("ribbons/dis-90.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
209
+ }
210
+ .wcps-container div.wcps-ribbon.wcps-ribbon-dis-100{
211
+ background:url("ribbons/dis-100.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
212
+ }
includes/wcps-functions.php ADDED
@@ -0,0 +1,246 @@
1
+ <?php
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+ function wcps_get_all_product_ids($postid)
30
+ {
31
+
32
+ $wcps_product_ids = get_post_meta( $postid, 'wcps_product_ids', true );
33
+
34
+
35
+
36
+ $return_string = '';
37
+ $return_string .= '<ul style="margin: 0;">';
38
+
39
+
40
+
41
+ $args_product = array(
42
+ 'post_type' => 'product',
43
+ 'posts_per_page' => -1,
44
+ );
45
+
46
+ $product_query = new WP_Query( $args_product );
47
+
48
+ if($product_query->have_posts()): while($product_query->have_posts()): $product_query->the_post();
49
+
50
+
51
+ $return_string .= '<li><label ><input class="wcps_product_ids" type="checkbox" name="wcps_product_ids['.get_the_ID().']" value ="'.get_the_ID().'" ';
52
+
53
+ if ( isset( $wcps_product_ids[get_the_ID()] ) )
54
+ {
55
+ $return_string .= "checked";
56
+ }
57
+
58
+
59
+
60
+
61
+ $return_string .= '/>';
62
+
63
+ $return_string .= get_the_title().'</label ></li>';
64
+
65
+ endwhile; endif; wp_reset_query();
66
+
67
+
68
+ $return_string .= '</ul>';
69
+ echo $return_string;
70
+
71
+ }
72
+
73
+
74
+
75
+
76
+
77
+
78
+ function wcps_get_taxonomy_category($postid)
79
+ {
80
+
81
+
82
+
83
+ $wcps_taxonomy = get_post_meta( $postid, 'wcps_taxonomy', true );
84
+ if(empty($wcps_taxonomy))
85
+ {
86
+ $wcps_taxonomy= "";
87
+ }
88
+ $wcps_taxonomy_category = get_post_meta( $postid, 'wcps_taxonomy_category', true );
89
+
90
+
91
+ if(empty($wcps_taxonomy_category))
92
+ {
93
+ $wcps_taxonomy_category =array('none'); // an empty array when no category element selected
94
+
95
+
96
+ }
97
+
98
+
99
+
100
+ if(!isset($_POST['taxonomy']))
101
+ {
102
+ $taxonomy =$wcps_taxonomy;
103
+ }
104
+ else
105
+ {
106
+ $taxonomy = $_POST['taxonomy'];
107
+ }
108
+
109
+
110
+ $args=array(
111
+ 'orderby' => 'name',
112
+ 'order' => 'ASC',
113
+ 'taxonomy' => $taxonomy,
114
+ );
115
+
116
+ $categories = get_categories($args);
117
+
118
+
119
+ if(empty($categories))
120
+ {
121
+ echo "No Items Found!";
122
+ }
123
+
124
+
125
+ $return_string = '';
126
+ $return_string .= '<ul style="margin: 0;">';
127
+
128
+ foreach($categories as $category){
129
+
130
+ if(array_search($category->cat_ID, $wcps_taxonomy_category))
131
+ {
132
+ $return_string .= '<li class='.$category->cat_ID.'><label ><input class="wcps_taxonomy_category" checked type="checkbox" name="wcps_taxonomy_category['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
133
+ }
134
+
135
+ else
136
+ {
137
+ $return_string .= '<li class='.$category->cat_ID.'><label ><input class="wcps_taxonomy_category" type="checkbox" name="wcps_taxonomy_category['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
138
+ }
139
+
140
+
141
+
142
+
143
+ }
144
+
145
+ $return_string .= '</ul>';
146
+
147
+ echo $return_string;
148
+
149
+ if(isset($_POST['taxonomy']))
150
+ {
151
+ die();
152
+ }
153
+
154
+
155
+ }
156
+
157
+ add_action('wp_ajax_wcps_get_taxonomy_category', 'wcps_get_taxonomy_category');
158
+ add_action('wp_ajax_nopriv_wcps_get_taxonomy_category', 'wcps_get_taxonomy_category');
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ function wcps_dark_color($input_color)
216
+ {
217
+ if(empty($input_color))
218
+ {
219
+ return "";
220
+ }
221
+ else
222
+ {
223
+ $input = $input_color;
224
+
225
+ $col = Array(
226
+ hexdec(substr($input,1,2)),
227
+ hexdec(substr($input,3,2)),
228
+ hexdec(substr($input,5,2))
229
+ );
230
+ $darker = Array(
231
+ $col[0]/2,
232
+ $col[1]/2,
233
+ $col[2]/2
234
+ );
235
+
236
+ return "#".sprintf("%02X%02X%02X", $darker[0], $darker[1], $darker[2]);
237
+ }
238
+
239
+
240
+
241
+ }
242
+
243
+
244
+
245
+
246
+
includes/wcps-meta.php ADDED
@@ -0,0 +1,1045 @@
1
+ <?php
2
+
3
+
4
+ function wcps_posttype_register() {
5
+
6
+ $labels = array(
7
+ 'name' => _x('WCPS', 'WCPS'),
8
+ 'singular_name' => _x('WCPS', 'wcps'),
9
+ 'add_new' => _x('New WCPS', 'wcps'),
10
+ 'add_new_item' => __('New WCPS'),
11
+ 'edit_item' => __('Edit WCPS'),
12
+ 'new_item' => __('New WCPS'),
13
+ 'view_item' => __('View WCPS'),
14
+ 'search_items' => __('Search WCPS'),
15
+ 'not_found' => __('Nothing found'),
16
+ 'not_found_in_trash' => __('Nothing found in Trash'),
17
+ 'parent_item_colon' => ''
18
+ );
19
+
20
+ $args = array(
21
+ 'labels' => $labels,
22
+ 'public' => true,
23
+ 'publicly_queryable' => true,
24
+ 'show_ui' => true,
25
+ 'query_var' => true,
26
+ 'menu_icon' => null,
27
+ 'rewrite' => true,
28
+ 'capability_type' => 'post',
29
+ 'hierarchical' => false,
30
+ 'menu_position' => null,
31
+ 'supports' => array('title'),
32
+ 'menu_icon' => 'dashicons-media-spreadsheet',
33
+
34
+ );
35
+
36
+ register_post_type( 'wcps' , $args );
37
+
38
+ }
39
+
40
+ add_action('init', 'wcps_posttype_register');
41
+
42
+
43
+
44
+
45
+
46
+ /**
47
+ * Adds a box to the main column on the Post and Page edit screens.
48
+ */
49
+ function meta_boxes_wcps()
50
+ {
51
+ $screens = array( 'wcps' );
52
+ foreach ( $screens as $screen )
53
+ {
54
+ add_meta_box('wcps_metabox',__( 'Woocommerce Products Slider Options','wcps' ),'meta_boxes_wcps_input', $screen);
55
+ }
56
+ }
57
+ add_action( 'add_meta_boxes', 'meta_boxes_wcps' );
58
+
59
+
60
+ function meta_boxes_wcps_input( $post ) {
61
+
62
+ global $post;
63
+ wp_nonce_field( 'meta_boxes_wcps_input', 'meta_boxes_wcps_input_nonce' );
64
+
65
+
66
+ $wcps_bg_img = get_post_meta( $post->ID, 'wcps_bg_img', true );
67
+ $wcps_themes = get_post_meta( $post->ID, 'wcps_themes', true );
68
+ $wcps_total_items = get_post_meta( $post->ID, 'wcps_total_items', true );
69
+ $wcps_column_number = get_post_meta( $post->ID, 'wcps_column_number', true );
70
+ $wcps_auto_play = get_post_meta( $post->ID, 'wcps_auto_play', true );
71
+ $wcps_stop_on_hover = get_post_meta( $post->ID, 'wcps_stop_on_hover', true );
72
+ $wcps_slider_navigation = get_post_meta( $post->ID, 'wcps_slider_navigation', true );
73
+ $wcps_slider_navigation_speed = get_post_meta( $post->ID, 'wcps_slider_navigation_speed', true );
74
+
75
+ $wcps_slider_pagination = get_post_meta( $post->ID, 'wcps_slider_pagination', true );
76
+ $wcps_pagination_slide_speed = get_post_meta( $post->ID, 'wcps_pagination_slide_speed', true );
77
+ $wcps_slider_pagination_count = get_post_meta( $post->ID, 'wcps_slider_pagination_count', true );
78
+
79
+ $wcps_slider_pagination_bg = get_post_meta( $post->ID, 'wcps_slider_pagination_bg', true );
80
+ $wcps_slider_pagination_text_color = get_post_meta( $post->ID, 'wcps_slider_pagination_text_color', true );
81
+
82
+ $wcps_slider_touch_drag = get_post_meta( $post->ID, 'wcps_slider_touch_drag', true );
83
+ $wcps_slider_mouse_drag = get_post_meta( $post->ID, 'wcps_slider_mouse_drag', true );
84
+
85
+ $wcps_content_source = get_post_meta( $post->ID, 'wcps_content_source', true );
86
+ $wcps_content_year = get_post_meta( $post->ID, 'wcps_content_year', true );
87
+ $wcps_content_month = get_post_meta( $post->ID, 'wcps_content_month', true );
88
+ $wcps_content_month_year = get_post_meta( $post->ID, 'wcps_content_month_year', true );
89
+
90
+ $wcps_taxonomy = get_post_meta( $post->ID, 'wcps_taxonomy', true );
91
+ $wcps_taxonomy_category = get_post_meta( $post->ID, 'wcps_taxonomy_category', true );
92
+
93
+ $wcps_product_ids = get_post_meta( $post->ID, 'wcps_product_ids', true );
94
+
95
+
96
+
97
+ $wcps_cart_bg = get_post_meta( $post->ID, 'wcps_cart_bg', true );
98
+ $wcps_cart_text_color = get_post_meta( $post->ID, 'wcps_cart_text_color', true );
99
+
100
+ $wcps_items_title_color = get_post_meta( $post->ID, 'wcps_items_title_color', true );
101
+ $wcps_items_title_font_size = get_post_meta( $post->ID, 'wcps_items_title_font_size', true );
102
+
103
+ $wcps_items_price_color = get_post_meta( $post->ID, 'wcps_items_price_color', true );
104
+ $wcps_items_price_font_size = get_post_meta( $post->ID, 'wcps_items_price_font_size', true );
105
+
106
+ $wcps_items_thumb_size = get_post_meta( $post->ID, 'wcps_items_thumb_size', true );
107
+ $wcps_items_thumb_max_hieght = get_post_meta( $post->ID, 'wcps_items_thumb_max_hieght', true );
108
+
109
+ $wcps_ribbon_name = get_post_meta( $post->ID, 'wcps_ribbon_name', true );
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ $wcps_customer_type = get_option('wcps_customer_type');
122
+
123
+ if($wcps_customer_type=="free")
124
+ {
125
+ echo '<script>
126
+ jQuery(document).ready(function()
127
+ {
128
+ jQuery(".wcps_taxonomy_category, .wcps_product_ids, #wcps_items_price_color, #wcps_items_title_color, .wcps_themes_saiga, .wcps_themes_sako, .wcps_themes_ruger, .wcps_themes_ruger, #wcps_content_source_taxonomy, #wcps_content_source_product_id").attr("title","Only For Premium Version")
129
+ jQuery(".wcps_taxonomy_category, .wcps_product_ids, #wcps_items_price_color, #wcps_items_title_color, .wcps_themes_saiga, .wcps_themes_sako, .wcps_themes_ruger, .wcps_themes_ruger, #wcps_content_source_taxonomy, #wcps_content_source_product_id").attr("disabled","disabled")
130
+
131
+ })
132
+ </script>';
133
+
134
+ }
135
+ elseif($wcps_customer_type=="pro")
136
+ {
137
+ //premium customer support.
138
+ }
139
+
140
+ ?>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ <table class="form-table">
162
+
163
+
164
+
165
+
166
+
167
+ <tr valign="top">
168
+ <td >
169
+
170
+ <strong>Shortcode</strong><br />
171
+ <span style=" color:#22aa5d;font-size: 12px;">Copy this shortcode and paste on page or post where you want to display slider. <br />Use PHP code to your themes file to display slider.</span>
172
+
173
+ <br /> <br />
174
+ <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" >[wcps <?php echo ' id="'.$post->ID.'"';?> ]</textarea>
175
+ <br /><br />
176
+ PHP Code:<br />
177
+ <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" ><?php echo '<?php echo do_shortcode("[wcps id='; echo "'".$post->ID."' ]"; echo '"); ?>'; ?></textarea>
178
+
179
+ <br />
180
+
181
+ </td>
182
+ </tr>
183
+
184
+
185
+
186
+
187
+
188
+
189
+ <tr valign="top">
190
+
191
+ <td style="vertical-align:middle;">
192
+
193
+ <ul class="tab-nav">
194
+ <li nav="1" class="nav1 active">Slider Options</li>
195
+ <li nav="2" class="nav2">Slider Style</li>
196
+ <li nav="3" class="nav3">Slider Content</li>
197
+
198
+ </ul>
199
+
200
+
201
+ <ul class="box">
202
+ <li style="display: block;" class="box1 tab-box active">
203
+
204
+
205
+ <table>
206
+ <tr valign="top">
207
+ <td style="vertical-align:middle;">
208
+ <strong>Slider Total Items</strong><br /><br />
209
+
210
+ <input type="text" size="5" name="wcps_total_items" value="<?php if(!empty($wcps_total_items))echo $wcps_total_items; else echo 15; ?>" />
211
+
212
+ </td>
213
+ </tr>
214
+
215
+
216
+
217
+ <tr valign="top">
218
+ <td style="vertical-align:middle;">
219
+ <strong>Slider Column Number</strong><br /><br />
220
+
221
+ <input type="text" size="5" name="wcps_column_number" value="<?php if(!empty($wcps_column_number))echo $wcps_column_number; else echo 5; ?>" />
222
+
223
+ </td>
224
+ </tr>
225
+
226
+
227
+
228
+ <tr valign="top">
229
+ <td style="vertical-align:middle;">
230
+ <strong>Slider Auto Play</strong><br /><br />
231
+
232
+ <input type="checkbox" id="wcps_auto_play" name="wcps_auto_play" value="true" <?php if(($wcps_auto_play=="true")) echo "checked"; else echo ""; ?> />
233
+ <?php if(($wcps_auto_play=="true")) { ?>
234
+ <label for="wcps_auto_play" >Active</label>
235
+ <?php }
236
+
237
+ else
238
+ {
239
+ ?>
240
+ <label for="wcps_auto_play" >Inactive</label>
241
+ <?php
242
+ }
243
+ ?>
244
+
245
+ </td>
246
+ </tr>
247
+
248
+
249
+
250
+ <tr valign="top">
251
+ <td style="vertical-align:middle;">
252
+ <strong>Slider Stop on Hover</strong><br /><br />
253
+
254
+ <input type="checkbox" id="wcps_stop_on_hover" name="wcps_stop_on_hover" value="true" <?php if(($wcps_stop_on_hover=="true")) echo "checked"; else echo ""; ?> />
255
+ <?php if(($wcps_stop_on_hover=="true")) { ?>
256
+ <label for="wcps_stop_on_hover" >Active</label>
257
+ <?php }
258
+
259
+ else
260
+ {
261
+ ?>
262
+ <label for="wcps_stop_on_hover" >Inactive</label>
263
+ <?php
264
+ }
265
+ ?>
266
+
267
+ </td>
268
+ </tr>
269
+
270
+
271
+
272
+
273
+ <tr valign="top">
274
+ <td style="vertical-align:middle;">
275
+ <strong>Slider Navigation at Top</strong><br /><br />
276
+
277
+ <input type="checkbox" id="wcps_slider_navigation" name="wcps_slider_navigation" value="true" <?php if(($wcps_slider_navigation=="true")) echo "checked"; else echo ""; ?> />
278
+ <?php if(($wcps_slider_navigation=="true")) { ?>
279
+ <label for="wcps_slider_navigation" >Active</label>
280
+ <?php }
281
+
282
+ else
283
+ {
284
+ ?>
285
+ <label for="wcps_slider_navigation" >Inactive</label>
286
+ <?php
287
+ }
288
+ ?>
289
+
290
+ </td>
291
+ </tr>
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+ <tr valign="top">
301
+ <td style="vertical-align:middle;">
302
+ <strong>Slider Pagination at Bottom</strong><br /><br />
303
+
304
+ <input type="checkbox" id="wcps_slider_pagination" name="wcps_slider_pagination" value="true" <?php if(($wcps_slider_pagination=="true")) echo "checked"; else echo ""; ?> />
305
+ <?php if(($wcps_slider_pagination=="true")) { ?>
306
+ <label for="wcps_slider_pagination" >Active</label>
307
+ <?php }
308
+
309
+ else
310
+ {
311
+ ?>
312
+ <label for="wcps_slider_pagination" >Inactive</label>
313
+ <?php
314
+ }
315
+ ?>
316
+
317
+ </td>
318
+ </tr>
319
+
320
+
321
+ <tr valign="top">
322
+ <td style="vertical-align:middle;">
323
+ <strong>Pagination Number Counting</strong><br /><br />
324
+
325
+ <input type="checkbox" id="wcps_slider_pagination_count" name="wcps_slider_pagination_count" value="true" <?php if(($wcps_slider_pagination_count=="true")) echo "checked"; else echo ""; ?> />
326
+ <?php if(($wcps_slider_pagination_count=="true")) { ?>
327
+ <label for="wcps_slider_pagination_count" >Active</label>
328
+ <?php }
329
+
330
+ else
331
+ {
332
+ ?>
333
+ <label for="wcps_slider_pagination_count" >Inactive</label>
334
+ <?php
335
+ }
336
+ ?>
337
+
338
+ </td>
339
+ </tr>
340
+
341
+
342
+
343
+
344
+
345
+ <tr valign="top">
346
+ <td style="vertical-align:middle;">
347
+ <strong>Slide Speed</strong><br /><br />
348
+
349
+ <input type="text" id="wcps_slide_speed" name="wcps_slide_speed" value="<?php if(!empty($wcps_slide_speed)) echo $wcps_slide_speed; else echo "1000"; ?>" />
350
+
351
+ </td>
352
+ </tr>
353
+
354
+
355
+
356
+ <tr valign="top">
357
+ <td style="vertical-align:middle;">
358
+ <strong>Pagination Slide Speed</strong><br /><br />
359
+
360
+ <input type="text" id="wcps_pagination_slide_speed" name="wcps_pagination_slide_speed" value="<?php if(!empty($wcps_pagination_slide_speed)) echo $wcps_pagination_slide_speed; else echo "1000"; ?>" />
361
+
362
+ </td>
363
+ </tr>
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <tr valign="top">
374
+ <td style="vertical-align:middle;">
375
+ <strong>Slider Touch Drag Enabled</strong><br /><br />
376
+
377
+ <input type="checkbox" id="wcps_slider_touch_drag" name="wcps_slider_touch_drag" value="true" <?php if(($wcps_slider_touch_drag=="true")) echo "checked"; else echo ""; ?> />
378
+ <?php if(($wcps_slider_touch_drag=="true")) { ?>
379
+ <label for="wcps_slider_touch_drag" >Active</label>
380
+ <?php }
381
+
382
+ else
383
+ {
384
+ ?>
385
+ <label for="wcps_slider_touch_drag" >Inactive</label>
386
+ <?php
387
+ }
388
+ ?>
389
+
390
+ </td>
391
+ </tr>
392
+
393
+
394
+
395
+ <tr valign="top">
396
+ <td style="vertical-align:middle;">
397
+ <strong>Slider Mouse Drag Enabled</strong><br /><br />
398
+
399
+ <input type="checkbox" id="wcps_slider_mouse_drag" name="wcps_slider_mouse_drag" value="true" <?php if(($wcps_slider_mouse_drag=="true")) echo "checked"; else echo ""; ?> />
400
+ <?php if(($wcps_slider_mouse_drag=="true")) { ?>
401
+ <label for="wcps_slider_mouse_drag" >Active</label>
402
+ <?php }
403
+
404
+ else
405
+ {
406
+ ?>
407
+ <label for="wcps_slider_mouse_drag" >Inactive</label>
408
+ <?php
409
+ }
410
+ ?>
411
+
412
+ </td>
413
+ </tr>
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+ </table>
424
+
425
+
426
+
427
+
428
+
429
+ </li>
430
+ <li class="box2 tab-box">
431
+
432
+ <table>
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+ <tr valign="top">
444
+ <td style="vertical-align:middle;">
445
+ <strong>Themes</strong><br /><br />
446
+ <select name="wcps_themes" >
447
+ <option class="wcps_themes_flat" value="flat" <?php if($wcps_themes=="flat")echo "selected"; ?>>Flat</option>
448
+ <option class="wcps_themes_rossi" value="rossi" <?php if($wcps_themes=="rossi")echo "selected"; ?>>Rossi</option>
449
+ <option class="wcps_themes_saiga" value="saiga" <?php if($wcps_themes=="saiga")echo "selected"; ?>>Saiga</option>
450
+ <option class="wcps_themes_sako" value="sako" <?php if($wcps_themes=="sako")echo "selected"; ?>>Sako</option>
451
+ <option class="wcps_themes_ruger" value="ruger" <?php if($wcps_themes=="ruger")echo "selected"; ?>>Ruger</option>
452
+ <option class="wcps_themes_ruger" value="anti-ruger" <?php if($wcps_themes=="anti-ruger")echo "selected"; ?>>Anti Ruger</option>
453
+ </select>
454
+ </td>
455
+ </tr>
456
+
457
+
458
+
459
+ <tr valign="top">
460
+ <td style="vertical-align:middle;">
461
+ <strong>Slider Ribbon</strong><br /><br />
462
+ <?php
463
+
464
+ echo '<select name="wcps_ribbon_name" >';
465
+
466
+ if(empty($wcps_ribbon_name))
467
+ {
468
+ $wcps_ribbon_name = "";
469
+ }
470
+ echo '<option value="none" '.(($wcps_ribbon_name=="none" ) ? "selected" : "").' >None</option>';
471
+ echo '<option value="free" '.(($wcps_ribbon_name=="free" ) ? "selected" : "").' >Free</option>';
472
+ echo '<option value="save" '.(($wcps_ribbon_name=="save" ) ? "selected" : "").' >Save</option>';
473
+ echo '<option value="hot" '.(($wcps_ribbon_name=="hot" ) ? "selected" : "").' >Hot</option>';
474
+ echo '<option value="pro" '.(($wcps_ribbon_name=="pro" ) ? "selected" : "").' >Pro</option>';
475
+ echo '<option value="best" '.(($wcps_ribbon_name=="best" ) ? "selected" : "").' >Best</option>';
476
+ echo '<option value="gift" '.(($wcps_ribbon_name=="gift" ) ? "selected" : "").' >Gift</option>';
477
+ echo '<option value="sale" '.(($wcps_ribbon_name=="sale" ) ? "selected" : "").' >Sale</option>';
478
+ echo '<option value="new" '.(($wcps_ribbon_name=="new" ) ? "selected" : "").' >New</option>';
479
+ echo '<option value="top" '.(($wcps_ribbon_name=="top" ) ? "selected" : "").' >Top</option>';
480
+ echo '<option value="fresh" '.(($wcps_ribbon_name=="fresh" ) ? "selected" : "").' >Fresh</option>';
481
+
482
+ echo '<option value="dis-10" '.(($wcps_ribbon_name=="dis-10" ) ? "selected" : "").' >-10%</option>';
483
+ echo '<option value="dis-20" '.(($wcps_ribbon_name=="dis-20" ) ? "selected" : "").' >-20%</option>';
484
+ echo '<option value="dis-30" '.(($wcps_ribbon_name=="dis-30" ) ? "selected" : "").' >-30%</option>';
485
+ echo '<option value="dis-40" '.(($wcps_ribbon_name=="dis-40" ) ? "selected" : "").' >-40%</option>';
486
+
487
+ echo '<option value="dis-50" '.(($wcps_ribbon_name=="dis-50" ) ? "selected" : "").' >-50%</option>';
488
+
489
+ echo '<option value="dis-60" '.(($wcps_ribbon_name=="dis-60" ) ? "selected" : "").' >-60%</option>';
490
+
491
+ echo '<option value="dis-70" '.(($wcps_ribbon_name=="dis-70" ) ? "selected" : "").' >-70%</option>';
492
+
493
+ echo '<option value="dis-80" '.(($wcps_ribbon_name=="dis-80" ) ? "selected" : "").' >-80%</option>';
494
+
495
+ echo '<option value="dis-90" '.(($wcps_ribbon_name=="dis-90" ) ? "selected" : "").' >-90%</option>';
496
+
497
+ echo '<option value="dis-100" '.(($wcps_ribbon_name=="dis-100" ) ? "selected" : "").' >-100%</option>';
498
+
499
+
500
+ echo '</select><br />';
501
+
502
+
503
+
504
+ ?>
505
+ </td>
506
+ </tr>
507
+
508
+
509
+
510
+
511
+ <tr valign="top">
512
+ <td style="vertical-align:middle;">
513
+ <strong>Slider Thumbnail Size</strong><br /><br />
514
+ <select name="wcps_items_thumb_size" >
515
+ <option value="thumbnail" <?php if($wcps_items_thumb_size=="thumbnail")echo "selected"; ?>>Thumbnail</option>
516
+ <option value="medium" <?php if($wcps_items_thumb_size=="medium")echo "selected"; ?>>medium</option>
517
+ <option value="large" <?php if($wcps_items_thumb_size=="large")echo "selected"; ?>>large</option>
518
+ <option value="full" <?php if($wcps_items_thumb_size=="full")echo "selected"; ?>>full</option>
519
+
520
+ </select>
521
+ </td>
522
+ </tr>
523
+
524
+
525
+
526
+ <tr valign="top">
527
+ <td style="vertical-align:middle;">
528
+ <strong>Slider thumb max hieght(px)</strong><br /><br />
529
+ <input type="text" name="wcps_items_thumb_max_hieght" placeholder="14px" id="wcps_items_thumb_max_hieght" value="<?php if(!empty($wcps_items_thumb_max_hieght)) echo $wcps_items_thumb_max_hieght; else echo "200px"; ?>" />
530
+ </td>
531
+ </tr>
532
+
533
+
534
+
535
+
536
+
537
+
538
+ <script>
539
+ jQuery(document).ready(function(jQuery)
540
+ {
541
+ jQuery(".wcps_bg_img_list li").click(function()
542
+ {
543
+ jQuery('.wcps_bg_img_list li.bg-selected').removeClass('bg-selected');
544
+ jQuery(this).addClass('bg-selected');
545
+
546
+ var wcps_bg_img = jQuery(this).attr('data-url');
547
+
548
+ jQuery('#wcps_bg_img').val(wcps_bg_img);
549
+
550
+ })
551
+
552
+
553
+ })
554
+
555
+ </script>
556
+
557
+
558
+
559
+
560
+
561
+
562
+ <tr valign="top">
563
+
564
+ <td style="vertical-align:middle;">
565
+
566
+ <strong>Background Image</strong><br /><br />
567
+
568
+
569
+ <?php
570
+
571
+
572
+
573
+ $dir_path = wcps_plugin_dir."css/bg/";
574
+ $filenames=glob($dir_path."*.png*");
575
+
576
+
577
+ $wcps_bg_img = get_post_meta( $post->ID, 'wcps_bg_img', true );
578
+
579
+ if(empty($wcps_bg_img))
580
+ {
581
+ $wcps_bg_img = "";
582
+ }
583
+
584
+
585
+ $count=count($filenames);
586
+
587
+
588
+ $i=0;
589
+ echo "<ul class='wcps_bg_img_list' >";
590
+
591
+ while($i<$count)
592
+ {
593
+ $filelink= str_replace($dir_path,"",$filenames[$i]);
594
+
595
+ $filelink= wcps_plugin_url."css/bg/".$filelink;
596
+
597
+
598
+ if($wcps_bg_img==$filelink)
599
+ {
600
+ echo '<li class="bg-selected" data-url="'.$filelink.'">';
601
+ }
602
+ else
603
+ {
604
+ echo '<li data-url="'.$filelink.'">';
605
+ }
606
+
607
+
608
+ echo "<img width='70px' height='50px' src='".$filelink."' />";
609
+ echo "</li>";
610
+ $i++;
611
+ }
612
+
613
+ echo "</ul>";
614
+
615
+ echo "<input style='width:100%;' value='".$wcps_bg_img."' placeholder='Please select image or left blank' id='wcps_bg_img' name='wcps_bg_img' type='text' />";
616
+
617
+
618
+
619
+ ?>
620
+ </td>
621
+ </tr>
622
+
623
+
624
+ <tr valign="top">
625
+ <td style="vertical-align:middle;">
626
+ <strong>Add to cart Background Color</strong><br /><br />
627
+ <input type="text" name="wcps_cart_bg" id="wcps_cart_bg" value="<?php if(!empty($wcps_cart_bg)) echo $wcps_cart_bg; else echo "#0fcd95"; ?>" />
628
+ </td>
629
+ </tr>
630
+
631
+ <tr valign="top">
632
+ <td style="vertical-align:middle;">
633
+ <strong>Add to cart Text Color</strong><br /><br />
634
+ <input type="text" name="wcps_cart_text_color" id="wcps_cart_text_color" value="<?php if(!empty($wcps_cart_text_color)) echo $wcps_cart_text_color; else echo "#fff"; ?>" />
635
+ </td>
636
+ </tr>
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+ <tr valign="top">
646
+ <td style="vertical-align:middle;">
647
+ <strong>Items Title Color</strong><br /><br />
648
+ <input type="text" name="wcps_items_title_color" id="wcps_items_title_color" value="<?php if(!empty($wcps_items_title_color)) echo $wcps_items_title_color; else echo "#0fcd95"; ?>" />
649
+ </td>
650
+ </tr>
651
+
652
+
653
+ <tr valign="top">
654
+ <td style="vertical-align:middle;">
655
+ <strong>Items Title Font Size</strong><br /><br />
656
+ <input type="text" name="wcps_items_title_font_size" placeholder="14px" id="wcps_items_title_font_size" value="<?php if(!empty($wcps_items_title_font_size)) echo $wcps_items_title_font_size; else echo "14px"; ?>" />
657
+ </td>
658
+ </tr>
659
+
660
+
661
+
662
+
663
+
664
+
665
+ <tr valign="top">
666
+ <td style="vertical-align:middle;">
667
+ <strong>Items Price Color</strong><br /><br />
668
+ <input type="text" name="wcps_items_price_color" id="wcps_items_price_color" value="<?php if(!empty($wcps_items_price_color)) echo $wcps_items_price_color; else echo "#0fcd95"; ?>" />
669
+ </td>
670
+ </tr>
671
+
672
+
673
+ <tr valign="top">
674
+ <td style="vertical-align:middle;">
675
+ <strong>Items price Font Size</strong><br /><br />
676
+ <input type="text" name="wcps_items_price_font_size" placeholder="14px" id="wcps_items_price_font_size" value="<?php if(!empty($wcps_items_price_font_size)) echo $wcps_items_price_font_size; else echo "14px"; ?>" />
677
+ </td>
678
+ </tr>
679
+
680
+
681
+
682
+
683
+ <tr valign="top">
684
+ <td style="vertical-align:middle;">
685
+ <strong>Pagination Background Color</strong><br /><br />
686
+ <input type="text" name="wcps_slider_pagination_bg" id="wcps_slider_pagination_bg" value="<?php if(!empty($wcps_slider_pagination_bg)) echo $wcps_slider_pagination_bg; else echo "#1eb286"; ?>" />
687
+ </td>
688
+ </tr>
689
+
690
+
691
+ <tr valign="top">
692
+ <td style="vertical-align:middle;">
693
+ <strong>Pagination Text Color</strong><br /><br />
694
+ <input type="text" name="wcps_slider_pagination_text_color" id="wcps_slider_pagination_text_color" value="<?php if(!empty($wcps_slider_pagination_text_color)) echo $wcps_slider_pagination_text_color; else echo "#fff"; ?>" />
695
+ </td>
696
+ </tr>
697
+
698
+
699
+
700
+
701
+
702
+
703
+ </table>
704
+
705
+
706
+ </li>
707
+
708
+
709
+ <li class="box3 tab-box">
710
+
711
+
712
+ <script>
713
+
714
+ </script>
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+ <ul class="content_source_area" >
725
+
726
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_latest" type="radio" value="latest" <?php if($wcps_content_source=="latest") echo "checked";?> /> <label for="wcps_content_source_latest">Display from Latest Published</label>
727
+ <div class="wcps_content_source_latest content-source-box">Slider items will query from latest published product.</div>
728
+ </li>
729
+
730
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_older" type="radio" value="older" <?php if($wcps_content_source=="older") echo "checked";?> /> <label for="wcps_content_source_older">Display from Older Published</label>
731
+ <div class="wcps_content_source_older content-source-box">Slider items will query from older published product.</div>
732
+ </li>
733
+
734
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_featured" type="radio" value="featured" <?php if($wcps_content_source=="featured") echo "checked";?> /> <label for="wcps_content_source_featured">Display from Featured Items</label>
735
+
736
+ <div class="wcps_content_source_featured content-source-box">Slider items will query from featured marked product.</div>
737
+ </li>
738
+
739
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_year" type="radio" value="year" <?php if($wcps_content_source=="year") echo "checked";?> /> <label for="wcps_content_source_year">Display from Only Year</label>
740
+
741
+ <div class="wcps_content_source_year content-source-box">Slider items will query from a year.
742
+ <input type="text" size="7" class="wcps_content_year" name="wcps_content_year" value="<?php if(!empty($wcps_content_year)) echo $wcps_content_year;?>" placeholder="2014" />
743
+ </div>
744
+ </li>
745
+
746
+
747
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_month" type="radio" value="month" <?php if($wcps_content_source=="month") echo "checked";?> /> <label for="wcps_content_source_month">Display from Month</label>
748
+
749
+ <div class="wcps_content_source_month content-source-box">Slider items will query from Month of a year. <br />
750
+ <input type="text" size="7" class="wcps_content_month_year" name="wcps_content_month_year" value="<?php if(!empty($wcps_content_month_year)) echo $wcps_content_month_year;?>" placeholder="2014" />
751
+ <input type="text" size="7" class="wcps_content_month" name="wcps_content_month" value="<?php if(!empty($wcps_content_month)) echo $wcps_content_month;?>" placeholder="06" />
752
+ </div>
753
+ </li>
754
+
755
+
756
+
757
+
758
+
759
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_taxonomy" type="radio" value="taxonomy" <?php if($wcps_content_source=="taxonomy") echo "checked";?> /> <label for="wcps_content_source_taxonomy">Display from Product Taxonomy & Categories</label>
760
+
761
+ <div class="wcps_content_source_taxonomy content-source-box" >
762
+
763
+
764
+ <table style="width:100%;" >
765
+
766
+ <tr style="overflow:scroll; vertical-align:top;">
767
+ <td style="overflow:scroll; vertical-align:top; padding:0; width:45%;">
768
+
769
+
770
+
771
+ <?php
772
+ $wcps_taxonomies = get_object_taxonomies( 'product' );
773
+ foreach ($wcps_taxonomies as $taxonomy ) {
774
+ ?>
775
+
776
+
777
+ <label ><input type="radio" class="wcps_taxonomy" name="wcps_taxonomy" value="<?php echo $taxonomy; ?>" <?php if($wcps_taxonomy==$taxonomy) echo "checked";?> /><?php echo $taxonomy; ?></label><br />
778
+
779
+ <?php
780
+ }
781
+ ?>
782
+
783
+ </td>
784
+ <td style=" height:auto;vertical-align:top; padding:0; width:45%;">
785
+ <span class="wcps_loading_taxonomy_category" ></span>
786
+ <div class="wcps_taxonomy_category">
787
+
788
+ <?php
789
+ if(!empty($wcps_taxonomy))
790
+ {
791
+ wcps_get_taxonomy_category($post->ID);
792
+ }
793
+ else
794
+ {
795
+
796
+ }
797
+
798
+ ?>
799
+
800
+
801
+ </div>
802
+
803
+ </td>
804
+ </tr>
805
+
806
+
807
+ </table>
808
+
809
+
810
+
811
+
812
+
813
+
814
+ </div>
815
+ </li>
816
+ <li><input class="wcps_content_source" name="wcps_content_source" id="wcps_content_source_product_id" type="radio" value="product_id" <?php if($wcps_content_source=="product_id") echo "checked";?> /> <label for="wcps_content_source_product_id">Display by Product id</label>
817
+
818
+ <div class="wcps_content_source_product_id content-source-box" >
819
+
820
+ <table style="width:100%;" >
821
+
822
+
823
+ <tr style="overflow:scroll; vertical-align:top;">
824
+ <td colspan="2" style="overflow:scroll; vertical-align:top; padding:0; width:45%;">
825
+
826
+ <div class="" style="max-height:300px; overflow-y:scroll; overflow-x:hidden;max-width:100%;" >
827
+ <?php
828
+
829
+ wcps_get_all_product_ids($post->ID);
830
+
831
+
832
+ ?>
833
+
834
+ </div>
835
+
836
+
837
+
838
+ </td>
839
+ </tr>
840
+
841
+
842
+
843
+
844
+ </table>
845
+
846
+
847
+ </div>
848
+ </li>
849
+ </ul>
850
+
851
+
852
+
853
+ </li>
854
+
855
+
856
+
857
+
858
+
859
+
860
+
861
+ </ul>
862
+
863
+
864
+
865
+ </td>
866
+ </tr>
867
+
868
+ </table>
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+ <?php
886
+
887
+
888
+
889
+ }
890
+
891
+ /**
892
+ * When the post is saved, saves our custom data.
893
+ *
894
+ * @param int $post_id The ID of the post being saved.
895
+ */
896
+ function meta_boxes_wcps_save( $post_id ) {
897
+
898
+ /*
899
+ * We need to verify this came from the our screen and with proper authorization,
900
+ * because save_post can be triggered at other times.
901
+ */
902
+
903
+ // Check if our nonce is set.
904
+ if ( ! isset( $_POST['meta_boxes_wcps_input_nonce'] ) )
905
+ return $post_id;
906
+
907
+ $nonce = $_POST['meta_boxes_wcps_input_nonce'];
908
+
909
+ // Verify that the nonce is valid.
910
+ if ( ! wp_verify_nonce( $nonce, 'meta_boxes_wcps_input' ) )
911
+ return $post_id;
912
+
913
+ // If this is an autosave, our form has not been submitted, so we don't want to do anything.
914
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
915
+ return $post_id;
916
+
917
+
918
+
919
+ /* OK, its safe for us to save the data now. */
920
+
921
+ // Sanitize user input.
922
+ $wcps_bg_img = sanitize_text_field( $_POST['wcps_bg_img'] );
923
+ $wcps_themes = sanitize_text_field( $_POST['wcps_themes'] );
924
+ $wcps_total_items = sanitize_text_field( $_POST['wcps_total_items'] );
925
+ $wcps_column_number = sanitize_text_field( $_POST['wcps_column_number'] );
926
+ $wcps_auto_play = sanitize_text_field( $_POST['wcps_auto_play'] );
927
+ $wcps_stop_on_hover = sanitize_text_field( $_POST['wcps_stop_on_hover'] );
928
+ $wcps_slider_navigation = sanitize_text_field( $_POST['wcps_slider_navigation'] );
929
+ $wcps_slide_speed = sanitize_text_field( $_POST['wcps_slide_speed'] );
930
+
931
+ $wcps_slider_pagination = sanitize_text_field( $_POST['wcps_slider_pagination'] );
932
+ $wcps_pagination_slide_speed = sanitize_text_field( $_POST['wcps_pagination_slide_speed'] );
933
+ $wcps_slider_pagination_count = sanitize_text_field( $_POST['wcps_slider_pagination_count'] );
934
+
935
+ $wcps_slider_pagination_bg = sanitize_text_field( $_POST['wcps_slider_pagination_bg'] );
936
+ $wcps_slider_pagination_text_color = sanitize_text_field( $_POST['wcps_slider_pagination_text_color'] );
937
+
938
+ $wcps_slider_touch_drag = sanitize_text_field( $_POST['wcps_slider_touch_drag'] );
939
+ $wcps_slider_mouse_drag = sanitize_text_field( $_POST['wcps_slider_mouse_drag'] );
940
+
941
+ $wcps_content_source = sanitize_text_field( $_POST['wcps_content_source'] );
942
+ $wcps_content_year = sanitize_text_field( $_POST['wcps_content_year'] );
943
+ $wcps_content_month = sanitize_text_field( $_POST['wcps_content_month'] );
944
+ $wcps_content_month_year = sanitize_text_field( $_POST['wcps_content_month_year'] );
945
+
946
+ $wcps_taxonomy = sanitize_text_field( $_POST['wcps_taxonomy'] );
947
+ $wcps_taxonomy_category = stripslashes_deep( $_POST['wcps_taxonomy_category'] );
948
+
949
+ $wcps_product_ids = stripslashes_deep( $_POST['wcps_product_ids'] );
950
+
951
+
952
+ $wcps_cart_bg = stripslashes_deep( $_POST['wcps_cart_bg'] );
953
+ $wcps_cart_text_color = stripslashes_deep( $_POST['wcps_cart_text_color'] );
954
+
955
+
956
+ $wcps_items_title_color = stripslashes_deep( $_POST['wcps_items_title_color'] );
957
+ $wcps_items_title_font_size = stripslashes_deep( $_POST['wcps_items_title_font_size'] );
958
+
959
+ $wcps_items_price_color = stripslashes_deep( $_POST['wcps_items_price_color'] );
960
+ $wcps_items_price_font_size = stripslashes_deep( $_POST['wcps_items_price_font_size'] );
961
+
962
+ $wcps_items_thumb_size = stripslashes_deep( $_POST['wcps_items_thumb_size'] );
963
+ $wcps_items_thumb_max_hieght = stripslashes_deep( $_POST['wcps_items_thumb_max_hieght'] );
964
+
965
+ $wcps_ribbon_name = stripslashes_deep( $_POST['wcps_ribbon_name'] );
966
+
967
+
968
+
969
+
970
+ // Update the meta field in the database.
971
+ update_post_meta( $post_id, 'wcps_bg_img', $wcps_bg_img );
972
+ update_post_meta( $post_id, 'wcps_themes', $wcps_themes );
973
+ update_post_meta( $post_id, 'wcps_total_items', $wcps_total_items );
974
+ update_post_meta( $post_id, 'wcps_column_number', $wcps_column_number );
975
+ update_post_meta( $post_id, 'wcps_auto_play', $wcps_auto_play );
976
+ update_post_meta( $post_id, 'wcps_stop_on_hover', $wcps_stop_on_hover );
977
+ update_post_meta( $post_id, 'wcps_slider_navigation', $wcps_slider_navigation );
978
+ update_post_meta( $post_id, 'wcps_slide_speed', $wcps_slide_speed );
979
+
980
+ update_post_meta( $post_id, 'wcps_slider_pagination', $wcps_slider_pagination );
981
+ update_post_meta( $post_id, 'wcps_pagination_slide_speed', $wcps_pagination_slide_speed );
982
+ update_post_meta( $post_id, 'wcps_slider_pagination_count', $wcps_slider_pagination_count );
983
+
984
+ update_post_meta( $post_id, 'wcps_slider_pagination_bg', $wcps_slider_pagination_bg );
985
+ update_post_meta( $post_id, 'wcps_slider_pagination_text_color', $wcps_slider_pagination_text_color );
986
+
987
+ update_post_meta( $post_id, 'wcps_slider_touch_drag', $wcps_slider_touch_drag );
988
+ update_post_meta( $post_id, 'wcps_slider_mouse_drag', $wcps_slider_mouse_drag );
989
+
990
+ update_post_meta( $post_id, 'wcps_content_source', $wcps_content_source );
991
+ update_post_meta( $post_id, 'wcps_content_year', $wcps_content_year );
992
+ update_post_meta( $post_id, 'wcps_content_month', $wcps_content_month );
993
+ update_post_meta( $post_id, 'wcps_content_month_year', $wcps_content_month_year );
994
+
995
+ update_post_meta( $post_id, 'wcps_taxonomy', $wcps_taxonomy );
996
+ update_post_meta( $post_id, 'wcps_taxonomy_category', $wcps_taxonomy_category );
997
+
998
+ update_post_meta( $post_id, 'wcps_product_ids', $wcps_product_ids );
999
+
1000
+
1001
+ update_post_meta( $post_id, 'wcps_cart_bg', $wcps_cart_bg );
1002
+ update_post_meta( $post_id, 'wcps_cart_text_color', $wcps_cart_text_color );
1003
+
1004
+
1005
+ update_post_meta( $post_id, 'wcps_items_title_color', $wcps_items_title_color );
1006
+ update_post_meta( $post_id, 'wcps_items_title_font_size', $wcps_items_title_font_size );
1007
+
1008
+ update_post_meta( $post_id, 'wcps_items_price_color', $wcps_items_price_color );
1009
+ update_post_meta( $post_id, 'wcps_items_price_font_size', $wcps_items_price_font_size );
1010
+
1011
+ update_post_meta( $post_id, 'wcps_items_thumb_size', $wcps_items_thumb_size );
1012
+ update_post_meta( $post_id, 'wcps_items_thumb_max_hieght', $wcps_items_thumb_max_hieght );
1013
+
1014
+ update_post_meta( $post_id, 'wcps_ribbon_name', $wcps_ribbon_name );
1015
+
1016
+
1017
+ }
1018
+ add_action( 'save_post', 'meta_boxes_wcps_save' );
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+ ?>
index.php ADDED
@@ -0,0 +1,2 @@
1
+ <?php
2
+ // silence is golden.
js/color-picker.js ADDED
@@ -0,0 +1,10 @@
1
+ jQuery(document).ready(function(jQuery)
2
+ {
3
+
4
+
5
+ jQuery('#wcps_cart_bg, #wcps_items_title_color, #wcps_items_price_color, #wcps_cart_text_color, #wcps_slider_pagination_bg, #wcps_slider_pagination_text_color').wpColorPicker();
6
+
7
+
8
+
9
+
10
+ });
js/owl.carousel.js ADDED
@@ -0,0 +1,1512 @@