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 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery OwlCarousel v1.3.3
3
+ *
4
+ * Copyright (c) 2013 Bartosz Wojciechowski
5
+ * http://www.owlgraphic.com/owlcarousel/
6
+ *
7
+ * Licensed under MIT
8
+ *
9
+ */
10
+
11
+ /*JS Lint helpers: */
12
+ /*global dragMove: false, dragEnd: false, $, jQuery, alert, window, document */
13
+ /*jslint nomen: true, continue:true */
14
+
15
+ if (typeof Object.create !== "function") {
16
+ Object.create = function (obj) {
17
+ function F() {}
18
+ F.prototype = obj;
19
+ return new F();
20
+ };
21
+ }
22
+ (function ($, window, document) {
23
+
24
+ var Carousel = {
25
+ init : function (options, el) {
26
+ var base = this;
27
+
28
+ base.$elem = $(el);
29
+ base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options);
30
+
31
+ base.userOptions = options;
32
+ base.loadContent();
33
+ },
34
+
35
+ loadContent : function () {
36
+ var base = this, url;
37
+
38
+ function getData(data) {
39
+ var i, content = "";
40
+ if (typeof base.options.jsonSuccess === "function") {
41
+ base.options.jsonSuccess.apply(this, [data]);
42
+ } else {
43
+ for (i in data.owl) {
44
+ if (data.owl.hasOwnProperty(i)) {
45
+ content += data.owl[i].item;
46
+ }
47
+ }
48
+ base.$elem.html(content);
49
+ }
50
+ base.logIn();
51
+ }
52
+
53
+ if (typeof base.options.beforeInit === "function") {
54
+ base.options.beforeInit.apply(this, [base.$elem]);
55
+ }
56
+
57
+ if (typeof base.options.jsonPath === "string") {
58
+ url = base.options.jsonPath;
59
+ $.getJSON(url, getData);
60
+ } else {
61
+ base.logIn();
62
+ }
63
+ },
64
+
65
+ logIn : function () {
66
+ var base = this;
67
+
68
+ base.$elem.data("owl-originalStyles", base.$elem.attr("style"));
69
+ base.$elem.data("owl-originalClasses", base.$elem.attr("class"));
70
+
71
+ base.$elem.css({opacity: 0});
72
+ base.orignalItems = base.options.items;
73
+ base.checkBrowser();
74
+ base.wrapperWidth = 0;
75
+ base.checkVisible = null;
76
+ base.setVars();
77
+ },
78
+
79
+ setVars : function () {
80
+ var base = this;
81
+ if (base.$elem.children().length === 0) {return false; }
82
+ base.baseClass();
83
+ base.eventTypes();
84
+ base.$userItems = base.$elem.children();
85
+ base.itemsAmount = base.$userItems.length;
86
+ base.wrapItems();
87
+ base.$owlItems = base.$elem.find(".owl-item");
88
+ base.$owlWrapper = base.$elem.find(".owl-wrapper");
89
+ base.playDirection = "next";
90
+ base.prevItem = 0;
91
+ base.prevArr = [0];
92
+ base.currentItem = 0;
93
+ base.customEvents();
94
+ base.onStartup();
95
+ },
96
+
97
+ onStartup : function () {
98
+ var base = this;
99
+ base.updateItems();
100
+ base.calculateAll();
101
+ base.buildControls();
102
+ base.updateControls();
103
+ base.response();
104
+ base.moveEvents();
105
+ base.stopOnHover();
106
+ base.owlStatus();
107
+
108
+ if (base.options.transitionStyle !== false) {
109
+ base.transitionTypes(base.options.transitionStyle);
110
+ }
111
+ if (base.options.autoPlay === true) {
112
+ base.options.autoPlay = 5000;
113
+ }
114
+ base.play();
115
+
116
+ base.$elem.find(".owl-wrapper").css("display", "block");
117
+
118
+ if (!base.$elem.is(":visible")) {
119
+ base.watchVisibility();
120
+ } else {
121
+ base.$elem.css("opacity", 1);
122
+ }
123
+ base.onstartup = false;
124
+ base.eachMoveUpdate();
125
+ if (typeof base.options.afterInit === "function") {
126
+ base.options.afterInit.apply(this, [base.$elem]);
127
+ }
128
+ },
129
+
130
+ eachMoveUpdate : function () {
131
+ var base = this;
132
+
133
+ if (base.options.lazyLoad === true) {
134
+ base.lazyLoad();
135
+ }
136
+ if (base.options.autoHeight === true) {
137
+ base.autoHeight();
138
+ }
139
+ base.onVisibleItems();
140
+
141
+ if (typeof base.options.afterAction === "function") {
142
+ base.options.afterAction.apply(this, [base.$elem]);
143
+ }
144
+ },
145
+
146
+ updateVars : function () {
147
+ var base = this;
148
+ if (typeof base.options.beforeUpdate === "function") {
149
+ base.options.beforeUpdate.apply(this, [base.$elem]);
150
+ }
151
+ base.watchVisibility();
152
+ base.updateItems();
153
+ base.calculateAll();
154
+ base.updatePosition();
155
+ base.updateControls();
156
+ base.eachMoveUpdate();
157
+ if (typeof base.options.afterUpdate === "function") {
158
+ base.options.afterUpdate.apply(this, [base.$elem]);
159
+ }
160
+ },
161
+
162
+ reload : function () {
163
+ var base = this;
164
+ window.setTimeout(function () {
165
+ base.updateVars();
166
+ }, 0);
167
+ },
168
+
169
+ watchVisibility : function () {
170
+ var base = this;
171
+
172
+ if (base.$elem.is(":visible") === false) {
173
+ base.$elem.css({opacity: 0});
174
+ window.clearInterval(base.autoPlayInterval);
175
+ window.clearInterval(base.checkVisible);
176
+ } else {
177
+ return false;
178
+ }
179
+ base.checkVisible = window.setInterval(function () {
180
+ if (base.$elem.is(":visible")) {
181
+ base.reload();
182
+ base.$elem.animate({opacity: 1}, 200);
183
+ window.clearInterval(base.checkVisible);
184
+ }
185
+ }, 500);
186
+ },
187
+
188
+ wrapItems : function () {
189
+ var base = this;
190
+ base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>");
191
+ base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">");
192
+ base.wrapperOuter = base.$elem.find(".owl-wrapper-outer");
193
+ base.$elem.css("display", "block");
194
+ },
195
+
196
+ baseClass : function () {
197
+ var base = this,
198
+ hasBaseClass = base.$elem.hasClass(base.options.baseClass),
199
+ hasThemeClass = base.$elem.hasClass(base.options.theme);
200
+
201
+ if (!hasBaseClass) {
202
+ base.$elem.addClass(base.options.baseClass);
203
+ }
204
+
205
+ if (!hasThemeClass) {
206
+ base.$elem.addClass(base.options.theme);
207
+ }
208
+ },
209
+
210
+ updateItems : function () {
211
+ var base = this, width, i;
212
+
213
+ if (base.options.responsive === false) {
214
+ return false;
215
+ }
216
+ if (base.options.singleItem === true) {
217
+ base.options.items = base.orignalItems = 1;
218
+ base.options.itemsCustom = false;
219
+ base.options.itemsDesktop = false;
220
+ base.options.itemsDesktopSmall = false;
221
+ base.options.itemsTablet = false;
222
+ base.options.itemsTabletSmall = false;
223
+ base.options.itemsMobile = false;
224
+ return false;
225
+ }
226
+
227
+ width = $(base.options.responsiveBaseWidth).width();
228
+
229
+ if (width > (base.options.itemsDesktop[0] || base.orignalItems)) {
230
+ base.options.items = base.orignalItems;
231
+ }
232
+ if (base.options.itemsCustom !== false) {
233
+ //Reorder array by screen size
234
+ base.options.itemsCustom.sort(function (a, b) {return a[0] - b[0]; });
235
+
236
+ for (i = 0; i < base.options.itemsCustom.length; i += 1) {
237
+ if (base.options.itemsCustom[i][0] <= width) {
238
+ base.options.items = base.options.itemsCustom[i][1];
239
+ }
240
+ }
241
+
242
+ } else {
243
+
244
+ if (width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false) {
245
+ base.options.items = base.options.itemsDesktop[1];
246
+ }
247
+
248
+ if (width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false) {
249
+ base.options.items = base.options.itemsDesktopSmall[1];
250
+ }
251
+
252
+ if (width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false) {
253
+ base.options.items = base.options.itemsTablet[1];
254
+ }
255
+
256
+ if (width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false) {
257
+ base.options.items = base.options.itemsTabletSmall[1];
258
+ }
259
+
260
+ if (width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false) {
261
+ base.options.items = base.options.itemsMobile[1];
262
+ }
263
+ }
264
+
265
+ //if number of items is less than declared
266
+ if (base.options.items > base.itemsAmount && base.options.itemsScaleUp === true) {
267
+ base.options.items = base.itemsAmount;
268
+ }
269
+ },
270
+
271
+ response : function () {
272
+ var base = this,
273
+ smallDelay,
274
+ lastWindowWidth;
275
+
276
+ if (base.options.responsive !== true) {
277
+ return false;
278
+ }
279
+ lastWindowWidth = $(window).width();
280
+
281
+ base.resizer = function () {
282
+ if ($(window).width() !== lastWindowWidth) {
283
+ if (base.options.autoPlay !== false) {
284
+ window.clearInterval(base.autoPlayInterval);
285
+ }
286
+ window.clearTimeout(smallDelay);
287
+ smallDelay = window.setTimeout(function () {
288
+ lastWindowWidth = $(window).width();
289
+ base.updateVars();
290
+ }, base.options.responsiveRefreshRate);
291
+ }
292
+ };
293
+ $(window).resize(base.resizer);
294
+ },
295
+
296
+ updatePosition : function () {
297
+ var base = this;
298
+ base.jumpTo(base.currentItem);
299
+ if (base.options.autoPlay !== false) {
300
+ base.checkAp();
301
+ }
302
+ },
303
+
304
+ appendItemsSizes : function () {
305
+ var base = this,
306
+ roundPages = 0,
307
+ lastItem = base.itemsAmount - base.options.items;
308
+
309
+ base.$owlItems.each(function (index) {
310
+ var $this = $(this);
311
+ $this
312
+ .css({"width": base.itemWidth})
313
+ .data("owl-item", Number(index));
314
+
315
+ if (index % base.options.items === 0 || index === lastItem) {
316
+ if (!(index > lastItem)) {
317
+ roundPages += 1;
318
+ }
319
+ }
320
+ $this.data("owl-roundPages", roundPages);
321
+ });
322
+ },
323
+
324
+ appendWrapperSizes : function () {
325
+ var base = this,
326
+ width = base.$owlItems.length * base.itemWidth;
327
+
328
+ base.$owlWrapper.css({
329
+ "width": width * 2,
330
+ "left": 0
331
+ });
332
+ base.appendItemsSizes();
333
+ },
334
+
335
+ calculateAll : function () {
336
+ var base = this;
337
+ base.calculateWidth();
338
+ base.appendWrapperSizes();
339
+ base.loops();
340
+ base.max();
341
+ },
342
+
343
+ calculateWidth : function () {
344
+ var base = this;
345
+ base.itemWidth = Math.round(base.$elem.width() / base.options.items);
346
+ },
347
+
348
+ max : function () {
349
+ var base = this,
350
+ maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1;
351
+ if (base.options.items > base.itemsAmount) {
352
+ base.maximumItem = 0;
353
+ maximum = 0;
354
+ base.maximumPixels = 0;
355
+ } else {
356
+ base.maximumItem = base.itemsAmount - base.options.items;
357
+ base.maximumPixels = maximum;
358
+ }
359
+ return maximum;
360
+ },
361
+
362
+ min : function () {
363
+ return 0;
364
+ },
365
+
366
+ loops : function () {
367
+ var base = this,
368
+ prev = 0,
369
+ elWidth = 0,
370
+ i,
371
+ item,
372
+ roundPageNum;
373
+
374
+ base.positionsInArray = [0];
375
+ base.pagesInArray = [];
376
+
377
+ for (i = 0; i < base.itemsAmount; i += 1) {
378
+ elWidth += base.itemWidth;
379
+ base.positionsInArray.push(-elWidth);
380
+
381
+ if (base.options.scrollPerPage === true) {
382
+ item = $(base.$owlItems[i]);
383
+ roundPageNum = item.data("owl-roundPages");
384
+ if (roundPageNum !== prev) {
385
+ base.pagesInArray[prev] = base.positionsInArray[i];
386
+ prev = roundPageNum;
387
+ }
388
+ }
389
+ }
390
+ },
391
+
392
+ buildControls : function () {
393
+ var base = this;
394
+ if (base.options.navigation === true || base.options.pagination === true) {
395
+ base.owlControls = $("<div class=\"owl-controls\"/>").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem);
396
+ }
397
+ if (base.options.pagination === true) {
398
+ base.buildPagination();
399
+ }
400
+ if (base.options.navigation === true) {
401
+ base.buildButtons();
402
+ }
403
+ },
404
+
405
+ buildButtons : function () {
406
+ var base = this,
407
+ buttonsWrapper = $("<div class=\"owl-buttons\"/>");
408
+ base.owlControls.append(buttonsWrapper);
409
+
410
+ base.buttonPrev = $("<div/>", {
411
+ "class" : "owl-prev",
412
+ "html" : base.options.navigationText[0] || ""
413
+ });
414
+
415
+ base.buttonNext = $("<div/>", {
416
+ "class" : "owl-next",
417
+ "html" : base.options.navigationText[1] || ""
418
+ });
419
+
420
+ buttonsWrapper
421
+ .append(base.buttonPrev)
422
+ .append(base.buttonNext);
423
+
424
+ buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function (event) {
425
+ event.preventDefault();
426
+ });
427
+
428
+ buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function (event) {
429
+ event.preventDefault();
430
+ if ($(this).hasClass("owl-next")) {
431
+ base.next();
432
+ } else {
433
+ base.prev();
434
+ }
435
+ });
436
+ },
437
+
438
+ buildPagination : function () {
439
+ var base = this;
440
+
441
+ base.paginationWrapper = $("<div class=\"owl-pagination\"/>");
442
+ base.owlControls.append(base.paginationWrapper);
443
+
444
+ base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function (event) {
445
+ event.preventDefault();
446
+ if (Number($(this).data("owl-page")) !== base.currentItem) {
447
+ base.goTo(Number($(this).data("owl-page")), true);
448
+ }
449
+ });
450
+ },
451
+
452
+ updatePagination : function () {
453
+ var base = this,
454
+ counter,
455
+ lastPage,
456
+ lastItem,
457
+ i,
458
+ paginationButton,
459
+ paginationButtonInner;
460
+
461
+ if (base.options.pagination === false) {
462
+ return false;
463
+ }
464
+
465
+ base.paginationWrapper.html("");
466
+
467
+ counter = 0;
468
+ lastPage = base.itemsAmount - base.itemsAmount % base.options.items;
469
+
470
+ for (i = 0; i < base.itemsAmount; i += 1) {
471
+ if (i % base.options.items === 0) {
472
+ counter += 1;
473
+ if (lastPage === i) {
474
+ lastItem = base.itemsAmount - base.options.items;
475
+ }
476
+ paginationButton = $("<div/>", {
477
+ "class" : "owl-page"
478
+ });
479
+ paginationButtonInner = $("<span></span>", {
480
+ "text": base.options.paginationNumbers === true ? counter : "",
481
+ "class": base.options.paginationNumbers === true ? "owl-numbers" : ""
482
+ });
483
+ paginationButton.append(paginationButtonInner);
484
+
485
+ paginationButton.data("owl-page", lastPage === i ? lastItem : i);
486
+ paginationButton.data("owl-roundPages", counter);
487
+
488
+ base.paginationWrapper.append(paginationButton);
489
+ }
490
+ }
491
+ base.checkPagination();
492
+ },
493
+ checkPagination : function () {
494
+ var base = this;
495
+ if (base.options.pagination === false) {
496
+ return false;
497
+ }
498
+ base.paginationWrapper.find(".owl-page").each(function () {
499
+ if ($(this).data("owl-roundPages") === $(base.$owlItems[base.currentItem]).data("owl-roundPages")) {
500
+ base.paginationWrapper
501
+ .find(".owl-page")
502
+ .removeClass("active");
503
+ $(this).addClass("active");
504
+ }
505
+ });
506
+ },
507
+
508
+ checkNavigation : function () {
509
+ var base = this;
510
+
511
+ if (base.options.navigation === false) {
512
+ return false;
513
+ }
514
+ if (base.options.rewindNav === false) {
515
+ if (base.currentItem === 0 && base.maximumItem === 0) {
516
+ base.buttonPrev.addClass("disabled");
517
+ base.buttonNext.addClass("disabled");
518
+ } else if (base.currentItem === 0 && base.maximumItem !== 0) {
519
+ base.buttonPrev.addClass("disabled");
520
+ base.buttonNext.removeClass("disabled");
521
+ } else if (base.currentItem === base.maximumItem) {
522
+ base.buttonPrev.removeClass("disabled");
523
+ base.buttonNext.addClass("disabled");
524
+ } else if (base.currentItem !== 0 && base.currentItem !== base.maximumItem) {
525
+ base.buttonPrev.removeClass("disabled");
526
+ base.buttonNext.removeClass("disabled");
527
+ }
528
+ }
529
+ },
530
+
531
+ updateControls : function () {
532
+ var base = this;
533
+ base.updatePagination();
534
+ base.checkNavigation();
535
+ if (base.owlControls) {
536
+ if (base.options.items >= base.itemsAmount) {
537
+ base.owlControls.hide();
538
+ } else {
539
+ base.owlControls.show();
540
+ }
541
+ }
542
+ },
543
+
544
+ destroyControls : function () {
545
+ var base = this;
546
+ if (base.owlControls) {
547
+ base.owlControls.remove();
548
+ }
549
+ },
550
+
551
+ next : function (speed) {
552
+ var base = this;
553
+
554
+ if (base.isTransition) {
555
+ return false;
556
+ }
557
+
558
+ base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1;
559
+ if (base.currentItem > base.maximumItem + (base.options.scrollPerPage === true ? (base.options.items - 1) : 0)) {
560
+ if (base.options.rewindNav === true) {
561
+ base.currentItem = 0;
562
+ speed = "rewind";
563
+ } else {
564
+ base.currentItem = base.maximumItem;
565
+ return false;
566
+ }
567
+ }
568
+ base.goTo(base.currentItem, speed);
569
+ },
570
+
571
+ prev : function (speed) {
572
+ var base = this;
573
+
574
+ if (base.isTransition) {
575
+ return false;
576
+ }
577
+
578
+ if (base.options.scrollPerPage === true && base.currentItem > 0 && base.currentItem < base.options.items) {
579
+ base.currentItem = 0;
580
+ } else {
581
+ base.currentItem -= base.options.scrollPerPage === true ? base.options.items : 1;
582
+ }
583
+ if (base.currentItem < 0) {
584
+ if (base.options.rewindNav === true) {
585
+ base.currentItem = base.maximumItem;
586
+ speed = "rewind";
587
+ } else {
588
+ base.currentItem = 0;
589
+ return false;
590
+ }
591
+ }
592
+ base.goTo(base.currentItem, speed);
593
+ },
594
+
595
+ goTo : function (position, speed, drag) {
596
+ var base = this,
597
+ goToPixel;
598
+
599
+ if (base.isTransition) {
600
+ return false;
601
+ }
602
+ if (typeof base.options.beforeMove === "function") {
603
+ base.options.beforeMove.apply(this, [base.$elem]);
604
+ }
605
+ if (position >= base.maximumItem) {
606
+ position = base.maximumItem;
607
+ } else if (position <= 0) {
608
+ position = 0;
609
+ }
610
+
611
+ base.currentItem = base.owl.currentItem = position;
612
+ if (base.options.transitionStyle !== false && drag !== "drag" && base.options.items === 1 && base.browser.support3d === true) {
613
+ base.swapSpeed(0);
614
+ if (base.browser.support3d === true) {
615
+ base.transition3d(base.positionsInArray[position]);
616
+ } else {
617
+ base.css2slide(base.positionsInArray[position], 1);
618
+ }
619
+ base.afterGo();
620
+ base.singleItemTransition();
621
+ return false;
622
+ }
623
+ goToPixel = base.positionsInArray[position];
624
+
625
+ if (base.browser.support3d === true) {
626
+ base.isCss3Finish = false;
627
+
628
+ if (speed === true) {
629
+ base.swapSpeed("paginationSpeed");
630
+ window.setTimeout(function () {
631
+ base.isCss3Finish = true;
632
+ }, base.options.paginationSpeed);
633
+
634
+ } else if (speed === "rewind") {
635
+ base.swapSpeed(base.options.rewindSpeed);
636
+ window.setTimeout(function () {
637
+ base.isCss3Finish = true;
638
+ }, base.options.rewindSpeed);
639
+
640
+ } else {
641
+ base.swapSpeed("slideSpeed");
642
+ window.setTimeout(function () {
643
+ base.isCss3Finish = true;
644
+ }, base.options.slideSpeed);
645
+ }
646
+ base.transition3d(goToPixel);
647
+ } else {
648
+ if (speed === true) {
649
+ base.css2slide(goToPixel, base.options.paginationSpeed);
650
+ } else if (speed === "rewind") {
651
+ base.css2slide(goToPixel, base.options.rewindSpeed);
652
+ } else {
653
+ base.css2slide(goToPixel, base.options.slideSpeed);
654
+ }
655
+ }
656
+ base.afterGo();
657
+ },
658
+
659
+ jumpTo : function (position) {
660
+ var base = this;
661
+ if (typeof base.options.beforeMove === "function") {
662
+ base.options.beforeMove.apply(this, [base.$elem]);
663
+ }
664
+ if (position >= base.maximumItem || position === -1) {
665
+ position = base.maximumItem;
666
+ } else if (position <= 0) {
667
+ position = 0;
668
+ }
669
+ base.swapSpeed(0);
670
+ if (base.browser.support3d === true) {
671
+ base.transition3d(base.positionsInArray[position]);
672
+ } else {
673
+ base.css2slide(base.positionsInArray[position], 1);
674
+ }
675
+ base.currentItem = base.owl.currentItem = position;
676
+ base.afterGo();
677
+ },
678
+
679
+ afterGo : function () {
680
+ var base = this;
681
+
682
+ base.prevArr.push(base.currentItem);
683
+ base.prevItem = base.owl.prevItem = base.prevArr[base.prevArr.length - 2];
684
+ base.prevArr.shift(0);
685
+
686
+ if (base.prevItem !== base.currentItem) {
687
+ base.checkPagination();
688
+ base.checkNavigation();
689
+ base.eachMoveUpdate();
690
+
691
+ if (base.options.autoPlay !== false) {
692
+ base.checkAp();
693
+ }
694
+ }
695
+ if (typeof base.options.afterMove === "function" && base.prevItem !== base.currentItem) {
696
+ base.options.afterMove.apply(this, [base.$elem]);
697
+ }
698
+ },
699
+
700
+ stop : function () {
701
+ var base = this;
702
+ base.apStatus = "stop";
703
+ window.clearInterval(base.autoPlayInterval);
704
+ },
705
+
706
+ checkAp : function () {
707
+ var base = this;
708
+ if (base.apStatus !== "stop") {
709
+ base.play();
710
+ }
711
+ },
712
+
713
+ play : function () {
714
+ var base = this;
715
+ base.apStatus = "play";
716
+ if (base.options.autoPlay === false) {
717
+ return false;
718
+ }
719
+ window.clearInterval(base.autoPlayInterval);
720
+ base.autoPlayInterval = window.setInterval(function () {
721
+ base.next(true);
722
+ }, base.options.autoPlay);
723
+ },
724
+
725
+ swapSpeed : function (action) {
726
+ var base = this;
727
+ if (action === "slideSpeed") {
728
+ base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed));
729
+ } else if (action === "paginationSpeed") {
730
+ base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed));
731
+ } else if (typeof action !== "string") {
732
+ base.$owlWrapper.css(base.addCssSpeed(action));
733
+ }
734
+ },
735
+
736
+ addCssSpeed : function (speed) {
737
+ return {
738
+ "-webkit-transition": "all " + speed + "ms ease",
739
+ "-moz-transition": "all " + speed + "ms ease",
740
+ "-o-transition": "all " + speed + "ms ease",
741
+ "transition": "all " + speed + "ms ease"
742
+ };
743
+ },
744
+
745
+ removeTransition : function () {
746
+ return {
747
+ "-webkit-transition": "",
748
+ "-moz-transition": "",
749
+ "-o-transition": "",
750
+ "transition": ""
751
+ };
752
+ },
753
+
754
+ doTranslate : function (pixels) {
755
+ return {
756
+ "-webkit-transform": "translate3d(" + pixels + "px, 0px, 0px)",
757
+ "-moz-transform": "translate3d(" + pixels + "px, 0px, 0px)",
758
+ "-o-transform": "translate3d(" + pixels + "px, 0px, 0px)",
759
+ "-ms-transform": "translate3d(" + pixels + "px, 0px, 0px)",
760
+ "transform": "translate3d(" + pixels + "px, 0px,0px)"
761
+ };
762
+ },
763
+
764
+ transition3d : function (value) {
765
+ var base = this;
766
+ base.$owlWrapper.css(base.doTranslate(value));
767
+ },
768
+
769
+ css2move : function (value) {
770
+ var base = this;
771
+ base.$owlWrapper.css({"left" : value});
772
+ },
773
+
774
+ css2slide : function (value, speed) {
775
+ var base = this;
776
+
777
+ base.isCssFinish = false;
778
+ base.$owlWrapper.stop(true, true).animate({
779
+ "left" : value
780
+ }, {
781
+ duration : speed || base.options.slideSpeed,
782
+ complete : function () {
783
+ base.isCssFinish = true;
784
+ }
785
+ });
786
+ },
787
+
788
+ checkBrowser : function () {
789
+ var base = this,
790
+ translate3D = "translate3d(0px, 0px, 0px)",
791
+ tempElem = document.createElement("div"),
792
+ regex,
793
+ asSupport,
794
+ support3d,
795
+ isTouch;
796
+
797
+ tempElem.style.cssText = " -moz-transform:" + translate3D +
798
+ "; -ms-transform:" + translate3D +
799
+ "; -o-transform:" + translate3D +
800
+ "; -webkit-transform:" + translate3D +
801
+ "; transform:" + translate3D;
802
+ regex = /translate3d\(0px, 0px, 0px\)/g;
803
+ asSupport = tempElem.style.cssText.match(regex);
804
+ support3d = (asSupport !== null && asSupport.length === 1);
805
+
806
+ isTouch = "ontouchstart" in window || window.navigator.msMaxTouchPoints;
807
+
808
+ base.browser = {
809
+ "support3d" : support3d,
810
+ "isTouch" : isTouch
811
+ };
812
+ },
813
+
814
+ moveEvents : function () {
815
+ var base = this;
816
+ if (base.options.mouseDrag !== false || base.options.touchDrag !== false) {
817
+ base.gestures();
818
+ base.disabledEvents();
819
+ }
820
+ },
821
+
822
+ eventTypes : function () {
823
+ var base = this,
824
+ types = ["s", "e", "x"];
825
+
826
+ base.ev_types = {};
827
+
828
+ if (base.options.mouseDrag === true && base.options.touchDrag === true) {
829
+ types = [
830
+ "touchstart.owl mousedown.owl",
831
+ "touchmove.owl mousemove.owl",
832
+ "touchend.owl touchcancel.owl mouseup.owl"
833
+ ];
834
+ } else if (base.options.mouseDrag === false && base.options.touchDrag === true) {
835
+ types = [
836
+ "touchstart.owl",
837
+ "touchmove.owl",
838
+ "touchend.owl touchcancel.owl"
839
+ ];
840
+ } else if (base.options.mouseDrag === true && base.options.touchDrag === false) {
841
+ types = [
842
+ "mousedown.owl",
843
+ "mousemove.owl",
844
+ "mouseup.owl"
845
+ ];
846
+ }
847
+
848
+ base.ev_types.start = types[0];
849
+ base.ev_types.move = types[1];
850
+ base.ev_types.end = types[2];
851
+ },
852
+
853
+ disabledEvents : function () {
854
+ var base = this;
855
+ base.$elem.on("dragstart.owl", function (event) { event.preventDefault(); });
856
+ base.$elem.on("mousedown.disableTextSelect", function (e) {
857
+ return $(e.target).is('input, textarea, select, option');
858
+ });
859
+ },
860
+
861
+ gestures : function () {
862
+ /*jslint unparam: true*/
863
+ var base = this,
864
+ locals = {
865
+ offsetX : 0,
866
+ offsetY : 0,
867
+ baseElWidth : 0,
868
+ relativePos : 0,
869
+ position: null,
870
+ minSwipe : null,
871
+ maxSwipe: null,
872
+ sliding : null,
873
+ dargging: null,
874
+ targetElement : null
875
+ };
876
+
877
+ base.isCssFinish = true;
878
+
879
+ function getTouches(event) {
880
+ if (event.touches !== undefined) {
881
+ return {
882
+ x : event.touches[0].pageX,
883
+ y : event.touches[0].pageY
884
+ };
885
+ }
886
+
887
+ if (event.touches === undefined) {
888
+ if (event.pageX !== undefined) {
889
+ return {
890
+ x : event.pageX,
891
+ y : event.pageY
892
+ };
893
+ }
894
+ if (event.pageX === undefined) {
895
+ return {
896
+ x : event.clientX,
897
+ y : event.clientY
898
+ };
899
+ }
900
+ }
901
+ }
902
+
903
+ function swapEvents(type) {
904
+ if (type === "on") {
905
+ $(document).on(base.ev_types.move, dragMove);
906
+ $(document).on(base.ev_types.end, dragEnd);
907
+ } else if (type === "off") {
908
+ $(document).off(base.ev_types.move);
909
+ $(document).off(base.ev_types.end);
910
+ }
911
+ }
912
+
913
+ function dragStart(event) {
914
+ var ev = event.originalEvent || event || window.event,
915
+ position;
916
+
917
+ if (ev.which === 3) {
918
+ return false;
919
+ }
920
+ if (base.itemsAmount <= base.options.items) {
921
+ return;
922
+ }
923
+ if (base.isCssFinish === false && !base.options.dragBeforeAnimFinish) {
924
+ return false;
925
+ }
926
+ if (base.isCss3Finish === false && !base.options.dragBeforeAnimFinish) {
927
+ return false;
928
+ }
929
+
930
+ if (base.options.autoPlay !== false) {
931
+ window.clearInterval(base.autoPlayInterval);
932
+ }
933
+
934
+ if (base.browser.isTouch !== true && !base.$owlWrapper.hasClass("grabbing")) {
935
+ base.$owlWrapper.addClass("grabbing");
936
+ }
937
+
938
+ base.newPosX = 0;
939
+ base.newRelativeX = 0;
940
+
941
+ $(this).css(base.removeTransition());
942
+
943
+ position = $(this).position();
944
+ locals.relativePos = position.left;
945
+
946
+ locals.offsetX = getTouches(ev).x - position.left;
947
+ locals.offsetY = getTouches(ev).y - position.top;
948
+
949
+ swapEvents("on");
950
+
951
+ locals.sliding = false;
952
+ locals.targetElement = ev.target || ev.srcElement;
953
+ }
954
+
955
+ function dragMove(event) {
956
+ var ev = event.originalEvent || event || window.event,
957
+ minSwipe,
958
+ maxSwipe;
959
+
960
+ base.newPosX = getTouches(ev).x - locals.offsetX;
961
+ base.newPosY = getTouches(ev).y - locals.offsetY;
962
+ base.newRelativeX = base.newPosX - locals.relativePos;
963
+
964
+ if (typeof base.options.startDragging === "function" && locals.dragging !== true && base.newRelativeX !== 0) {
965
+ locals.dragging = true;
966
+ base.options.startDragging.apply(base, [base.$elem]);
967
+ }
968
+
969
+ if ((base.newRelativeX > 8 || base.newRelativeX < -8) && (base.browser.isTouch === true)) {
970
+ if (ev.preventDefault !== undefined) {
971
+ ev.preventDefault();
972
+ } else {
973
+ ev.returnValue = false;
974
+ }
975
+ locals.sliding = true;
976
+ }
977
+
978
+ if ((base.newPosY > 10 || base.newPosY < -10) && locals.sliding === false) {
979
+ $(document).off("touchmove.owl");
980
+ }
981
+
982
+ minSwipe = function () {
983
+ return base.newRelativeX / 5;
984
+ };
985
+
986
+ maxSwipe = function () {
987
+ return base.maximumPixels + base.newRelativeX / 5;
988
+ };
989
+
990
+ base.newPosX = Math.max(Math.min(base.newPosX, minSwipe()), maxSwipe());
991
+ if (base.browser.support3d === true) {
992
+ base.transition3d(base.newPosX);
993
+ } else {
994
+ base.css2move(base.newPosX);
995
+ }
996
+ }
997
+
998
+ function dragEnd(event) {
999
+ var ev = event.originalEvent || event || window.event,
1000
+ newPosition,
1001
+ handlers,
1002
+ owlStopEvent;
1003
+
1004
+ ev.target = ev.target || ev.srcElement;
1005
+
1006
+ locals.dragging = false;
1007
+
1008
+ if (base.browser.isTouch !== true) {
1009
+ base.$owlWrapper.removeClass("grabbing");
1010
+ }
1011
+
1012
+ if (base.newRelativeX < 0) {
1013
+ base.dragDirection = base.owl.dragDirection = "left";
1014
+ } else {
1015
+ base.dragDirection = base.owl.dragDirection = "right";
1016
+ }
1017
+
1018
+ if (base.newRelativeX !== 0) {
1019
+ newPosition = base.getNewPosition();
1020
+ base.goTo(newPosition, false, "drag");
1021
+ if (locals.targetElement === ev.target && base.browser.isTouch !== true) {
1022
+ $(ev.target).on("click.disable", function (ev) {
1023
+ ev.stopImmediatePropagation();
1024
+ ev.stopPropagation();
1025
+ ev.preventDefault();
1026
+ $(ev.target).off("click.disable");
1027
+ });
1028
+ handlers = $._data(ev.target, "events").click;
1029
+ owlStopEvent = handlers.pop();
1030
+ handlers.splice(0, 0, owlStopEvent);
1031
+ }
1032
+ }
1033
+ swapEvents("off");
1034
+ }
1035
+ base.$elem.on(base.ev_types.start, ".owl-wrapper", dragStart);
1036
+ },
1037
+
1038
+ getNewPosition : function () {
1039
+ var base = this,
1040
+ newPosition = base.closestItem();
1041
+
1042
+ if (newPosition > base.maximumItem) {
1043
+ base.currentItem = base.maximumItem;
1044
+ newPosition = base.maximumItem;
1045
+ } else if (base.newPosX >= 0) {
1046
+ newPosition = 0;
1047
+ base.currentItem = 0;
1048
+ }
1049
+ return newPosition;
1050
+ },
1051
+ closestItem : function () {
1052
+ var base = this,
1053
+ array = base.options.scrollPerPage === true ? base.pagesInArray : base.positionsInArray,
1054
+ goal = base.newPosX,
1055
+ closest = null;
1056
+
1057
+ $.each(array, function (i, v) {
1058
+ if (goal - (base.itemWidth / 20) > array[i + 1] && goal - (base.itemWidth / 20) < v && base.moveDirection() === "left") {
1059
+ closest = v;
1060
+ if (base.options.scrollPerPage === true) {
1061
+ base.currentItem = $.inArray(closest, base.positionsInArray);
1062
+ } else {
1063
+ base.currentItem = i;
1064
+ }
1065
+ } else if (goal + (base.itemWidth / 20) < v && goal + (base.itemWidth / 20) > (array[i + 1] || array[i] - base.itemWidth) && base.moveDirection() === "right") {
1066
+ if (base.options.scrollPerPage === true) {
1067
+ closest = array[i + 1] || array[array.length - 1];
1068
+ base.currentItem = $.inArray(closest, base.positionsInArray);
1069
+ } else {
1070
+ closest = array[i + 1];
1071
+ base.currentItem = i + 1;
1072
+ }
1073
+ }
1074
+ });
1075
+ return base.currentItem;
1076
+ },
1077
+
1078
+ moveDirection : function () {
1079
+ var base = this,
1080
+ direction;
1081
+ if (base.newRelativeX < 0) {
1082
+ direction = "right";
1083
+ base.playDirection = "next";
1084
+ } else {
1085
+ direction = "left";
1086
+ base.playDirection = "prev";
1087
+ }
1088
+ return direction;
1089
+ },
1090
+
1091
+ customEvents : function () {
1092
+ /*jslint unparam: true*/
1093
+ var base = this;
1094
+ base.$elem.on("owl.next", function () {
1095
+ base.next();
1096
+ });
1097
+ base.$elem.on("owl.prev", function () {
1098
+ base.prev();
1099
+ });
1100
+ base.$elem.on("owl.play", function (event, speed) {
1101
+ base.options.autoPlay = speed;
1102
+ base.play();
1103
+ base.hoverStatus = "play";
1104
+ });
1105
+ base.$elem.on("owl.stop", function () {
1106
+ base.stop();
1107
+ base.hoverStatus = "stop";
1108
+ });
1109
+ base.$elem.on("owl.goTo", function (event, item) {
1110
+ base.goTo(item);
1111
+ });
1112
+ base.$elem.on("owl.jumpTo", function (event, item) {
1113
+ base.jumpTo(item);
1114
+ });
1115
+ },
1116
+
1117
+ stopOnHover : function () {
1118
+ var base = this;
1119
+ if (base.options.stopOnHover === true && base.browser.isTouch !== true && base.options.autoPlay !== false) {
1120
+ base.$elem.on("mouseover", function () {
1121
+ base.stop();
1122
+ });
1123
+ base.$elem.on("mouseout", function () {
1124
+ if (base.hoverStatus !== "stop") {
1125
+ base.play();
1126
+ }
1127
+ });
1128
+ }
1129
+ },
1130
+
1131
+ lazyLoad : function () {
1132
+ var base = this,
1133
+ i,
1134
+ $item,
1135
+ itemNumber,
1136
+ $lazyImg,
1137
+ follow;
1138
+
1139
+ if (base.options.lazyLoad === false) {
1140
+ return false;
1141
+ }
1142
+ for (i = 0; i < base.itemsAmount; i += 1) {
1143
+ $item = $(base.$owlItems[i]);
1144
+
1145
+ if ($item.data("owl-loaded") === "loaded") {
1146
+ continue;
1147
+ }
1148
+
1149
+ itemNumber = $item.data("owl-item");
1150
+ $lazyImg = $item.find(".lazyOwl");
1151
+
1152
+ if (typeof $lazyImg.data("src") !== "string") {
1153
+ $item.data("owl-loaded", "loaded");
1154
+ continue;
1155
+ }
1156
+ if ($item.data("owl-loaded") === undefined) {
1157
+ $lazyImg.hide();
1158
+ $item.addClass("loading").data("owl-loaded", "checked");
1159
+ }
1160
+ if (base.options.lazyFollow === true) {
1161
+ follow = itemNumber >= base.currentItem;
1162
+ } else {
1163
+ follow = true;
1164
+ }
1165
+ if (follow && itemNumber < base.currentItem + base.options.items && $lazyImg.length) {
1166
+ base.lazyPreload($item, $lazyImg);
1167
+ }
1168
+ }
1169
+ },
1170
+
1171
+ lazyPreload : function ($item, $lazyImg) {
1172
+ var base = this,
1173
+ iterations = 0,
1174
+ isBackgroundImg;
1175
+
1176
+ if ($lazyImg.prop("tagName") === "DIV") {
1177
+ $lazyImg.css("background-image", "url(" + $lazyImg.data("src") + ")");
1178
+ isBackgroundImg = true;
1179
+ } else {
1180
+ $lazyImg[0].src = $lazyImg.data("src");
1181
+ }
1182
+
1183
+ function showImage() {
1184
+ $item.data("owl-loaded", "loaded").removeClass("loading");
1185
+ $lazyImg.removeAttr("data-src");
1186
+ if (base.options.lazyEffect === "fade") {
1187
+ $lazyImg.fadeIn(400);
1188
+ } else {
1189
+ $lazyImg.show();
1190
+ }
1191
+ if (typeof base.options.afterLazyLoad === "function") {
1192
+ base.options.afterLazyLoad.apply(this, [base.$elem]);
1193
+ }
1194
+ }
1195
+
1196
+ function checkLazyImage() {
1197
+ iterations += 1;
1198
+ if (base.completeImg($lazyImg.get(0)) || isBackgroundImg === true) {
1199
+ showImage();
1200
+ } else if (iterations <= 100) {//if image loads in less than 10 seconds
1201
+ window.setTimeout(checkLazyImage, 100);
1202
+ } else {
1203
+ showImage();
1204
+ }
1205
+ }
1206
+
1207
+ checkLazyImage();
1208
+ },
1209
+
1210
+ autoHeight : function () {
1211
+ var base = this,
1212
+ $currentimg = $(base.$owlItems[base.currentItem]).find("img"),
1213
+ iterations;
1214
+
1215
+ function addHeight() {
1216
+ var $currentItem = $(base.$owlItems[base.currentItem]).height();
1217
+ base.wrapperOuter.css("height", $currentItem + "px");
1218
+ if (!base.wrapperOuter.hasClass("autoHeight")) {
1219
+ window.setTimeout(function () {
1220
+ base.wrapperOuter.addClass("autoHeight");
1221
+ }, 0);
1222
+ }
1223
+ }
1224
+
1225
+ function checkImage() {
1226
+ iterations += 1;
1227
+ if (base.completeImg($currentimg.get(0))) {
1228
+ addHeight();
1229
+ } else if (iterations <= 100) { //if image loads in less than 10 seconds
1230
+ window.setTimeout(checkImage, 100);
1231
+ } else {
1232
+ base.wrapperOuter.css("height", ""); //Else remove height attribute
1233
+ }
1234
+ }
1235
+
1236
+ if ($currentimg.get(0) !== undefined) {
1237
+ iterations = 0;
1238
+ checkImage();
1239
+ } else {
1240
+ addHeight();
1241
+ }
1242
+ },
1243
+
1244
+ completeImg : function (img) {
1245
+ var naturalWidthType;
1246
+
1247
+ if (!img.complete) {
1248
+ return false;
1249
+ }
1250
+ naturalWidthType = typeof img.naturalWidth;
1251
+ if (naturalWidthType !== "undefined" && img.naturalWidth === 0) {
1252
+ return false;
1253
+ }
1254
+ return true;
1255
+ },
1256
+
1257
+ onVisibleItems : function () {
1258
+ var base = this,
1259
+ i;
1260
+
1261
+ if (base.options.addClassActive === true) {
1262
+ base.$owlItems.removeClass("active");
1263
+ }
1264
+ base.visibleItems = [];
1265
+ for (i = base.currentItem; i < base.currentItem + base.options.items; i += 1) {
1266
+ base.visibleItems.push(i);
1267
+
1268
+ if (base.options.addClassActive === true) {
1269
+ $(base.$owlItems[i]).addClass("active");
1270
+ }
1271
+ }
1272
+ base.owl.visibleItems = base.visibleItems;
1273
+ },
1274
+
1275
+ transitionTypes : function (className) {
1276
+ var base = this;
1277
+ //Currently available: "fade", "backSlide", "goDown", "fadeUp"
1278
+ base.outClass = "owl-" + className + "-out";
1279
+ base.inClass = "owl-" + className + "-in";
1280
+ },
1281
+
1282
+ singleItemTransition : function () {
1283
+ var base = this,
1284
+ outClass = base.outClass,
1285
+ inClass = base.inClass,
1286
+ $currentItem = base.$owlItems.eq(base.currentItem),
1287
+ $prevItem = base.$owlItems.eq(base.prevItem),
1288
+ prevPos = Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem],
1289
+ origin = Math.abs(base.positionsInArray[base.currentItem]) + base.itemWidth / 2,
1290
+ animEnd = 'webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend';
1291
+
1292
+ base.isTransition = true;
1293
+
1294
+ base.$owlWrapper
1295
+ .addClass('owl-origin')
1296
+ .css({
1297
+ "-webkit-transform-origin" : origin + "px",
1298
+ "-moz-perspective-origin" : origin + "px",
1299
+ "perspective-origin" : origin + "px"
1300
+ });
1301
+ function transStyles(prevPos) {
1302
+ return {
1303
+ "position" : "relative",
1304
+ "left" : prevPos + "px"
1305
+ };
1306
+ }
1307
+
1308
+ $prevItem
1309
+ .css(transStyles(prevPos, 10))
1310
+ .addClass(outClass)
1311
+ .on(animEnd, function () {
1312
+ base.endPrev = true;
1313
+ $prevItem.off(animEnd);
1314
+ base.clearTransStyle($prevItem, outClass);
1315
+ });
1316
+
1317
+ $currentItem
1318
+ .addClass(inClass)
1319
+ .on(animEnd, function () {
1320
+ base.endCurrent = true;
1321
+ $currentItem.off(animEnd);
1322
+ base.clearTransStyle($currentItem, inClass);
1323
+ });
1324
+ },
1325
+
1326
+ clearTransStyle : function (item, classToRemove) {
1327
+ var base = this;
1328
+ item.css({
1329
+ "position" : "",
1330
+ "left" : ""
1331
+ }).removeClass(classToRemove);
1332
+
1333
+ if (base.endPrev && base.endCurrent) {
1334
+ base.$owlWrapper.removeClass('owl-origin');
1335
+ base.endPrev = false;
1336
+ base.endCurrent = false;
1337
+ base.isTransition = false;
1338
+ }
1339
+ },
1340
+
1341
+ owlStatus : function () {
1342
+ var base = this;
1343
+ base.owl = {
1344
+ "userOptions" : base.userOptions,
1345
+ "baseElement" : base.$elem,
1346
+ "userItems" : base.$userItems,
1347
+ "owlItems" : base.$owlItems,
1348
+ "currentItem" : base.currentItem,
1349
+ "prevItem" : base.prevItem,
1350
+ "visibleItems" : base.visibleItems,
1351
+ "isTouch" : base.browser.isTouch,
1352
+ "browser" : base.browser,
1353
+ "dragDirection" : base.dragDirection
1354
+ };
1355
+ },
1356
+
1357
+ clearEvents : function () {
1358
+ var base = this;
1359
+ base.$elem.off(".owl owl mousedown.disableTextSelect");
1360
+ $(document).off(".owl owl");
1361
+ $(window).off("resize", base.resizer);
1362
+ },
1363
+
1364
+ unWrap : function () {
1365
+ var base = this;
1366
+ if (base.$elem.children().length !== 0) {
1367
+ base.$owlWrapper.unwrap();
1368
+ base.$userItems.unwrap().unwrap();
1369
+ if (base.owlControls) {
1370
+ base.owlControls.remove();
1371
+ }
1372
+ }
1373
+ base.clearEvents();
1374
+ base.$elem
1375
+ .attr("style", base.$elem.data("owl-originalStyles") || "")
1376
+ .attr("class", base.$elem.data("owl-originalClasses"));
1377
+ },
1378
+
1379
+ destroy : function () {
1380
+ var base = this;
1381
+ base.stop();
1382
+ window.clearInterval(base.checkVisible);
1383
+ base.unWrap();
1384
+ base.$elem.removeData();
1385
+ },
1386
+
1387
+ reinit : function (newOptions) {
1388
+ var base = this,
1389
+ options = $.extend({}, base.userOptions, newOptions);
1390
+ base.unWrap();
1391
+ base.init(options, base.$elem);
1392
+ },
1393
+
1394
+ addItem : function (htmlString, targetPosition) {
1395
+ var base = this,
1396
+ position;
1397
+
1398
+ if (!htmlString) {return false; }
1399
+
1400
+ if (base.$elem.children().length === 0) {
1401
+ base.$elem.append(htmlString);
1402
+ base.setVars();
1403
+ return false;
1404
+ }
1405
+ base.unWrap();
1406
+ if (targetPosition === undefined || targetPosition === -1) {
1407
+ position = -1;
1408
+ } else {
1409
+ position = targetPosition;
1410
+ }
1411
+ if (position >= base.$userItems.length || position === -1) {
1412
+ base.$userItems.eq(-1).after(htmlString);
1413
+ } else {
1414
+ base.$userItems.eq(position).before(htmlString);
1415
+ }
1416
+
1417
+ base.setVars();
1418
+ },
1419
+
1420
+ removeItem : function (targetPosition) {
1421
+ var base = this,
1422
+ position;
1423
+
1424
+ if (base.$elem.children().length === 0) {
1425
+ return false;
1426
+ }
1427
+ if (targetPosition === undefined || targetPosition === -1) {
1428
+ position = -1;
1429
+ } else {
1430
+ position = targetPosition;
1431
+ }
1432
+
1433
+ base.unWrap();
1434
+ base.$userItems.eq(position).remove();
1435
+ base.setVars();
1436
+ }
1437
+
1438
+ };
1439
+
1440
+ $.fn.owlCarousel = function (options) {
1441
+ return this.each(function () {
1442
+ if ($(this).data("owl-init") === true) {
1443
+ return false;
1444
+ }
1445
+ $(this).data("owl-init", true);
1446
+ var carousel = Object.create(Carousel);
1447
+ carousel.init(options, this);
1448
+ $.data(this, "owlCarousel", carousel);
1449
+ });
1450
+ };
1451
+
1452
+ $.fn.owlCarousel.options = {
1453
+
1454
+ items : 5,
1455
+ itemsCustom : false,
1456
+ itemsDesktop : [1199, 4],
1457
+ itemsDesktopSmall : [979, 3],
1458
+ itemsTablet : [768, 2],
1459
+ itemsTabletSmall : false,
1460
+ itemsMobile : [479, 1],
1461
+ singleItem : false,
1462
+ itemsScaleUp : false,
1463
+
1464
+ slideSpeed : 200,
1465
+ paginationSpeed : 800,
1466
+ rewindSpeed : 1000,
1467
+
1468
+ autoPlay : false,
1469
+ stopOnHover : false,
1470
+
1471
+ navigation : false,
1472
+ navigationText : ["prev", "next"],
1473
+ rewindNav : true,
1474
+ scrollPerPage : false,
1475
+
1476
+ pagination : true,
1477
+ paginationNumbers : false,
1478
+
1479
+ responsive : true,
1480
+ responsiveRefreshRate : 200,
1481
+ responsiveBaseWidth : window,
1482
+
1483
+ baseClass : "owl-carousel",
1484
+ theme : "owl-theme",
1485
+
1486
+ lazyLoad : false,
1487
+ lazyFollow : true,
1488
+ lazyEffect : "fade",
1489
+
1490
+ autoHeight : false,
1491
+
1492
+ jsonPath : false,
1493
+ jsonSuccess : false,
1494
+
1495
+ dragBeforeAnimFinish : true,
1496
+ mouseDrag : true,
1497
+ touchDrag : true,
1498
+
1499
+ addClassActive : false,
1500
+ transitionStyle : false,
1501
+
1502
+ beforeUpdate : false,
1503
+ afterUpdate : false,
1504
+ beforeInit : false,
1505
+ afterInit : false,
1506
+ beforeMove : false,
1507
+ afterMove : false,
1508
+ afterAction : false,
1509
+ startDragging : false,
1510
+ afterLazyLoad: false
1511
+ };
1512
+ }(jQuery, window, document));
js/scripts.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ jQuery(document).ready(function($)
3
+ {
4
+
5
+ $(".add_to_cart_button").wrap("<div class='cart-area' ></div>");
6
+
7
+
8
+
9
+
10
+ $(document).on('click', '.tab-nav li', function()
11
+ {
12
+ $(".active").removeClass("active");
13
+ $(this).addClass("active");
14
+
15
+ var nav = $(this).attr("nav");
16
+
17
+ $(".box li.tab-box").css("display","none");
18
+ $(".box"+nav).css("display","block");
19
+
20
+ })
21
+
22
+
23
+
24
+
25
+ $(document).on('click', '.wcps_content_source', function()
26
+ {
27
+ var source = $(this).val();
28
+ var source_id = $(this).attr("id");
29
+
30
+ $(".content-source-box.active").removeClass("active");
31
+ $(".content-source-box."+source_id).addClass("active");
32
+
33
+ })
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+ jQuery(".wcps_taxonomy").click(function()
57
+ {
58
+
59
+
60
+
61
+ var taxonomy = jQuery(this).val();
62
+
63
+ jQuery(".wcps_loading_taxonomy_category").css('display','block');
64
+
65
+ jQuery.ajax(
66
+ {
67
+ type: 'POST',
68
+ url: wcps_ajax.wcps_ajaxurl,
69
+ data: {"action": "wcps_get_taxonomy_category","taxonomy":taxonomy},
70
+ success: function(data)
71
+ {
72
+ jQuery(".wcps_taxonomy_category").html(data);
73
+ jQuery(".wcps_loading_taxonomy_category").fadeOut('slow');
74
+ }
75
+ });
76
+
77
+
78
+ })
79
+
80
+
81
+
82
+
83
+ });
84
+
85
+
86
+
87
+
88
+
89
+
90
+
readme.txt ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Woocommerce Products Slider ===
2
+ Contributors: wpkids
3
+ Donate link:
4
+ Tags: carousel, product, slider, woocommerce, carousel slider, product slider, woocommerce slider, Woocommerce Product slider
5
+ Requires at least: 3.8
6
+ Tested up to: 3.9.1
7
+ Stable tag: 1.0
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Fully responsive and mobile ready Carousel Slider for your woo-commerce product. unlimited slider anywhere via short-codes and easy admin setting.
12
+
13
+ == Description ==
14
+
15
+
16
+ A premium quality carousel slider to slide your woo-commerce product. easy to use via shortcode anywhere
17
+
18
+
19
+
20
+ <strong>Plugin Features</strong><br />
21
+
22
+ * Fully responsive and mobile ready.
23
+ * Unlimited slider anywhere.
24
+ * Query post from latest post, Older Published, Featured Items, by Only Year, by Month of a year, Taxonomy & Categories, Product id.
25
+ * Two different Theme.
26
+ * Custom number of slider items to query.
27
+ * Custom number of Slider Column Number.
28
+ * Slider Items Thumbnail images Size selection.
29
+ * Featured product marker.
30
+ * Ribbons for slider.
31
+ * Background Image for slider area.
32
+ * Add to cart Background Color.
33
+ * Add to cart Text Color.
34
+ * Items Title Color
35
+ * Items Title Font Size
36
+ * Items Price Color
37
+ * Items price Font Size
38
+ * Slider Pagination Background Color
39
+ * Slider Pagination Text Color
40
+
41
+ <br />
42
+ <strong>Video Tutorial Here.</strong>
43
+ https://www.youtube.com/watch?v=B0sOSp3h9fE
44
+
45
+ == Installation ==
46
+
47
+ 1. Install as regular WordPress plugin.<br />
48
+ 2. Go your plugin setting via WordPress Dashboard and find "<strong>Woocommerce Products Slider</strong>" activate it.<br />
49
+
50
+ After activate plugin you will see "WCPS" menu at left side on WordPress dashboard click "New WCPS" and use the options field "Woocommerce Products Slider"<br />
51
+
52
+ <br />
53
+ <strong>How to use on page or post</strong><br />
54
+ When slider options setup done please publish WCPS as like post or page<br />
55
+
56
+ and then copy shortcode from top of <strong>Woo-commerce Products Slider Options</strong> `[wcps id="1234" ]`<br />
57
+
58
+ then paste this shortcode anywhere in your page to display slider<br />
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ == Screenshots ==
67
+
68
+ 1. screenshot-1 Theme one
69
+ 2. screenshot-1 Theme two.
70
+ 3. screenshot-1 admin settings
71
+
72
+ == Changelog ==
73
+
74
+ = 1.0 =
75
+ * 22/07/2014 Initial release.
themes/anti-ruger/images/arrow-next.png ADDED
Binary file
themes/anti-ruger/images/arrow-prev.png ADDED
Binary file
themes/anti-ruger/index.php ADDED
@@ -0,0 +1,373 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wcps_body_anti_ruger($post_id)
4
+ {
5
+
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
+
8
+
9
+ $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
10
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
11
+ $wcps_total_items = get_post_meta( $post_id, 'wcps_total_items', true );
12
+ $wcps_column_number = get_post_meta( $post_id, 'wcps_column_number', true );
13
+ $wcps_auto_play = get_post_meta( $post_id, 'wcps_auto_play', true );
14
+ $wcps_stop_on_hover = get_post_meta( $post_id, 'wcps_stop_on_hover', true );
15
+ $wcps_slider_navigation = get_post_meta( $post_id, 'wcps_slider_navigation', true );
16
+ $wcps_slide_speed = get_post_meta( $post_id, 'wcps_slide_speed', true );
17
+
18
+ $wcps_slider_pagination = get_post_meta( $post_id, 'wcps_slider_pagination', true );
19
+ $wcps_pagination_slide_speed = get_post_meta( $post_id, 'wcps_pagination_slide_speed', true );
20
+ $wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
21
+
22
+ $wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
23
+ $wcps_slider_pagination_text_color = get_post_meta( $post_id, 'wcps_slider_pagination_text_color', true );
24
+
25
+ $wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
26
+ $wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
27
+
28
+ $wcps_content_source = get_post_meta( $post_id, 'wcps_content_source', true );
29
+ $wcps_content_year = get_post_meta( $post_id, 'wcps_content_year', true );
30
+ $wcps_content_month = get_post_meta( $post_id, 'wcps_content_month', true );
31
+ $wcps_content_month_year = get_post_meta( $post_id, 'wcps_content_month_year', true );
32
+
33
+ $wcps_taxonomy = get_post_meta( $post_id, 'wcps_taxonomy', true );
34
+ $wcps_taxonomy_category = get_post_meta( $post_id, 'wcps_taxonomy_category', true );
35
+
36
+ $wcps_product_ids = get_post_meta( $post_id, 'wcps_product_ids', true );
37
+
38
+
39
+ $wcps_cart_bg = get_post_meta( $post_id, 'wcps_cart_bg', true );
40
+ $wcps_cart_text_color = get_post_meta( $post_id, 'wcps_cart_text_color', true );
41
+
42
+ $wcps_items_title_color = get_post_meta( $post_id, 'wcps_items_title_color', true );
43
+ $wcps_items_title_font_size = get_post_meta( $post_id, 'wcps_items_title_font_size', true );
44
+
45
+ $wcps_items_price_color = get_post_meta( $post_id, 'wcps_items_price_color', true );
46
+ $wcps_items_price_font_size = get_post_meta( $post_id, 'wcps_items_price_font_size', true );
47
+
48
+ $wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
49
+ $wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
50
+
51
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
52
+
53
+
54
+
55
+
56
+ $wcps_body = '';
57
+ $wcps_body = '<style type="text/css">
58
+
59
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.add_to_cart_button,
60
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.added_to_cart
61
+ {
62
+ background: '.$wcps_cart_bg .';
63
+ color:'.$wcps_cart_text_color.';
64
+ }
65
+
66
+ .wcps-container #wcps-'.$post_id.' div.owl-pagination span.owl-numbers
67
+ {
68
+ background: '.$wcps_slider_pagination_bg .';
69
+ color:'.$wcps_slider_pagination_text_color.';
70
+ }
71
+
72
+
73
+
74
+ </style>';
75
+ $wcps_body .= '
76
+ <div class="wcps-container" style="background-image:url('.$wcps_bg_img.')">
77
+ <div class="wcps-ribbon wcps-ribbon-'.$wcps_ribbon_name.'" style="background:url('.$wcps_ribbons[$wcps_ribbon_name].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);)"></div>
78
+
79
+ <div id="wcps-'.$post_id.'" class="owl-carousel wcps-'.$wcps_themes.'">
80
+
81
+ ';
82
+
83
+ global $wp_query;
84
+
85
+
86
+
87
+
88
+ if(($wcps_content_source=="latest"))
89
+ {
90
+
91
+ $wp_query = new WP_Query(
92
+ array (
93
+ 'post_type' => 'product',
94
+ 'orderby' => 'date',
95
+ 'order' => 'DESC',
96
+ 'posts_per_page' => $wcps_total_items,
97
+
98
+ ) );
99
+
100
+
101
+ }
102
+
103
+ elseif(($wcps_content_source=="older"))
104
+ {
105
+
106
+ $wp_query = new WP_Query(
107
+ array (
108
+ 'post_type' => 'product',
109
+ 'orderby' => 'date',
110
+ 'order' => 'ASC',
111
+ 'posts_per_page' => $wcps_total_items,
112
+
113
+ ) );
114
+
115
+ }
116
+
117
+ elseif(($wcps_content_source=="featured"))
118
+ {
119
+
120
+ $wp_query = new WP_Query(
121
+ array (
122
+ 'post_type' => 'product',
123
+ 'meta_query' => array(
124
+ array(
125
+ 'key' => '_featured',
126
+ 'value' => 'yes',
127
+ )),
128
+ 'posts_per_page' => $wcps_total_items,
129
+
130
+ ) );
131
+
132
+ }
133
+
134
+
135
+ elseif(($wcps_content_source=="year"))
136
+ {
137
+
138
+ $wp_query = new WP_Query(
139
+ array (
140
+ 'post_type' => 'product',
141
+ 'year' => $wcps_content_year,
142
+ 'posts_per_page' => $wcps_total_items,
143
+ ) );
144
+
145
+ }
146
+
147
+ elseif(($wcps_content_source=="month"))
148
+ {
149
+
150
+ $wp_query = new WP_Query(
151
+ array (
152
+ 'post_type' => 'product',
153
+ 'year' => $wcps_content_month_year,
154
+ 'monthnum' => $wcps_content_month,
155
+ 'posts_per_page' => $wcps_total_items,
156
+
157
+ ) );
158
+
159
+ }
160
+
161
+ elseif($wcps_content_source="taxonomy")
162
+ {
163
+ $wp_query = new WP_Query(
164
+ array (
165
+ 'post_type' => 'product',
166
+ 'posts_per_page' => $wcps_total_items,
167
+
168
+ 'tax_query' => array(
169
+ array(
170
+ 'taxonomy' => $wcps_taxonomy,
171
+ 'field' => 'id',
172
+ 'terms' => $wcps_taxonomy_category,
173
+ )
174
+ )
175
+
176
+ ) );
177
+ }
178
+
179
+
180
+
181
+ elseif(($wcps_content_source=="product_id"))
182
+ {
183
+
184
+ $wp_query = new WP_Query(
185
+ array (
186
+ 'post__in' => $wcps_product_ids,
187
+ 'post_type' => 'product',
188
+
189
+
190
+ ) );
191
+
192
+
193
+ }
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ if ( $wp_query->have_posts() ) :
206
+
207
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
208
+
209
+ global $product;
210
+
211
+
212
+ $wcps_thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $wcps_items_thumb_size );
213
+
214
+ $wcps_thumb_url = $wcps_thumb['0'];
215
+
216
+ $price = $product->get_price_html();
217
+
218
+ $wcps_body.= '
219
+ <div class="wcps-items" >
220
+
221
+ <div style="max-height:'.$wcps_items_thumb_max_hieght.';" class="wcps-items-thumb"><a href="'.get_permalink().'"><img src="'.$wcps_thumb_url.'" /></a></div>
222
+ <div class="items-info">
223
+ <div class="wcps-items-title" style="color:'.$wcps_items_title_color.';font-size:'.$wcps_items_title_font_size.'">'.get_the_title().'</div>
224
+ <div class="wcps-items-price" style="color:'.$wcps_items_price_color.';font-size:'.$wcps_items_price_font_size.'">'.$price .'</div>
225
+ <div class="wcps-items-cart">'.do_shortcode('[add_to_cart id="'.get_the_ID().'"]').'</div>
226
+ </div>
227
+ </div>';
228
+
229
+ endwhile;
230
+
231
+ wp_reset_query();
232
+ endif;
233
+
234
+
235
+
236
+ $wcps_body .= '</div></div>';
237
+
238
+ $wcps_body .='<script>
239
+ jQuery(document).ready(function($)
240
+ {
241
+ $("#wcps-'.$post_id.'").owlCarousel({
242
+
243
+ items : '.$wcps_column_number.', //10 items above 1000px browser width
244
+ itemsDesktop : [1000,5], //5 items between 1000px and 901px
245
+ itemsDesktopSmall : [900,3], // betweem 900px and 601px
246
+ itemsTablet: [600,2], //2 items between 600 and 0
247
+ itemsMobile : false,
248
+ navigationText : ["",""],
249
+ ';
250
+
251
+
252
+ if($wcps_auto_play=="true")
253
+ {
254
+
255
+ $wcps_body .='autoPlay: '.$wcps_auto_play.',';
256
+
257
+ }
258
+
259
+ if($wcps_stop_on_hover=="true")
260
+ {
261
+
262
+ $wcps_body .='stopOnHover: '.$wcps_stop_on_hover.',';
263
+
264
+ }
265
+
266
+ if($wcps_slider_navigation=="true")
267
+ {
268
+
269
+ $wcps_body .='navigation: '.$wcps_slider_navigation.',';
270
+
271
+ }
272
+
273
+ if(!empty($wcps_slider_pagination))
274
+ {
275
+
276
+ $wcps_body .='pagination: '.$wcps_slider_pagination.',';
277
+
278
+ }
279
+ else
280
+ {
281
+ $wcps_body .='pagination: false,';
282
+ }
283
+
284
+
285
+ if(!empty($wcps_slider_pagination_count))
286
+ {
287
+
288
+ $wcps_body .='paginationNumbers: true,';
289
+
290
+ }
291
+ else
292
+ {
293
+ $wcps_body .='paginationNumbers: false,';
294
+ }
295
+
296
+
297
+
298
+ if(!empty($wcps_slide_speed))
299
+ {
300
+
301
+ $wcps_body .='slideSpeed: '.$wcps_slide_speed.',';
302
+
303
+ }
304
+
305
+
306
+ if(!empty($wcps_pagination_slide_speed))
307
+ {
308
+
309
+ $wcps_body .='paginationSpeed: '.$wcps_pagination_slide_speed.',';
310
+
311
+ }
312
+
313
+
314
+ if(!empty($wcps_slider_touch_drag))
315
+ {
316
+
317
+ $wcps_body .='touchDrag : true,';
318
+
319
+ }
320
+ else
321
+ {
322
+ $wcps_body .='touchDrag: false,';
323
+ }
324
+
325
+
326
+
327
+ if(!empty($wcps_slider_mouse_drag ))
328
+ {
329
+
330
+ $wcps_body .='mouseDrag : true,';
331
+
332
+ }
333
+ else
334
+ {
335
+ $wcps_body .='mouseDrag : false,';
336
+ }
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ $wcps_body .='});
346
+
347
+ });</script>';
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+ return $wcps_body;
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ }
themes/anti-ruger/style.css ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+
7
+ .wcps-container .wcps-anti-ruger div.wcps-items {
8
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
9
+ box-shadow: 0 0 4px -3px rgb(0, 0, 0);
10
+ margin: 0 10px;
11
+ position: relative;
12
+ }
13
+
14
+
15
+
16
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-thumb {
17
+ margin-bottom: 10px;
18
+ overflow: hidden;
19
+ text-align: center;
20
+ }
21
+
22
+
23
+
24
+
25
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-thumb img {
26
+ border-radius: 0;
27
+ box-shadow: none;
28
+ }
29
+
30
+
31
+ .wcps-container .wcps-anti-ruger div.wcps-items div.items-info {
32
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
33
+ bottom: 0;
34
+ display: block;
35
+ left: 0;
36
+
37
+ position: absolute;
38
+ transform: translateY(-500px);
39
+ transition: all 0.8s ease 0s;
40
+ width: 100%;
41
+ }
42
+
43
+ .wcps-container .wcps-anti-ruger div.wcps-items:hover div.items-info{
44
+
45
+ transform: translateY(0px);
46
+ }
47
+
48
+
49
+
50
+
51
+
52
+
53
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-title {
54
+ font-size: 14px;
55
+ line-height: 14px;
56
+ padding: 10px 0;
57
+ text-align: center;
58
+ }
59
+
60
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart {
61
+ text-align: center;
62
+ }
63
+
64
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart p {
65
+ border: medium none !important;
66
+ }
67
+
68
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart span.amount {
69
+ font-size: 15px;
70
+ line-height: 15px;
71
+ }
72
+
73
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart del{
74
+
75
+ }
76
+
77
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart del span.amount{
78
+
79
+ }
80
+
81
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart ins {
82
+
83
+ }
84
+
85
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart ins span.amount{
86
+
87
+ }
88
+
89
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart span.amount{
90
+
91
+ }
92
+
93
+
94
+
95
+
96
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart .amount,
97
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart del,
98
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart ins{
99
+ display:none; }
100
+
101
+
102
+
103
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart a.add_to_cart_button {
104
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
105
+ border: medium none;
106
+ border-radius: 0;
107
+ box-shadow: none;
108
+ font-size: 12px;
109
+ line-height: 12px;
110
+ margin-top: 15px;
111
+ padding: 10px 15px;
112
+ text-shadow: none;
113
+ }
114
+
115
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart a.added_to_cart {
116
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
117
+ border: medium none;
118
+ border-radius: 0;
119
+ box-shadow: none;
120
+ color: rgb(68, 68, 68);
121
+ font-size: 12px;
122
+ line-height: 12px;
123
+ margin-top: 15px;
124
+ padding: 10px 15px;
125
+ text-decoration: none;
126
+ text-shadow: none;
127
+ }
128
+
129
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-cart a.added {
130
+ display: none;
131
+ }
132
+
133
+
134
+
135
+
136
+
137
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-price {
138
+ text-align: center;
139
+ }
140
+
141
+
142
+ .wcps-container .wcps-anti-ruger div.wcps-items div.wcps-items-price span.amount {
143
+ background: #ddd;
144
+ border: 1px solid #fff;
145
+ padding: 4px 10px;
146
+ }
147
+
148
+
149
+ .wcps-container .wcps-anti-ruger .owl-buttons{}
150
+ .wcps-container .wcps-anti-ruger .owl-controls .owl-buttons .owl-prev {
151
+ background-image: url("images/arrow-prev.png");
152
+ border: 1px solid rgb(221, 221, 221);
153
+ border-radius: 0;
154
+ color: rgb(0, 0, 0);
155
+ padding: 0;
156
+ width: 30px;
157
+ height: 20px;
158
+ }
159
+
160
+
161
+
162
+ .wcps-container .wcps-anti-ruger .owl-controls .owl-buttons .owl-next {
163
+ background-image: url("images/arrow-next.png");
164
+ border: 1px solid rgb(221, 221, 221);
165
+ border-radius: 0;
166
+ color: rgb(0, 0, 0);
167
+ padding: 0;
168
+ width: 30px;
169
+ height: 20px;
170
+ }
171
+
172
+
173
+
174
+ .wcps-container .wcps-anti-ruger .owl-controls .owl-buttons div.owl-prev:hover{
175
+ background-image: url("images/arrow-prev.png") ;
176
+ background-color:#d5d5d5 !important; }
177
+
178
+
179
+ .wcps-container .wcps-anti-ruger .owl-controls .owl-buttons div.owl-next:hover{
180
+ background-image: url("images/arrow-next.png");
181
+ background-color:#d5d5d5 !important; }
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
+
themes/flat/images/arrow-next.png ADDED
Binary file
themes/flat/images/arrow-prev.png ADDED
Binary file
themes/flat/images/star.png ADDED
Binary file
themes/flat/index.php ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wcps_body_flat($post_id)
4
+ {
5
+
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
+
8
+
9
+ $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
10
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
11
+ $wcps_total_items = get_post_meta( $post_id, 'wcps_total_items', true );
12
+ $wcps_column_number = get_post_meta( $post_id, 'wcps_column_number', true );
13
+ $wcps_auto_play = get_post_meta( $post_id, 'wcps_auto_play', true );
14
+ $wcps_stop_on_hover = get_post_meta( $post_id, 'wcps_stop_on_hover', true );
15
+ $wcps_slider_navigation = get_post_meta( $post_id, 'wcps_slider_navigation', true );
16
+ $wcps_slide_speed = get_post_meta( $post_id, 'wcps_slide_speed', true );
17
+
18
+ $wcps_slider_pagination = get_post_meta( $post_id, 'wcps_slider_pagination', true );
19
+ $wcps_pagination_slide_speed = get_post_meta( $post_id, 'wcps_pagination_slide_speed', true );
20
+ $wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
21
+
22
+ $wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
23
+ $wcps_slider_pagination_text_color = get_post_meta( $post_id, 'wcps_slider_pagination_text_color', true );
24
+
25
+ $wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
26
+ $wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
27
+
28
+ $wcps_content_source = get_post_meta( $post_id, 'wcps_content_source', true );
29
+ $wcps_content_year = get_post_meta( $post_id, 'wcps_content_year', true );
30
+ $wcps_content_month = get_post_meta( $post_id, 'wcps_content_month', true );
31
+ $wcps_content_month_year = get_post_meta( $post_id, 'wcps_content_month_year', true );
32
+
33
+ $wcps_taxonomy = get_post_meta( $post_id, 'wcps_taxonomy', true );
34
+ $wcps_taxonomy_category = get_post_meta( $post_id, 'wcps_taxonomy_category', true );
35
+
36
+
37
+ $wcps_cart_bg = get_post_meta( $post_id, 'wcps_cart_bg', true );
38
+ $wcps_cart_text_color = get_post_meta( $post_id, 'wcps_cart_text_color', true );
39
+
40
+
41
+
42
+ $wcps_items_title_color = get_post_meta( $post_id, 'wcps_items_title_color', true );
43
+ $wcps_items_title_font_size = get_post_meta( $post_id, 'wcps_items_title_font_size', true );
44
+
45
+ $wcps_items_price_color = get_post_meta( $post_id, 'wcps_items_price_color', true );
46
+ $wcps_items_price_font_size = get_post_meta( $post_id, 'wcps_items_price_font_size', true );
47
+
48
+ $wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
49
+ $wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
50
+
51
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
52
+
53
+
54
+
55
+
56
+ $wcps_body = '';
57
+ $wcps_body = '<style type="text/css">
58
+
59
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.add_to_cart_button,
60
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.added_to_cart
61
+ {
62
+ background: '.$wcps_cart_bg .';
63
+ color:'.$wcps_cart_text_color.';
64
+ }
65
+
66
+ .wcps-container #wcps-'.$post_id.' div.owl-pagination span.owl-numbers
67
+ {
68
+ background: '.$wcps_slider_pagination_bg .';
69
+ color:'.$wcps_slider_pagination_text_color.';
70
+ }
71
+
72
+
73
+ </style>';
74
+ $wcps_body .= '
75
+ <div class="wcps-container" style="background-image:url('.$wcps_bg_img.')">
76
+ <div class="wcps-ribbon wcps-ribbon-'.$wcps_ribbon_name.'" style="background:url('.$wcps_ribbons[$wcps_ribbon_name].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);)"></div>
77
+
78
+ <div id="wcps-'.$post_id.'" class="owl-carousel wcps-'.$wcps_themes.'">
79
+
80
+ ';
81
+
82
+ global $wp_query;
83
+
84
+
85
+
86
+ if(($wcps_content_source=="latest"))
87
+ {
88
+
89
+ $wp_query = new WP_Query(
90
+ array (
91
+ 'post_type' => 'product',
92
+ 'orderby' => 'date',
93
+ 'order' => 'DESC',
94
+ 'posts_per_page' => $wcps_total_items,
95
+
96
+ ) );
97
+
98
+
99
+ }
100
+
101
+ elseif(($wcps_content_source=="older"))
102
+ {
103
+
104
+ $wp_query = new WP_Query(
105
+ array (
106
+ 'post_type' => 'product',
107
+ 'orderby' => 'date',
108
+ 'order' => 'ASC',
109
+ 'posts_per_page' => $wcps_total_items,
110
+
111
+ ) );
112
+
113
+ }
114
+
115
+ elseif(($wcps_content_source=="featured"))
116
+ {
117
+
118
+ $wp_query = new WP_Query(
119
+ array (
120
+ 'post_type' => 'product',
121
+ 'meta_query' => array(
122
+ array(
123
+ 'key' => '_featured',
124
+ 'value' => 'yes',
125
+ )),
126
+ 'posts_per_page' => $wcps_total_items,
127
+
128
+ ) );
129
+
130
+ }
131
+
132
+
133
+ elseif(($wcps_content_source=="year"))
134
+ {
135
+
136
+ $wp_query = new WP_Query(
137
+ array (
138
+ 'post_type' => 'product',
139
+ 'year' => $wcps_content_year,
140
+ 'posts_per_page' => $wcps_total_items,
141
+ ) );
142
+
143
+ }
144
+
145
+ elseif(($wcps_content_source=="month"))
146
+ {
147
+
148
+ $wp_query = new WP_Query(
149
+ array (
150
+ 'post_type' => 'product',
151
+ 'year' => $wcps_content_month_year,
152
+ 'monthnum' => $wcps_content_month,
153
+ 'posts_per_page' => $wcps_total_items,
154
+
155
+ ) );
156
+
157
+ }
158
+
159
+ elseif($wcps_content_source="taxonomy")
160
+ {
161
+ $wp_query = new WP_Query(
162
+ array (
163
+ 'post_type' => 'product',
164
+ 'posts_per_page' => $wcps_total_items,
165
+
166
+ 'tax_query' => array(
167
+ array(
168
+ 'taxonomy' => $wcps_taxonomy,
169
+ 'field' => 'id',
170
+ 'terms' => $wcps_taxonomy_category,
171
+ )
172
+ )
173
+
174
+ ) );
175
+ }
176
+
177
+
178
+
179
+ elseif(($wcps_content_source=="product_id"))
180
+ {
181
+
182
+ $wp_query = new WP_Query(
183
+ array (
184
+ 'post__in' => $wcps_product_ids,
185
+ 'post_type' => 'product',
186
+
187
+
188
+ ) );
189
+
190
+
191
+ }
192
+
193
+
194
+
195
+ if ( $wp_query->have_posts() ) :
196
+
197
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
198
+
199
+ global $product;
200
+
201
+ $wcps_featured = get_post_meta( get_the_ID(), '_featured', true );
202
+
203
+
204
+
205
+
206
+ $wcps_thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $wcps_items_thumb_size );
207
+
208
+ $wcps_thumb_url = $wcps_thumb['0'];
209
+
210
+ $price = $product->get_price_html();
211
+
212
+ $wcps_body.= '<div class="wcps-items" >';
213
+
214
+ if($wcps_featured=="yes")
215
+ {
216
+ $wcps_body.= '<div class="wcps-featured"></div>';
217
+ }
218
+
219
+ $wcps_body.= '<div style="max-height:'.$wcps_items_thumb_max_hieght.';" class="wcps-items-thumb"><a href="'.get_permalink().'"><img src="'.$wcps_thumb_url.'" /></a></div>
220
+ <div class="items-info">
221
+ <div class="wcps-items-title" style="color:'.$wcps_items_title_color.';font-size:'.$wcps_items_title_font_size.'">'.get_the_title().'</div>
222
+ <div class="wcps-items-price" style="color:'.$wcps_items_price_color.';font-size:'.$wcps_items_price_font_size.'">'.$price .'</div>
223
+ <div class="wcps-items-cart">'.do_shortcode('[add_to_cart id="'.get_the_ID().'"]').'</div>
224
+ </div>
225
+ </div>';
226
+
227
+ endwhile;
228
+
229
+ wp_reset_query();
230
+ endif;
231
+
232
+
233
+
234
+ $wcps_body .= '</div></div>';
235
+
236
+ $wcps_body .='<script>
237
+ jQuery(document).ready(function($)
238
+ {
239
+ $("#wcps-'.$post_id.'").owlCarousel({
240
+
241
+ items : '.$wcps_column_number.', //10 items above 1000px browser width
242
+ itemsDesktop : [1000,5], //5 items between 1000px and 901px
243
+ itemsDesktopSmall : [900,3], // betweem 900px and 601px
244
+ itemsTablet: [600,2], //2 items between 600 and 0
245
+ itemsMobile : false,
246
+ navigationText : ["",""],
247
+ ';
248
+
249
+
250
+ if($wcps_auto_play=="true")
251
+ {
252
+
253
+ $wcps_body .='autoPlay: '.$wcps_auto_play.',';
254
+
255
+ }
256
+
257
+ if($wcps_stop_on_hover=="true")
258
+ {
259
+
260
+ $wcps_body .='stopOnHover: '.$wcps_stop_on_hover.',';
261
+
262
+ }
263
+
264
+ if($wcps_slider_navigation=="true")
265
+ {
266
+
267
+ $wcps_body .='navigation: '.$wcps_slider_navigation.',';
268
+
269
+ }
270
+
271
+ if(!empty($wcps_slider_pagination))
272
+ {
273
+
274
+ $wcps_body .='pagination: '.$wcps_slider_pagination.',';
275
+
276
+ }
277
+ else
278
+ {
279
+ $wcps_body .='pagination: false,';
280
+ }
281
+
282
+
283
+ if(!empty($wcps_slider_pagination_count))
284
+ {
285
+
286
+ $wcps_body .='paginationNumbers: true,';
287
+
288
+ }
289
+ else
290
+ {
291
+ $wcps_body .='paginationNumbers: false,';
292
+ }
293
+
294
+
295
+
296
+ if(!empty($wcps_slide_speed))
297
+ {
298
+
299
+ $wcps_body .='slideSpeed: '.$wcps_slide_speed.',';
300
+
301
+ }
302
+
303
+
304
+ if(!empty($wcps_pagination_slide_speed))
305
+ {
306
+
307
+ $wcps_body .='paginationSpeed: '.$wcps_pagination_slide_speed.',';
308
+
309
+ }
310
+
311
+
312
+ if(!empty($wcps_slider_touch_drag))
313
+ {
314
+
315
+ $wcps_body .='touchDrag : true,';
316
+
317
+ }
318
+ else
319
+ {
320
+ $wcps_body .='touchDrag: false,';
321
+ }
322
+
323
+
324
+
325
+ if(!empty($wcps_slider_mouse_drag ))
326
+ {
327
+
328
+ $wcps_body .='mouseDrag : true,';
329
+
330
+ }
331
+ else
332
+ {
333
+ $wcps_body .='mouseDrag : false,';
334
+ }
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+ $wcps_body .='});
344
+
345
+ });</script>';
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ return $wcps_body;
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ }
themes/flat/style.css ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+
7
+ .wcps-container .wcps-flat div.wcps-items {
8
+ margin: 0 10px;
9
+ }
10
+
11
+ .wcps-container .wcps-flat div.wcps-items div.wcps-featured {
12
+ background: url("images/star.png") repeat scroll 0 0 rgba(0, 0, 0, 0);
13
+ height: 30px;
14
+ left: 0;
15
+ position: absolute;
16
+ top: 0;
17
+ width: 30px;
18
+ }
19
+
20
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-thumb {
21
+ margin-bottom: 10px;
22
+ overflow: hidden;
23
+ text-align: center;
24
+ }
25
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-thumb img {
26
+ border-radius: 0;
27
+ box-shadow: none;
28
+ }
29
+
30
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-title {
31
+ font-size: 14px;
32
+ line-height: 14px;
33
+ padding: 10px 0;
34
+ text-align: center;
35
+ }
36
+
37
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart {
38
+ text-align: center;
39
+ }
40
+
41
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart p {
42
+ border: medium none !important;
43
+ }
44
+
45
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart span.amount {
46
+ font-size: 15px;
47
+ line-height: 15px;
48
+ }
49
+
50
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart del{
51
+
52
+ }
53
+
54
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart del span.amount{
55
+
56
+ }
57
+
58
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart ins {
59
+
60
+ }
61
+
62
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart ins span.amount{
63
+
64
+ }
65
+
66
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart span.amount{
67
+
68
+ }
69
+
70
+
71
+
72
+
73
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart .amount,
74
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart del,
75
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart ins{
76
+ display:none; }
77
+
78
+
79
+
80
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart a.add_to_cart_button {
81
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
82
+ border: medium none;
83
+ border-radius: 0;
84
+ box-shadow: none;
85
+ font-size: 12px;
86
+ line-height: 12px;
87
+ margin-top: 15px;
88
+ padding: 10px 15px;
89
+ text-shadow: none;
90
+ }
91
+
92
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart a.added_to_cart {
93
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
94
+ border: medium none;
95
+ border-radius: 0;
96
+ box-shadow: none;
97
+ color: rgb(68, 68, 68);
98
+ font-size: 12px;
99
+ line-height: 12px;
100
+ margin-top: 15px;
101
+ padding: 10px 15px;
102
+ text-decoration: none;
103
+ text-shadow: none;
104
+ }
105
+
106
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-cart a.added {
107
+ display: none;
108
+ }
109
+
110
+
111
+
112
+
113
+
114
+ .wcps-container .wcps-flat div.wcps-items div.wcps-items-price {
115
+ text-align: center;
116
+ }
117
+
118
+ .wcps-container .wcps-flat .owl-buttons{}
119
+ .wcps-container .wcps-flat .owl-controls .owl-buttons .owl-prev {
120
+ background-image: url("images/arrow-prev.png");
121
+ border: 1px solid rgb(221, 221, 221);
122
+ border-radius: 0;
123
+ color: rgb(0, 0, 0);
124
+ padding: 0;
125
+ width: 30px;
126
+ height: 20px;
127
+ }
128
+
129
+
130
+
131
+ .wcps-container .wcps-flat .owl-controls .owl-buttons .owl-next {
132
+ background-image: url("images/arrow-next.png");
133
+ border: 1px solid rgb(221, 221, 221);
134
+ border-radius: 0;
135
+ color: rgb(0, 0, 0);
136
+ padding: 0;
137
+ width: 30px;
138
+ height: 20px;
139
+ }
140
+
141
+
142
+
143
+ .wcps-container .wcps-flat .owl-controls .owl-buttons div.owl-prev:hover{
144
+ background-image: url("images/arrow-prev.png") ;
145
+ background-color:#d5d5d5 !important; }
146
+
147
+
148
+ .wcps-container .wcps-flat .owl-controls .owl-buttons div.owl-next:hover{
149
+ background-image: url("images/arrow-next.png");
150
+ background-color:#d5d5d5 !important; }
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
themes/rossi/images/arrow-next.png ADDED
Binary file
themes/rossi/images/arrow-prev.png ADDED
Binary file
themes/rossi/index.php ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wcps_body_rossi($post_id)
4
+ {
5
+
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
+
8
+
9
+ $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
10
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
11
+ $wcps_total_items = get_post_meta( $post_id, 'wcps_total_items', true );
12
+ $wcps_column_number = get_post_meta( $post_id, 'wcps_column_number', true );
13
+ $wcps_auto_play = get_post_meta( $post_id, 'wcps_auto_play', true );
14
+ $wcps_stop_on_hover = get_post_meta( $post_id, 'wcps_stop_on_hover', true );
15
+ $wcps_slider_navigation = get_post_meta( $post_id, 'wcps_slider_navigation', true );
16
+ $wcps_slide_speed = get_post_meta( $post_id, 'wcps_slide_speed', true );
17
+
18
+ $wcps_slider_pagination = get_post_meta( $post_id, 'wcps_slider_pagination', true );
19
+ $wcps_pagination_slide_speed = get_post_meta( $post_id, 'wcps_pagination_slide_speed', true );
20
+ $wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
21
+
22
+ $wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
23
+
24
+
25
+ $wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
26
+ $wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
27
+
28
+ $wcps_content_source = get_post_meta( $post_id, 'wcps_content_source', true );
29
+ $wcps_content_year = get_post_meta( $post_id, 'wcps_content_year', true );
30
+ $wcps_content_month = get_post_meta( $post_id, 'wcps_content_month', true );
31
+ $wcps_content_month_year = get_post_meta( $post_id, 'wcps_content_month_year', true );
32
+
33
+ $wcps_taxonomy = get_post_meta( $post_id, 'wcps_taxonomy', true );
34
+ $wcps_taxonomy_category = get_post_meta( $post_id, 'wcps_taxonomy_category', true );
35
+
36
+
37
+ $wcps_cart_bg = get_post_meta( $post_id, 'wcps_cart_bg', true );
38
+ $wcps_cart_text_color = get_post_meta( $post_id, 'wcps_cart_text_color', true );
39
+
40
+ $wcps_items_title_color = get_post_meta( $post_id, 'wcps_items_title_color', true );
41
+ $wcps_items_title_font_size = get_post_meta( $post_id, 'wcps_items_title_font_size', true );
42
+
43
+ $wcps_items_price_color = get_post_meta( $post_id, 'wcps_items_price_color', true );
44
+ $wcps_items_price_font_size = get_post_meta( $post_id, 'wcps_items_price_font_size', true );
45
+
46
+ $wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
47
+ $wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
48
+
49
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
50
+
51
+
52
+
53
+
54
+ $wcps_body = '';
55
+ $wcps_body = '<style type="text/css">
56
+
57
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.add_to_cart_button,
58
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.added_to_cart
59
+ {
60
+ background: '.$wcps_cart_bg .';
61
+ color:'.$wcps_cart_text_color.';
62
+ }
63
+
64
+ .wcps-container #wcps-'.$post_id.' div.owl-pagination span.owl-numbers
65
+ {
66
+ background: '.$wcps_slider_pagination_bg .';
67
+ color:'.$wcps_slider_pagination_text_color.';
68
+ }
69
+
70
+ </style>';
71
+
72
+ $wcps_body .= '
73
+ <div class="wcps-container" style="background-image:url('.$wcps_bg_img.')">
74
+ <div class="wcps-ribbon wcps-ribbon-'.$wcps_ribbon_name.'" style="background:url('.$wcps_ribbons[$wcps_ribbon_name].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);)"></div>
75
+
76
+ <div id="wcps-'.$post_id.'" class="owl-carousel wcps-'.$wcps_themes.'">
77
+
78
+ ';
79
+
80
+ global $wp_query;
81
+
82
+
83
+
84
+
85
+ if(($wcps_content_source=="latest"))
86
+ {
87
+
88
+ $wp_query = new WP_Query(
89
+ array (
90
+ 'post_type' => 'product',
91
+ 'orderby' => 'date',
92
+ 'order' => 'DESC',
93
+ 'posts_per_page' => $wcps_total_items,
94
+
95
+ ) );
96
+
97
+
98
+ }
99
+
100
+ elseif(($wcps_content_source=="older"))
101
+ {
102
+
103
+ $wp_query = new WP_Query(
104
+ array (
105
+ 'post_type' => 'product',
106
+ 'orderby' => 'date',
107
+ 'order' => 'ASC',
108
+ 'posts_per_page' => $wcps_total_items,
109
+
110
+ ) );
111
+
112
+ }
113
+
114
+ elseif(($wcps_content_source=="featured"))
115
+ {
116
+
117
+ $wp_query = new WP_Query(
118
+ array (
119
+ 'post_type' => 'product',
120
+ 'meta_query' => array(
121
+ array(
122
+ 'key' => '_featured',
123
+ 'value' => 'yes',
124
+ )),
125
+ 'posts_per_page' => $wcps_total_items,
126
+
127
+ ) );
128
+
129
+ }
130
+
131
+
132
+ elseif(($wcps_content_source=="year"))
133
+ {
134
+
135
+ $wp_query = new WP_Query(
136
+ array (
137
+ 'post_type' => 'product',
138
+ 'year' => $wcps_content_year,
139
+ 'posts_per_page' => $wcps_total_items,
140
+ ) );
141
+
142
+ }
143
+
144
+ elseif(($wcps_content_source=="month"))
145
+ {
146
+
147
+ $wp_query = new WP_Query(
148
+ array (
149
+ 'post_type' => 'product',
150
+ 'year' => $wcps_content_month_year,
151
+ 'monthnum' => $wcps_content_month,
152
+ 'posts_per_page' => $wcps_total_items,
153
+
154
+ ) );
155
+
156
+ }
157
+
158
+ elseif($wcps_content_source="taxonomy")
159
+ {
160
+ $wp_query = new WP_Query(
161
+ array (
162
+ 'post_type' => 'product',
163
+ 'posts_per_page' => $wcps_total_items,
164
+
165
+ 'tax_query' => array(
166
+ array(
167
+ 'taxonomy' => $wcps_taxonomy,
168
+ 'field' => 'id',
169
+ 'terms' => $wcps_taxonomy_category,
170
+ )
171
+ )
172
+
173
+ ) );
174
+ }
175
+
176
+
177
+
178
+ elseif(($wcps_content_source=="product_id"))
179
+ {
180
+
181
+ $wp_query = new WP_Query(
182
+ array (
183
+ 'post__in' => $wcps_product_ids,
184
+ 'post_type' => 'product',
185
+
186
+
187
+ ) );
188
+
189
+
190
+ }
191
+
192
+
193
+
194
+ if ( $wp_query->have_posts() ) :
195
+
196
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
197
+
198
+ global $product;
199
+
200
+
201
+ $wcps_thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $wcps_items_thumb_size );
202
+
203
+ $wcps_thumb_url = $wcps_thumb['0'];
204
+
205
+ $price = $product->get_price_html();
206
+
207
+ $wcps_body.= '
208
+ <div class="wcps-items" >
209
+
210
+ <div style="max-height:'.$wcps_items_thumb_max_hieght.';" class="wcps-items-thumb"><a href="'.get_permalink().'"><img src="'.$wcps_thumb_url.'" /></a></div>
211
+ <div class="items-info">
212
+ <div class="wcps-items-title" style="color:'.$wcps_items_title_color.';font-size:'.$wcps_items_title_font_size.'">'.get_the_title().'</div>
213
+ <div class="wcps-items-price" style="color:'.$wcps_items_price_color.';font-size:'.$wcps_items_price_font_size.'">'.$price .'</div>
214
+ <div class="wcps-items-cart">'.do_shortcode('[add_to_cart id="'.get_the_ID().'"]').'</div>
215
+ </div>
216
+ </div>';
217
+
218
+ endwhile;
219
+
220
+ wp_reset_query();
221
+ endif;
222
+
223
+
224
+
225
+ $wcps_body .= '</div></div>';
226
+
227
+ $wcps_body .='<script>
228
+ jQuery(document).ready(function($)
229
+ {
230
+ $("#wcps-'.$post_id.'").owlCarousel({
231
+
232
+ items : '.$wcps_column_number.', //10 items above 1000px browser width
233
+ itemsDesktop : [1000,5], //5 items between 1000px and 901px
234
+ itemsDesktopSmall : [900,3], // betweem 900px and 601px
235
+ itemsTablet: [600,2], //2 items between 600 and 0
236
+ itemsMobile : false,
237
+ navigationText : ["",""],
238
+ ';
239
+
240
+
241
+ if($wcps_auto_play=="true")
242
+ {
243
+
244
+ $wcps_body .='autoPlay: '.$wcps_auto_play.',';
245
+
246
+ }
247
+
248
+ if($wcps_stop_on_hover=="true")
249
+ {
250
+
251
+ $wcps_body .='stopOnHover: '.$wcps_stop_on_hover.',';
252
+
253
+ }
254
+
255
+ if($wcps_slider_navigation=="true")
256
+ {
257
+
258
+ $wcps_body .='navigation: '.$wcps_slider_navigation.',';
259
+
260
+ }
261
+
262
+ if(!empty($wcps_slider_pagination))
263
+ {
264
+
265
+ $wcps_body .='pagination: '.$wcps_slider_pagination.',';
266
+
267
+ }
268
+ else
269
+ {
270
+ $wcps_body .='pagination: false,';
271
+ }
272
+
273
+
274
+ if(!empty($wcps_slider_pagination_count))
275
+ {
276
+
277
+ $wcps_body .='paginationNumbers: true,';
278
+
279
+ }
280
+ else
281
+ {
282
+ $wcps_body .='paginationNumbers: false,';
283
+ }
284
+
285
+
286
+
287
+ if(!empty($wcps_slide_speed))
288
+ {
289
+
290
+ $wcps_body .='slideSpeed: '.$wcps_slide_speed.',';
291
+
292
+ }
293
+
294
+
295
+ if(!empty($wcps_pagination_slide_speed))
296
+ {
297
+
298
+ $wcps_body .='paginationSpeed: '.$wcps_pagination_slide_speed.',';
299
+
300
+ }
301
+
302
+
303
+ if(!empty($wcps_slider_touch_drag))
304
+ {
305
+
306
+ $wcps_body .='touchDrag : true,';
307
+
308
+ }
309
+ else
310
+ {
311
+ $wcps_body .='touchDrag: false,';
312
+ }
313
+
314
+
315
+
316
+ if(!empty($wcps_slider_mouse_drag ))
317
+ {
318
+
319
+ $wcps_body .='mouseDrag : true,';
320
+
321
+ }
322
+ else
323
+ {
324
+ $wcps_body .='mouseDrag : false,';
325
+ }
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+ $wcps_body .='});
335
+
336
+ });</script>';
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+ return $wcps_body;
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+ }
themes/rossi/style.css ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+
7
+ .wcps-container .wcps-rossi div.wcps-items {
8
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
9
+ box-shadow: 0 0 4px -3px rgb(0, 0, 0);
10
+ margin: 0 10px;
11
+ }
12
+
13
+
14
+
15
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-thumb {
16
+ margin-bottom: 10px;
17
+ overflow: hidden;
18
+ text-align: center;
19
+ }
20
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-thumb img {
21
+ border-radius: 0;
22
+ box-shadow: none;
23
+ }
24
+
25
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-title {
26
+ font-size: 14px;
27
+ line-height: 14px;
28
+ padding: 10px 0;
29
+ text-align: center;
30
+ }
31
+
32
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart {
33
+ text-align: center;
34
+ }
35
+
36
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart p {
37
+ border: medium none !important;
38
+ }
39
+
40
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart span.amount {
41
+ font-size: 15px;
42
+ line-height: 15px;
43
+ }
44
+
45
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart del{
46
+
47
+ }
48
+
49
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart del span.amount{
50
+
51
+ }
52
+
53
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart ins {
54
+
55
+ }
56
+
57
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart ins span.amount{
58
+
59
+ }
60
+
61
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart span.amount{
62
+
63
+ }
64
+
65
+
66
+
67
+
68
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart .amount,
69
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart del,
70
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart ins{
71
+ display:none; }
72
+
73
+
74
+
75
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart a.add_to_cart_button {
76
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
77
+ border: medium none;
78
+ border-radius: 0;
79
+ box-shadow: none;
80
+ font-size: 12px;
81
+ line-height: 12px;
82
+ margin-top: 15px;
83
+ padding: 10px 15px;
84
+ text-shadow: none;
85
+ }
86
+
87
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart a.added_to_cart {
88
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
89
+ border: medium none;
90
+ border-radius: 0;
91
+ box-shadow: none;
92
+ color: rgb(68, 68, 68);
93
+ font-size: 12px;
94
+ line-height: 12px;
95
+ margin-top: 15px;
96
+ padding: 10px 15px;
97
+ text-decoration: none;
98
+ text-shadow: none;
99
+ }
100
+
101
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-cart a.added {
102
+ display: none;
103
+ }
104
+
105
+
106
+
107
+
108
+
109
+ .wcps-container .wcps-rossi div.wcps-items div.wcps-items-price {
110
+ text-align: center;
111
+ }
112
+
113
+ .wcps-container .wcps-rossi .owl-buttons{}
114
+ .wcps-container .wcps-rossi .owl-controls .owl-buttons .owl-prev {
115
+ background-image: url("images/arrow-prev.png");
116
+ border: 1px solid rgb(221, 221, 221);
117
+ border-radius: 0;
118
+ color: rgb(0, 0, 0);
119
+ padding: 0;
120
+ width: 30px;
121
+ height: 20px;
122
+ }
123
+
124
+
125
+
126
+ .wcps-container .wcps-rossi .owl-controls .owl-buttons .owl-next {
127
+ background-image: url("images/arrow-next.png");
128
+ border: 1px solid rgb(221, 221, 221);
129
+ border-radius: 0;
130
+ color: rgb(0, 0, 0);
131
+ padding: 0;
132
+ width: 30px;
133
+ height: 20px;
134
+ }
135
+
136
+
137
+
138
+ .wcps-container .wcps-rossi .owl-controls .owl-buttons div.owl-prev:hover{
139
+ background-image: url("images/arrow-prev.png") ;
140
+ background-color:#d5d5d5 !important; }
141
+
142
+
143
+ .wcps-container .wcps-rossi .owl-controls .owl-buttons div.owl-next:hover{
144
+ background-image: url("images/arrow-next.png");
145
+ background-color:#d5d5d5 !important; }
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
themes/ruger/images/arrow-next.png ADDED
Binary file
themes/ruger/images/arrow-prev.png ADDED
Binary file
themes/ruger/index.php ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wcps_body_ruger($post_id)
4
+ {
5
+
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
+
8
+
9
+ $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
10
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
11
+ $wcps_total_items = get_post_meta( $post_id, 'wcps_total_items', true );
12
+ $wcps_column_number = get_post_meta( $post_id, 'wcps_column_number', true );
13
+ $wcps_auto_play = get_post_meta( $post_id, 'wcps_auto_play', true );
14
+ $wcps_stop_on_hover = get_post_meta( $post_id, 'wcps_stop_on_hover', true );
15
+ $wcps_slider_navigation = get_post_meta( $post_id, 'wcps_slider_navigation', true );
16
+ $wcps_slide_speed = get_post_meta( $post_id, 'wcps_slide_speed', true );
17
+
18
+ $wcps_slider_pagination = get_post_meta( $post_id, 'wcps_slider_pagination', true );
19
+ $wcps_pagination_slide_speed = get_post_meta( $post_id, 'wcps_pagination_slide_speed', true );
20
+ $wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
21
+
22
+ $wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
23
+
24
+ $wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
25
+ $wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
26
+
27
+ $wcps_content_source = get_post_meta( $post_id, 'wcps_content_source', true );
28
+ $wcps_content_year = get_post_meta( $post_id, 'wcps_content_year', true );
29
+ $wcps_content_month = get_post_meta( $post_id, 'wcps_content_month', true );
30
+ $wcps_content_month_year = get_post_meta( $post_id, 'wcps_content_month_year', true );
31
+
32
+ $wcps_taxonomy = get_post_meta( $post_id, 'wcps_taxonomy', true );
33
+ $wcps_taxonomy_category = get_post_meta( $post_id, 'wcps_taxonomy_category', true );
34
+
35
+
36
+ $wcps_cart_bg = get_post_meta( $post_id, 'wcps_cart_bg', true );
37
+ $wcps_cart_text_color = get_post_meta( $post_id, 'wcps_cart_text_color', true );
38
+
39
+ $wcps_items_title_color = get_post_meta( $post_id, 'wcps_items_title_color', true );
40
+ $wcps_items_title_font_size = get_post_meta( $post_id, 'wcps_items_title_font_size', true );
41
+
42
+ $wcps_items_price_color = get_post_meta( $post_id, 'wcps_items_price_color', true );
43
+ $wcps_items_price_font_size = get_post_meta( $post_id, 'wcps_items_price_font_size', true );
44
+
45
+ $wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
46
+ $wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
47
+
48
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
49
+
50
+
51
+
52
+
53
+ $wcps_body = '';
54
+
55
+ $wcps_body = '<style type="text/css">
56
+
57
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.add_to_cart_button,
58
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.added_to_cart
59
+ {
60
+ background: '.$wcps_cart_bg .';
61
+ color:'.$wcps_cart_text_color.';
62
+ }
63
+
64
+ .wcps-container #wcps-'.$post_id.' div.owl-pagination span.owl-numbers
65
+ {
66
+ background: '.$wcps_slider_pagination_bg .';
67
+ color:'.$wcps_slider_pagination_text_color.';
68
+ }
69
+
70
+
71
+
72
+ </style>';
73
+
74
+ $wcps_body .= '
75
+ <div class="wcps-container" style="background-image:url('.$wcps_bg_img.')">
76
+ <div class="wcps-ribbon wcps-ribbon-'.$wcps_ribbon_name.'" style="background:url('.$wcps_ribbons[$wcps_ribbon_name].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);)"></div>
77
+
78
+ <div id="wcps-'.$post_id.'" class="owl-carousel wcps-'.$wcps_themes.'">
79
+
80
+ ';
81
+
82
+ global $wp_query;
83
+
84
+
85
+
86
+ if(($wcps_content_source=="latest"))
87
+ {
88
+
89
+ $wp_query = new WP_Query(
90
+ array (
91
+ 'post_type' => 'product',
92
+ 'orderby' => 'date',
93
+ 'order' => 'DESC',
94
+ 'posts_per_page' => $wcps_total_items,
95
+
96
+ ) );
97
+
98
+
99
+ }
100
+
101
+ elseif(($wcps_content_source=="older"))
102
+ {
103
+
104
+ $wp_query = new WP_Query(
105
+ array (
106
+ 'post_type' => 'product',
107
+ 'orderby' => 'date',
108
+ 'order' => 'ASC',
109
+ 'posts_per_page' => $wcps_total_items,
110
+
111
+ ) );
112
+
113
+ }
114
+
115
+ elseif(($wcps_content_source=="featured"))
116
+ {
117
+
118
+ $wp_query = new WP_Query(
119
+ array (
120
+ 'post_type' => 'product',
121
+ 'meta_query' => array(
122
+ array(
123
+ 'key' => '_featured',
124
+ 'value' => 'yes',
125
+ )),
126
+ 'posts_per_page' => $wcps_total_items,
127
+
128
+ ) );
129
+
130
+ }
131
+
132
+
133
+ elseif(($wcps_content_source=="year"))
134
+ {
135
+
136
+ $wp_query = new WP_Query(
137
+ array (
138
+ 'post_type' => 'product',
139
+ 'year' => $wcps_content_year,
140
+ 'posts_per_page' => $wcps_total_items,
141
+ ) );
142
+
143
+ }
144
+
145
+ elseif(($wcps_content_source=="month"))
146
+ {
147
+
148
+ $wp_query = new WP_Query(
149
+ array (
150
+ 'post_type' => 'product',
151
+ 'year' => $wcps_content_month_year,
152
+ 'monthnum' => $wcps_content_month,
153
+ 'posts_per_page' => $wcps_total_items,
154
+
155
+ ) );
156
+
157
+ }
158
+
159
+ elseif($wcps_content_source="taxonomy")
160
+ {
161
+ $wp_query = new WP_Query(
162
+ array (
163
+ 'post_type' => 'product',
164
+ 'posts_per_page' => $wcps_total_items,
165
+
166
+ 'tax_query' => array(
167
+ array(
168
+ 'taxonomy' => $wcps_taxonomy,
169
+ 'field' => 'id',
170
+ 'terms' => $wcps_taxonomy_category,
171
+ )
172
+ )
173
+
174
+ ) );
175
+ }
176
+
177
+
178
+
179
+ elseif(($wcps_content_source=="product_id"))
180
+ {
181
+
182
+ $wp_query = new WP_Query(
183
+ array (
184
+ 'post__in' => $wcps_product_ids,
185
+ 'post_type' => 'product',
186
+
187
+
188
+ ) );
189
+
190
+
191
+ }
192
+
193
+
194
+
195
+ if ( $wp_query->have_posts() ) :
196
+
197
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
198
+
199
+ global $product;
200
+
201
+
202
+ $wcps_thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $wcps_items_thumb_size );
203
+
204
+ $wcps_thumb_url = $wcps_thumb['0'];
205
+
206
+ $price = $product->get_price_html();
207
+
208
+ $wcps_body.= '
209
+ <div class="wcps-items" >
210
+
211
+ <div style="max-height:'.$wcps_items_thumb_max_hieght.';" class="wcps-items-thumb"><a href="'.get_permalink().'"><img src="'.$wcps_thumb_url.'" /></a></div>
212
+ <div class="items-info">
213
+ <div class="wcps-items-title" style="color:'.$wcps_items_title_color.';font-size:'.$wcps_items_title_font_size.'">'.get_the_title().'</div>
214
+ <div class="wcps-items-price" style="color:'.$wcps_items_price_color.';font-size:'.$wcps_items_price_font_size.'">'.$price .'</div>
215
+ <div class="wcps-items-cart">'.do_shortcode('[add_to_cart id="'.get_the_ID().'"]').'</div>
216
+ </div>
217
+ </div>';
218
+
219
+ endwhile;
220
+
221
+ wp_reset_query();
222
+ endif;
223
+
224
+
225
+
226
+ $wcps_body .= '</div></div>';
227
+
228
+ $wcps_body .='<script>
229
+ jQuery(document).ready(function($)
230
+ {
231
+ $("#wcps-'.$post_id.'").owlCarousel({
232
+
233
+ items : '.$wcps_column_number.', //10 items above 1000px browser width
234
+ itemsDesktop : [1000,5], //5 items between 1000px and 901px
235
+ itemsDesktopSmall : [900,3], // betweem 900px and 601px
236
+ itemsTablet: [600,2], //2 items between 600 and 0
237
+ itemsMobile : false,
238
+ navigationText : ["",""],
239
+ ';
240
+
241
+
242
+ if($wcps_auto_play=="true")
243
+ {
244
+
245
+ $wcps_body .='autoPlay: '.$wcps_auto_play.',';
246
+
247
+ }
248
+
249
+ if($wcps_stop_on_hover=="true")
250
+ {
251
+
252
+ $wcps_body .='stopOnHover: '.$wcps_stop_on_hover.',';
253
+
254
+ }
255
+
256
+ if($wcps_slider_navigation=="true")
257
+ {
258
+
259
+ $wcps_body .='navigation: '.$wcps_slider_navigation.',';
260
+
261
+ }
262
+
263
+ if(!empty($wcps_slider_pagination))
264
+ {
265
+
266
+ $wcps_body .='pagination: '.$wcps_slider_pagination.',';
267
+
268
+ }
269
+ else
270
+ {
271
+ $wcps_body .='pagination: false,';
272
+ }
273
+
274
+
275
+ if(!empty($wcps_slider_pagination_count))
276
+ {
277
+
278
+ $wcps_body .='paginationNumbers: true,';
279
+
280
+ }
281
+ else
282
+ {
283
+ $wcps_body .='paginationNumbers: false,';
284
+ }
285
+
286
+
287
+
288
+ if(!empty($wcps_slide_speed))
289
+ {
290
+
291
+ $wcps_body .='slideSpeed: '.$wcps_slide_speed.',';
292
+
293
+ }
294
+
295
+
296
+ if(!empty($wcps_pagination_slide_speed))
297
+ {
298
+
299
+ $wcps_body .='paginationSpeed: '.$wcps_pagination_slide_speed.',';
300
+
301
+ }
302
+
303
+
304
+ if(!empty($wcps_slider_touch_drag))
305
+ {
306
+
307
+ $wcps_body .='touchDrag : true,';
308
+
309
+ }
310
+ else
311
+ {
312
+ $wcps_body .='touchDrag: false,';
313
+ }
314
+
315
+
316
+
317
+ if(!empty($wcps_slider_mouse_drag ))
318
+ {
319
+
320
+ $wcps_body .='mouseDrag : true,';
321
+
322
+ }
323
+ else
324
+ {
325
+ $wcps_body .='mouseDrag : false,';
326
+ }
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+ $wcps_body .='});
336
+
337
+ });</script>';
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+ return $wcps_body;
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+ }
themes/ruger/style.css ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+
7
+ .wcps-container .wcps-ruger div.wcps-items {
8
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
9
+ box-shadow: 0 0 4px -3px rgb(0, 0, 0);
10
+ margin: 0 10px;
11
+ position: relative;
12
+ }
13
+
14
+
15
+
16
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-thumb {
17
+ margin-bottom: 10px;
18
+ overflow: hidden;
19
+ text-align: center;
20
+ }
21
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-thumb img {
22
+ border-radius: 0;
23
+ box-shadow: none;
24
+ }
25
+
26
+
27
+ .wcps-container .wcps-ruger div.wcps-items div.items-info {
28
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
29
+ bottom: 0;
30
+ display: block;
31
+ left: 0;
32
+
33
+ position: absolute;
34
+ transform: translateY(500px);
35
+ transition: all 0.8s ease 0s;
36
+ width: 100%;
37
+ }
38
+
39
+ .wcps-container .wcps-ruger div.wcps-items:hover div.items-info{
40
+
41
+ transform: translateY(0px);
42
+ }
43
+
44
+
45
+
46
+
47
+
48
+
49
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-title {
50
+ font-size: 14px;
51
+ line-height: 14px;
52
+ padding: 10px 0;
53
+ text-align: center;
54
+ }
55
+
56
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart {
57
+ text-align: center;
58
+ }
59
+
60
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart p {
61
+ border: medium none !important;
62
+ }
63
+
64
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart span.amount {
65
+ font-size: 15px;
66
+ line-height: 15px;
67
+ }
68
+
69
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart del{
70
+
71
+ }
72
+
73
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart del span.amount{
74
+
75
+ }
76
+
77
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart ins {
78
+
79
+ }
80
+
81
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart ins span.amount{
82
+
83
+ }
84
+
85
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart span.amount{
86
+
87
+ }
88
+
89
+
90
+
91
+
92
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart .amount,
93
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart del,
94
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart ins{
95
+ display:none; }
96
+
97
+
98
+
99
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart a.add_to_cart_button {
100
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
101
+ border: medium none;
102
+ border-radius: 0;
103
+ box-shadow: none;
104
+ font-size: 12px;
105
+ line-height: 12px;
106
+ margin-top: 15px;
107
+ padding: 10px 15px;
108
+ text-shadow: none;
109
+ }
110
+
111
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart a.added_to_cart {
112
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
113
+ border: medium none;
114
+ border-radius: 0;
115
+ box-shadow: none;
116
+ color: rgb(68, 68, 68);
117
+ font-size: 12px;
118
+ line-height: 12px;
119
+ margin-top: 15px;
120
+ padding: 10px 15px;
121
+ text-decoration: none;
122
+ text-shadow: none;
123
+ }
124
+
125
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-cart a.added {
126
+ display: none;
127
+ }
128
+
129
+
130
+
131
+
132
+
133
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-price {
134
+ text-align: center;
135
+ }
136
+
137
+
138
+ .wcps-container .wcps-ruger div.wcps-items div.wcps-items-price span.amount {
139
+ background: #ddd;
140
+ border: 1px solid #fff;
141
+ padding: 4px 10px;
142
+ }
143
+
144
+
145
+ .wcps-container .wcps-ruger .owl-buttons{}
146
+ .wcps-container .wcps-ruger .owl-controls .owl-buttons .owl-prev {
147
+ background-image: url("images/arrow-prev.png");
148
+ border: 1px solid rgb(221, 221, 221);
149
+ border-radius: 0;
150
+ color: rgb(0, 0, 0);
151
+ padding: 0;
152
+ width: 30px;
153
+ height: 20px;
154
+ }
155
+
156
+
157
+
158
+ .wcps-container .wcps-ruger .owl-controls .owl-buttons .owl-next {
159
+ background-image: url("images/arrow-next.png");
160
+ border: 1px solid rgb(221, 221, 221);
161
+ border-radius: 0;
162
+ color: rgb(0, 0, 0);
163
+ padding: 0;
164
+ width: 30px;
165
+ height: 20px;
166
+ }
167
+
168
+
169
+
170
+ .wcps-container .wcps-ruger .owl-controls .owl-buttons div.owl-prev:hover{
171
+ background-image: url("images/arrow-prev.png") ;
172
+ background-color:#d5d5d5 !important; }
173
+
174
+
175
+ .wcps-container .wcps-ruger .owl-controls .owl-buttons div.owl-next:hover{
176
+ background-image: url("images/arrow-next.png");
177
+ background-color:#d5d5d5 !important; }
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
+
themes/saiga/images/arrow-next.png ADDED
Binary file
themes/saiga/images/arrow-prev.png ADDED
Binary file
themes/saiga/index.php ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wcps_body_saiga($post_id)
4
+ {
5
+
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
+
8
+
9
+ $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
10
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
11
+ $wcps_total_items = get_post_meta( $post_id, 'wcps_total_items', true );
12
+ $wcps_column_number = get_post_meta( $post_id, 'wcps_column_number', true );
13
+ $wcps_auto_play = get_post_meta( $post_id, 'wcps_auto_play', true );
14
+ $wcps_stop_on_hover = get_post_meta( $post_id, 'wcps_stop_on_hover', true );
15
+ $wcps_slider_navigation = get_post_meta( $post_id, 'wcps_slider_navigation', true );
16
+ $wcps_slide_speed = get_post_meta( $post_id, 'wcps_slide_speed', true );
17
+
18
+ $wcps_slider_pagination = get_post_meta( $post_id, 'wcps_slider_pagination', true );
19
+ $wcps_pagination_slide_speed = get_post_meta( $post_id, 'wcps_pagination_slide_speed', true );
20
+ $wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
21
+
22
+ $wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
23
+
24
+ $wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
25
+ $wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
26
+
27
+ $wcps_content_source = get_post_meta( $post_id, 'wcps_content_source', true );
28
+ $wcps_content_year = get_post_meta( $post_id, 'wcps_content_year', true );
29
+ $wcps_content_month = get_post_meta( $post_id, 'wcps_content_month', true );
30
+ $wcps_content_month_year = get_post_meta( $post_id, 'wcps_content_month_year', true );
31
+
32
+ $wcps_taxonomy = get_post_meta( $post_id, 'wcps_taxonomy', true );
33
+ $wcps_taxonomy_category = get_post_meta( $post_id, 'wcps_taxonomy_category', true );
34
+
35
+
36
+ $wcps_cart_bg = get_post_meta( $post_id, 'wcps_cart_bg', true );
37
+ $wcps_cart_text_color = get_post_meta( $post_id, 'wcps_cart_text_color', true );
38
+
39
+ $wcps_items_title_color = get_post_meta( $post_id, 'wcps_items_title_color', true );
40
+ $wcps_items_title_font_size = get_post_meta( $post_id, 'wcps_items_title_font_size', true );
41
+
42
+ $wcps_items_price_color = get_post_meta( $post_id, 'wcps_items_price_color', true );
43
+ $wcps_items_price_font_size = get_post_meta( $post_id, 'wcps_items_price_font_size', true );
44
+
45
+ $wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
46
+ $wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
47
+
48
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
49
+
50
+
51
+
52
+
53
+ $wcps_body = '';
54
+ $wcps_body = '<style type="text/css">
55
+
56
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.add_to_cart_button,
57
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.added_to_cart
58
+ {
59
+ background: '.$wcps_cart_bg .';
60
+ color:'.$wcps_cart_text_color.';
61
+ }
62
+
63
+ .wcps-container #wcps-'.$post_id.' div.owl-pagination span.owl-numbers
64
+ {
65
+ background: '.$wcps_slider_pagination_bg .';
66
+ color:'.$wcps_slider_pagination_text_color.';
67
+ }
68
+
69
+
70
+ </style>';
71
+ $wcps_body .= '
72
+ <div class="wcps-container" style="background-image:url('.$wcps_bg_img.')">
73
+ <div class="wcps-ribbon wcps-ribbon-'.$wcps_ribbon_name.'" style="background:url('.$wcps_ribbons[$wcps_ribbon_name].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);)"></div>
74
+
75
+ <div id="wcps-'.$post_id.'" class="owl-carousel wcps-'.$wcps_themes.'">
76
+
77
+ ';
78
+
79
+ global $wp_query;
80
+
81
+
82
+
83
+ if(($wcps_content_source=="latest"))
84
+ {
85
+
86
+ $wp_query = new WP_Query(
87
+ array (
88
+ 'post_type' => 'product',
89
+ 'orderby' => 'date',
90
+ 'order' => 'DESC',
91
+ 'posts_per_page' => $wcps_total_items,
92
+
93
+ ) );
94
+
95
+
96
+ }
97
+
98
+ elseif(($wcps_content_source=="older"))
99
+ {
100
+
101
+ $wp_query = new WP_Query(
102
+ array (
103
+ 'post_type' => 'product',
104
+ 'orderby' => 'date',
105
+ 'order' => 'ASC',
106
+ 'posts_per_page' => $wcps_total_items,
107
+
108
+ ) );
109
+
110
+ }
111
+
112
+ elseif(($wcps_content_source=="featured"))
113
+ {
114
+
115
+ $wp_query = new WP_Query(
116
+ array (
117
+ 'post_type' => 'product',
118
+ 'meta_query' => array(
119
+ array(
120
+ 'key' => '_featured',
121
+ 'value' => 'yes',
122
+ )),
123
+ 'posts_per_page' => $wcps_total_items,
124
+
125
+ ) );
126
+
127
+ }
128
+
129
+
130
+ elseif(($wcps_content_source=="year"))
131
+ {
132
+
133
+ $wp_query = new WP_Query(
134
+ array (
135
+ 'post_type' => 'product',
136
+ 'year' => $wcps_content_year,
137
+ 'posts_per_page' => $wcps_total_items,
138
+ ) );
139
+
140
+ }
141
+
142
+ elseif(($wcps_content_source=="month"))
143
+ {
144
+
145
+ $wp_query = new WP_Query(
146
+ array (
147
+ 'post_type' => 'product',
148
+ 'year' => $wcps_content_month_year,
149
+ 'monthnum' => $wcps_content_month,
150
+ 'posts_per_page' => $wcps_total_items,
151
+
152
+ ) );
153
+
154
+ }
155
+
156
+ elseif($wcps_content_source="taxonomy")
157
+ {
158
+ $wp_query = new WP_Query(
159
+ array (
160
+ 'post_type' => 'product',
161
+ 'posts_per_page' => $wcps_total_items,
162
+
163
+ 'tax_query' => array(
164
+ array(
165
+ 'taxonomy' => $wcps_taxonomy,
166
+ 'field' => 'id',
167
+ 'terms' => $wcps_taxonomy_category,
168
+ )
169
+ )
170
+
171
+ ) );
172
+ }
173
+
174
+
175
+
176
+ elseif(($wcps_content_source=="product_id"))
177
+ {
178
+
179
+ $wp_query = new WP_Query(
180
+ array (
181
+ 'post__in' => $wcps_product_ids,
182
+ 'post_type' => 'product',
183
+
184
+
185
+ ) );
186
+
187
+
188
+ }
189
+
190
+
191
+
192
+ if ( $wp_query->have_posts() ) :
193
+
194
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
195
+
196
+ global $product;
197
+
198
+
199
+ $wcps_thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $wcps_items_thumb_size );
200
+
201
+ $wcps_thumb_url = $wcps_thumb['0'];
202
+
203
+ $price = $product->get_price_html();
204
+
205
+ $wcps_body.= '
206
+ <div class="wcps-items" >
207
+
208
+ <div class="items-info">
209
+ <div class="wcps-items-title" style="color:'.$wcps_items_title_color.';font-size:'.$wcps_items_title_font_size.'">'.get_the_title().'</div>
210
+ <div class="wcps-items-price" style="color:'.$wcps_items_price_color.';font-size:'.$wcps_items_price_font_size.'">'.$price .'</div>
211
+ <div class="wcps-items-cart">'.do_shortcode('[add_to_cart id="'.get_the_ID().'"]').'</div>
212
+ </div>
213
+ <div style="max-height:'.$wcps_items_thumb_max_hieght.';" class="wcps-items-thumb"><a href="'.get_permalink().'"><img src="'.$wcps_thumb_url.'" /></a></div>
214
+ </div>';
215
+
216
+ endwhile;
217
+
218
+ wp_reset_query();
219
+ endif;
220
+
221
+
222
+
223
+ $wcps_body .= '</div></div>';
224
+
225
+ $wcps_body .='<script>
226
+ jQuery(document).ready(function($)
227
+ {
228
+ $("#wcps-'.$post_id.'").owlCarousel({
229
+
230
+ items : '.$wcps_column_number.', //10 items above 1000px browser width
231
+ itemsDesktop : [1000,5], //5 items between 1000px and 901px
232
+ itemsDesktopSmall : [900,3], // betweem 900px and 601px
233
+ itemsTablet: [600,2], //2 items between 600 and 0
234
+ itemsMobile : false,
235
+ navigationText : ["",""],
236
+ ';
237
+
238
+
239
+ if($wcps_auto_play=="true")
240
+ {
241
+
242
+ $wcps_body .='autoPlay: '.$wcps_auto_play.',';
243
+
244
+ }
245
+
246
+ if($wcps_stop_on_hover=="true")
247
+ {
248
+
249
+ $wcps_body .='stopOnHover: '.$wcps_stop_on_hover.',';
250
+
251
+ }
252
+
253
+ if($wcps_slider_navigation=="true")
254
+ {
255
+
256
+ $wcps_body .='navigation: '.$wcps_slider_navigation.',';
257
+
258
+ }
259
+
260
+ if(!empty($wcps_slider_pagination))
261
+ {
262
+
263
+ $wcps_body .='pagination: '.$wcps_slider_pagination.',';
264
+
265
+ }
266
+ else
267
+ {
268
+ $wcps_body .='pagination: false,';
269
+ }
270
+
271
+
272
+ if(!empty($wcps_slider_pagination_count))
273
+ {
274
+
275
+ $wcps_body .='paginationNumbers: true,';
276
+
277
+ }
278
+ else
279
+ {
280
+ $wcps_body .='paginationNumbers: false,';
281
+ }
282
+
283
+
284
+
285
+ if(!empty($wcps_slide_speed))
286
+ {
287
+
288
+ $wcps_body .='slideSpeed: '.$wcps_slide_speed.',';
289
+
290
+ }
291
+
292
+
293
+ if(!empty($wcps_pagination_slide_speed))
294
+ {
295
+
296
+ $wcps_body .='paginationSpeed: '.$wcps_pagination_slide_speed.',';
297
+
298
+ }
299
+
300
+
301
+ if(!empty($wcps_slider_touch_drag))
302
+ {
303
+
304
+ $wcps_body .='touchDrag : true,';
305
+
306
+ }
307
+ else
308
+ {
309
+ $wcps_body .='touchDrag: false,';
310
+ }
311
+
312
+
313
+
314
+ if(!empty($wcps_slider_mouse_drag ))
315
+ {
316
+
317
+ $wcps_body .='mouseDrag : true,';
318
+
319
+ }
320
+ else
321
+ {
322
+ $wcps_body .='mouseDrag : false,';
323
+ }
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ $wcps_body .='});
333
+
334
+ });</script>';
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ return $wcps_body;
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+ }
themes/saiga/style.css ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+
7
+ .wcps-container .wcps-saiga div.wcps-items {
8
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
9
+ box-shadow: 0 0 4px -3px rgb(0, 0, 0);
10
+ margin: 0 10px;
11
+ }
12
+
13
+ .wcps-container .wcps-saiga div.wcps-items div.items-info{}
14
+
15
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-thumb {
16
+ overflow: hidden;
17
+ text-align: center;
18
+ }
19
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-thumb img {
20
+ border-radius: 0;
21
+ box-shadow: none;
22
+ }
23
+
24
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-title {
25
+ font-size: 14px;
26
+ line-height: 14px;
27
+ padding: 20px 0 10px;
28
+ text-align: center;
29
+ }
30
+
31
+
32
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-price{}
33
+
34
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-price span.amount{}
35
+
36
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart {
37
+ text-align: center;
38
+ }
39
+
40
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart p {
41
+ border: medium none !important;
42
+ }
43
+
44
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart span.amount {
45
+ font-size: 15px;
46
+ line-height: 15px;
47
+ }
48
+
49
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart del{
50
+
51
+ }
52
+
53
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-price span.amount {
54
+ background: none repeat scroll 0 0 #e9e9e9;
55
+ border: 1px solid #ddd;
56
+ border-radius: 3px;
57
+ padding: 3px 10px;
58
+ }
59
+
60
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-price span.amount:hover {
61
+ border: 1px solid #888;
62
+ cursor:pointer;
63
+
64
+ }
65
+
66
+
67
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart ins {
68
+
69
+ }
70
+
71
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart ins span.amount{
72
+
73
+ }
74
+
75
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart span.amount{
76
+
77
+ }
78
+
79
+
80
+
81
+
82
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart .amount,
83
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart del,
84
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart ins{
85
+ display:none; }
86
+
87
+
88
+
89
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart a.add_to_cart_button {
90
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
91
+ border: 1px solid rgba(0,0,0,0);
92
+ border-radius: 0;
93
+ box-shadow: none;
94
+ font-size: 12px;
95
+ line-height: 12px;
96
+ margin-top: 10px;
97
+ padding: 10px 15px;
98
+ text-shadow: none;
99
+ }
100
+
101
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart a.add_to_cart_button:hover{
102
+ border: 1px solid #888;
103
+ }
104
+
105
+
106
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart a.added_to_cart {
107
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
108
+ border: medium none;
109
+ border-radius: 0;
110
+ box-shadow: none;
111
+ color: rgb(68, 68, 68);
112
+ font-size: 12px;
113
+ line-height: 12px;
114
+ margin-top: 15px;
115
+ padding: 10px 15px;
116
+ text-decoration: none;
117
+ text-shadow: none;
118
+ }
119
+
120
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-cart a.added {
121
+ display: none;
122
+ }
123
+
124
+
125
+
126
+
127
+
128
+ .wcps-container .wcps-saiga div.wcps-items div.wcps-items-price {
129
+ text-align: center;
130
+ }
131
+
132
+ .wcps-container .wcps-saiga .owl-buttons{}
133
+ .wcps-container .wcps-saiga .owl-controls .owl-buttons .owl-prev {
134
+ background-image: url("images/arrow-prev.png");
135
+ border: 1px solid rgb(221, 221, 221);
136
+ border-radius: 0;
137
+ color: rgb(0, 0, 0);
138
+ padding: 0;
139
+ width: 30px;
140
+ height: 20px;
141
+ }
142
+
143
+
144
+
145
+ .wcps-container .wcps-saiga .owl-controls .owl-buttons .owl-next {
146
+ background-image: url("images/arrow-next.png");
147
+ border: 1px solid rgb(221, 221, 221);
148
+ border-radius: 0;
149
+ color: rgb(0, 0, 0);
150
+ padding: 0;
151
+ width: 30px;
152
+ height: 20px;
153
+ }
154
+
155
+
156
+
157
+ .wcps-container .wcps-saiga .owl-controls .owl-buttons div.owl-prev:hover{
158
+ background-image: url("images/arrow-prev.png") ;
159
+ background-color:#d5d5d5 !important; }
160
+
161
+
162
+ .wcps-container .wcps-saiga .owl-controls .owl-buttons div.owl-next:hover{
163
+ background-image: url("images/arrow-next.png");
164
+ background-color:#d5d5d5 !important; }
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
+
themes/sako/images/arrow-next.png ADDED
Binary file
themes/sako/images/arrow-prev.png ADDED
Binary file
themes/sako/index.php ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wcps_body_sako($post_id)
4
+ {
5
+
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
+
8
+
9
+ $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
10
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
11
+ $wcps_total_items = get_post_meta( $post_id, 'wcps_total_items', true );
12
+ $wcps_column_number = get_post_meta( $post_id, 'wcps_column_number', true );
13
+ $wcps_auto_play = get_post_meta( $post_id, 'wcps_auto_play', true );
14
+ $wcps_stop_on_hover = get_post_meta( $post_id, 'wcps_stop_on_hover', true );
15
+ $wcps_slider_navigation = get_post_meta( $post_id, 'wcps_slider_navigation', true );
16
+ $wcps_slide_speed = get_post_meta( $post_id, 'wcps_slide_speed', true );
17
+
18
+ $wcps_slider_pagination = get_post_meta( $post_id, 'wcps_slider_pagination', true );
19
+ $wcps_pagination_slide_speed = get_post_meta( $post_id, 'wcps_pagination_slide_speed', true );
20
+ $wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
21
+
22
+ $wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
23
+
24
+ $wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
25
+ $wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
26
+
27
+ $wcps_content_source = get_post_meta( $post_id, 'wcps_content_source', true );
28
+ $wcps_content_year = get_post_meta( $post_id, 'wcps_content_year', true );
29
+ $wcps_content_month = get_post_meta( $post_id, 'wcps_content_month', true );
30
+ $wcps_content_month_year = get_post_meta( $post_id, 'wcps_content_month_year', true );
31
+
32
+ $wcps_taxonomy = get_post_meta( $post_id, 'wcps_taxonomy', true );
33
+ $wcps_taxonomy_category = get_post_meta( $post_id, 'wcps_taxonomy_category', true );
34
+
35
+
36
+ $wcps_cart_bg = get_post_meta( $post_id, 'wcps_cart_bg', true );
37
+ $wcps_cart_text_color = get_post_meta( $post_id, 'wcps_cart_text_color', true );
38
+
39
+ $wcps_items_title_color = get_post_meta( $post_id, 'wcps_items_title_color', true );
40
+ $wcps_items_title_font_size = get_post_meta( $post_id, 'wcps_items_title_font_size', true );
41
+
42
+ $wcps_items_price_color = get_post_meta( $post_id, 'wcps_items_price_color', true );
43
+ $wcps_items_price_font_size = get_post_meta( $post_id, 'wcps_items_price_font_size', true );
44
+
45
+ $wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
46
+ $wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
47
+
48
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
49
+
50
+
51
+
52
+
53
+ $wcps_body = '';
54
+ $wcps_body = '<style type="text/css">
55
+
56
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.add_to_cart_button,
57
+ .wcps-container #wcps-'.$post_id.' div.wcps-items-cart a.added_to_cart
58
+ {
59
+ background: '.$wcps_cart_bg.';
60
+ color:'.$wcps_cart_text_color.';
61
+ }
62
+
63
+ .wcps-container #wcps-'.$post_id.' div.owl-pagination span.owl-numbers
64
+ {
65
+ background: '.$wcps_slider_pagination_bg .';
66
+ color:'.$wcps_slider_pagination_text_color.';
67
+ }
68
+
69
+ </style>';
70
+
71
+ $wcps_body .= '
72
+ <div class="wcps-container" style="background-image:url('.$wcps_bg_img.')">
73
+ <div class="wcps-ribbon wcps-ribbon-'.$wcps_ribbon_name.'" style="background:url('.$wcps_ribbons[$wcps_ribbon_name].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);)"></div>
74
+
75
+ <div id="wcps-'.$post_id.'" class="owl-carousel wcps-'.$wcps_themes.'">
76
+
77
+ ';
78
+
79
+ global $wp_query;
80
+
81
+
82
+ if(($wcps_content_source=="latest"))
83
+ {
84
+
85
+ $wp_query = new WP_Query(
86
+ array (
87
+ 'post_type' => 'product',
88
+ 'orderby' => 'date',
89
+ 'order' => 'DESC',
90
+ 'posts_per_page' => $wcps_total_items,
91
+
92
+ ) );
93
+
94
+
95
+ }
96
+
97
+ elseif(($wcps_content_source=="older"))
98
+ {
99
+
100
+ $wp_query = new WP_Query(
101
+ array (
102
+ 'post_type' => 'product',
103
+ 'orderby' => 'date',
104
+ 'order' => 'ASC',
105
+ 'posts_per_page' => $wcps_total_items,
106
+
107
+ ) );
108
+
109
+ }
110
+
111
+ elseif(($wcps_content_source=="featured"))
112
+ {
113
+
114
+ $wp_query = new WP_Query(
115
+ array (
116
+ 'post_type' => 'product',
117
+ 'meta_query' => array(
118
+ array(
119
+ 'key' => '_featured',
120
+ 'value' => 'yes',
121
+ )),
122
+ 'posts_per_page' => $wcps_total_items,
123
+
124
+ ) );
125
+
126
+ }
127
+
128
+
129
+ elseif(($wcps_content_source=="year"))
130
+ {
131
+
132
+ $wp_query = new WP_Query(
133
+ array (
134
+ 'post_type' => 'product',
135
+ 'year' => $wcps_content_year,
136
+ 'posts_per_page' => $wcps_total_items,
137
+ ) );
138
+
139
+ }
140
+
141
+ elseif(($wcps_content_source=="month"))
142
+ {
143
+
144
+ $wp_query = new WP_Query(
145
+ array (
146
+ 'post_type' => 'product',
147
+ 'year' => $wcps_content_month_year,
148
+ 'monthnum' => $wcps_content_month,
149
+ 'posts_per_page' => $wcps_total_items,
150
+
151
+ ) );
152
+
153
+ }
154
+
155
+ elseif($wcps_content_source="taxonomy")
156
+ {
157
+ $wp_query = new WP_Query(
158
+ array (
159
+ 'post_type' => 'product',
160
+ 'posts_per_page' => $wcps_total_items,
161
+
162
+ 'tax_query' => array(
163
+ array(
164
+ 'taxonomy' => $wcps_taxonomy,
165
+ 'field' => 'id',
166
+ 'terms' => $wcps_taxonomy_category,
167
+ )
168
+ )
169
+
170
+ ) );
171
+ }
172
+
173
+
174
+
175
+ elseif(($wcps_content_source=="product_id"))
176
+ {
177
+
178
+ $wp_query = new WP_Query(
179
+ array (
180
+ 'post__in' => $wcps_product_ids,
181
+ 'post_type' => 'product',
182
+
183
+
184
+ ) );
185
+
186
+
187
+ }
188
+
189
+
190
+
191
+ if ( $wp_query->have_posts() ) :
192
+
193
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
194
+
195
+ global $product;
196
+
197
+
198
+ $wcps_thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $wcps_items_thumb_size );
199
+
200
+ $wcps_thumb_url = $wcps_thumb['0'];
201
+
202
+ $price = $product->get_price_html();
203
+
204
+ $wcps_body.= '
205
+ <div class="wcps-items" >
206
+
207
+ <div style="max-height:'.$wcps_items_thumb_max_hieght.';" class="wcps-items-thumb"><a href="'.get_permalink().'"><img src="'.$wcps_thumb_url.'" /></a></div>
208
+ <div class="items-info">
209
+ <div class="wcps-items-title" style="color:'.$wcps_items_title_color.';font-size:'.$wcps_items_title_font_size.'">'.get_the_title().'</div>
210
+ <div class="wcps-items-price" style="color:'.$wcps_items_price_color.';font-size:'.$wcps_items_price_font_size.'">'.$price .'</div>
211
+ <div class="wcps-items-cart">'.do_shortcode('[add_to_cart id="'.get_the_ID().'"]').'</div>
212
+ </div>
213
+ </div>';
214
+
215
+ endwhile;
216
+
217
+ wp_reset_query();
218
+ endif;
219
+
220
+
221
+
222
+ $wcps_body .= '</div></div>';
223
+
224
+ $wcps_body .='<script>
225
+ jQuery(document).ready(function($)
226
+ {
227
+ $("#wcps-'.$post_id.'").owlCarousel({
228
+
229
+ items : '.$wcps_column_number.', //10 items above 1000px browser width
230
+ itemsDesktop : [1000,5], //5 items between 1000px and 901px
231
+ itemsDesktopSmall : [900,3], // betweem 900px and 601px
232
+ itemsTablet: [600,2], //2 items between 600 and 0
233
+ itemsMobile : false,
234
+ navigationText : ["",""],
235
+ ';
236
+
237
+
238
+ if($wcps_auto_play=="true")
239
+ {
240
+
241
+ $wcps_body .='autoPlay: '.$wcps_auto_play.',';
242
+
243
+ }
244
+
245
+ if($wcps_stop_on_hover=="true")
246
+ {
247
+
248
+ $wcps_body .='stopOnHover: '.$wcps_stop_on_hover.',';
249
+
250
+ }
251
+
252
+ if($wcps_slider_navigation=="true")
253
+ {
254
+
255
+ $wcps_body .='navigation: '.$wcps_slider_navigation.',';
256
+
257
+ }
258
+
259
+ if(!empty($wcps_slider_pagination))
260
+ {
261
+
262
+ $wcps_body .='pagination: '.$wcps_slider_pagination.',';
263
+
264
+ }
265
+ else
266
+ {
267
+ $wcps_body .='pagination: false,';
268
+ }
269
+
270
+
271
+ if(!empty($wcps_slider_pagination_count))
272
+ {
273
+
274
+ $wcps_body .='paginationNumbers: true,';
275
+
276
+ }
277
+ else
278
+ {
279
+ $wcps_body .='paginationNumbers: false,';
280
+ }
281
+
282
+
283
+
284
+ if(!empty($wcps_slide_speed))
285
+ {
286
+
287
+ $wcps_body .='slideSpeed: '.$wcps_slide_speed.',';
288
+
289
+ }
290
+
291
+
292
+ if(!empty($wcps_pagination_slide_speed))
293
+ {
294
+
295
+ $wcps_body .='paginationSpeed: '.$wcps_pagination_slide_speed.',';
296
+
297
+ }
298
+
299
+
300
+ if(!empty($wcps_slider_touch_drag))
301
+ {
302
+
303
+ $wcps_body .='touchDrag : true,';
304
+
305
+ }
306
+ else
307
+ {
308
+ $wcps_body .='touchDrag: false,';
309
+ }
310
+
311
+
312
+
313
+ if(!empty($wcps_slider_mouse_drag ))
314
+ {
315
+
316
+ $wcps_body .='mouseDrag : true,';
317
+
318
+ }
319
+ else
320
+ {
321
+ $wcps_body .='mouseDrag : false,';
322
+ }
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+ $wcps_body .='});
332
+
333
+ });</script>';
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+ return $wcps_body;
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ }
themes/sako/style.css ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+
7
+ .wcps-container .wcps-sako div.wcps-items {
8
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
9
+ box-shadow: 0 0 4px -3px rgb(0, 0, 0);
10
+ margin: 0 10px;
11
+ position: relative;
12
+ }
13
+
14
+
15
+
16
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-thumb {
17
+ margin-bottom: 10px;
18
+ overflow: hidden;
19
+ text-align: center;
20
+ }
21
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-thumb img {
22
+ border-radius: 0;
23
+ box-shadow: none;
24
+ }
25
+
26
+
27
+ .wcps-container .wcps-sako div.wcps-items div.items-info {
28
+ background:none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
29
+ bottom: 0;
30
+ display: block;
31
+ left: 0;
32
+ position: absolute;
33
+ width: 100%;
34
+ opacity:0;
35
+ transition: all 0.7s ease 0s;
36
+
37
+
38
+ }
39
+
40
+ .wcps-container .wcps-sako div.wcps-items:hover div.items-info{
41
+ opacity:1;
42
+ }
43
+
44
+
45
+
46
+
47
+
48
+
49
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-title {
50
+ font-size: 14px;
51
+ line-height: 14px;
52
+ padding: 10px 0;
53
+ text-align: center;
54
+ }
55
+
56
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart {
57
+ text-align: center;
58
+ }
59
+
60
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart p {
61
+ border: medium none !important;
62
+ }
63
+
64
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart span.amount {
65
+ font-size: 15px;
66
+ line-height: 15px;
67
+ }
68
+
69
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart del{
70
+
71
+ }
72
+
73
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart del span.amount{
74
+
75
+ }
76
+
77
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart ins {
78
+
79
+ }
80
+
81
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart ins span.amount{
82
+
83
+ }
84
+
85
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart span.amount{
86
+
87
+ }
88
+
89
+
90
+
91
+
92
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart .amount,
93
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart del,
94
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart ins{
95
+ display:none; }
96
+
97
+
98
+
99
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart a.add_to_cart_button {
100
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
101
+ border: medium none;
102
+ border-radius: 0;
103
+ box-shadow: none;
104
+ font-size: 12px;
105
+ line-height: 12px;
106
+ margin-top: 15px;
107
+ padding: 10px 15px;
108
+ text-shadow: none;
109
+ }
110
+
111
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart a.added_to_cart {
112
+ background: none repeat scroll 0 0 rgb(13, 225, 133);
113
+ border: medium none;
114
+ border-radius: 0;
115
+ box-shadow: none;
116
+ color: rgb(68, 68, 68);
117
+ font-size: 12px;
118
+ line-height: 12px;
119
+ margin-top: 15px;
120
+ padding: 10px 15px;
121
+ text-decoration: none;
122
+ text-shadow: none;
123
+ }
124
+
125
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-cart a.added {
126
+ display: none;
127
+ }
128
+
129
+
130
+
131
+
132
+
133
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-price {
134
+ text-align: center;
135
+ }
136
+
137
+
138
+ .wcps-container .wcps-sako div.wcps-items div.wcps-items-price span.amount {
139
+ background: #ddd;
140
+ border: 1px solid #fff;
141
+ padding: 4px 10px;
142
+ }
143
+
144
+
145
+ .wcps-container .wcps-sako .owl-buttons{}
146
+ .wcps-container .wcps-sako .owl-controls .owl-buttons .owl-prev {
147
+ background-image: url("images/arrow-prev.png");
148
+ border: 1px solid rgb(221, 221, 221);
149
+ border-radius: 0;
150
+ color: rgb(0, 0, 0);
151
+ padding: 0;
152
+ width: 30px;
153
+ height: 20px;
154
+ }
155
+
156
+
157
+
158
+ .wcps-container .wcps-sako .owl-controls .owl-buttons .owl-next {
159
+ background-image: url("images/arrow-next.png");
160
+ border: 1px solid rgb(221, 221, 221);
161
+ border-radius: 0;
162
+ color: rgb(0, 0, 0);
163
+ padding: 0;
164
+ width: 30px;
165
+ height: 20px;
166
+ }
167
+
168
+
169
+
170
+ .wcps-container .wcps-sako .owl-controls .owl-buttons div.owl-prev:hover{
171
+ background-image: url("images/arrow-prev.png") ;
172
+ background-color:#d5d5d5 !important; }
173
+
174
+
175
+ .wcps-container .wcps-sako .owl-controls .owl-buttons div.owl-next:hover{
176
+ background-image: url("images/arrow-next.png");
177
+ background-color:#d5d5d5 !important; }
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
+
wcps-help.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php echo "<h2>".__('Woocommerce Products Slider Help')."</h2>";?>
3
+ <br />
4
+
5
+
6
+
7
+
8
+ <h3>Have any issue ?</h3>
9
+
10
+ <p>Feel free to Contact with any issue for this plugin <a href="http://wordpress.org/support/plugin/woocommerce-products-slider/">http://wordpress.org/support/plugin/woocommerce-products-slider/</a>
11
+ </p>
12
+
13
+ <?php
14
+
15
+ $wcps_customer_type = get_option('wcps_customer_type');
16
+ $wcps_version = get_option('wcps_version');
17
+
18
+
19
+ ?>
20
+ <?php
21
+ if($wcps_customer_type=="free")
22
+ {
23
+ echo '<p>You are using <strong> '.$wcps_customer_type.' version '.$wcps_version.'</strong> of Woocommerce Products Slider, To get more feature you could try our premium version. </p>';
24
+ }
25
+ elseif($wcps_customer_type=="pro")
26
+ {
27
+ echo '<p>Thanks for using <strong> '.$wcps_customer_type.' version '.$wcps_version.'</strong> of wcps </p>';
28
+ }
29
+
30
+ ?>
31
+
32
+
33
+
34
+
35
+ <?php
36
+ if($wcps_customer_type=="free")
37
+ {
38
+ ?>
39
+ <br />
40
+ <b>Premium Version Features</b><br />
41
+
42
+ <ul class="wcps-pro-features">
43
+
44
+ <li>Life Time Automatic Update.</li>
45
+ <li>Life Time Support via forum.</li>
46
+ <li>7 Days Refund.</li>
47
+ <li>Unlimited slider anywhere.</li>
48
+ <li>Fully responsive and mobile ready.</li>
49
+ <li>Query product by Taxonomy and Categories.</li>
50
+ <li>Query product by Product id.</li>
51
+ <li>Amazing extra 4 themes.</li>
52
+ <li>Slider Items Title Color.</li>
53
+ <li>Slider Items Price Color.</li>
54
+ <li>Slider Custom ribbons.</li>
55
+
56
+
57
+ </ul>
58
+
59
+
60
+
61
+ </p>
62
+
63
+
64
+
65
+ <?php
66
+ }
67
+
68
+ ?>
69
+
70
+ <br />
71
+ <h3>Please share this plugin with your friends?</h3>
72
+ <table>
73
+ <tr>
74
+ <td width="100px">
75
+ <!-- Place this tag in your head or just before your close body tag. -->
76
+ <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script>
77
+
78
+ <!-- Place this tag where you want the +1 button to render. -->
79
+ <div class="g-plusone" data-size="medium" data-href="http://wordpress.org/plugins/woocommerce-products-slider/"></div>
80
+
81
+ </td>
82
+ <td width="100px">
83
+ <iframe src="//www.facebook.com/plugins/like.php?href=http://wordpress.org/plugins/woocommerce-products-slider/&amp;width=100&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=21&amp;appId=743541755673761" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
84
+
85
+ </td>
86
+ <td width="100px">
87
+
88
+
89
+
90
+
91
+
92
+ <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wordpress.org/plugins/woocommerce-products-slider/" data-text="Timeline Pro – Responsive Timeline for WordPres">Tweet</a>
93
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
94
+ </td>
95
+
96
+ </tr>
97
+
98
+ </table>
99
+
100
+
101
+
102
+ </div>
103
+ <style type="text/css">
104
+ .wcps-pro-features{}
105
+
106
+ .wcps-pro-features li {
107
+ list-style: disc inside none;
108
+ }
109
+
110
+ </style>
wcps-settings.php ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if(empty($_POST['wcps_hidden']))
4
+ {
5
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
6
+
7
+
8
+ }
9
+ else
10
+ {
11
+
12
+
13
+ if($_POST['wcps_hidden'] == 'Y') {
14
+ //Form data sent
15
+
16
+ $wcps_ribbons = stripslashes_deep($_POST['wcps_ribbons']);
17
+ update_option('wcps_ribbons', $wcps_ribbons);
18
+
19
+
20
+
21
+
22
+
23
+ ?>
24
+ <div class="updated"><p><strong><?php _e('Changes Saved.' ); ?></strong></p></div>
25
+
26
+ <?php
27
+ }
28
+ }
29
+ ?>
30
+
31
+
32
+
33
+
34
+
35
+ <div class="wrap">
36
+
37
+ <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__('wcps Settings')."</h2>";?>
38
+ <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
39
+ <input type="hidden" name="wcps_hidden" value="Y">
40
+ <?php settings_fields( 'wcps_plugin_options' );
41
+ do_settings_sections( 'wcps_plugin_options' );
42
+
43
+ ?>
44
+
45
+
46
+
47
+
48
+ <table class="form-table">
49
+
50
+
51
+
52
+
53
+
54
+ <tr valign="top">
55
+ <td style="vertical-align:middle;">
56
+ <strong>Ribbons</strong><br /><br />
57
+ <span style=" color:#22aa5d;font-size: 12px;">You can use your own ribbons icon by inserting ribbon url to text field, image size for ribbons must be same as 90px × 24px</span>
58
+ <table>
59
+
60
+ <tr>
61
+ <td>Best</td>
62
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["best"])) echo wcps_plugin_url."css/ribbons/best.png"; else echo $wcps_ribbons["best"]; ?>" /></td>
63
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[best]" type="text" value="<?php if(empty($wcps_ribbons["best"])) echo wcps_plugin_url."css/ribbons/best.png"; else echo $wcps_ribbons["best"]; ?>" /></td>
64
+ </tr>
65
+
66
+
67
+
68
+ <tr>
69
+ <td>Discount 10%</td>
70
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-10"])) echo wcps_plugin_url."css/ribbons/dis-10.png"; else echo $wcps_ribbons["dis-10"]; ?>" /></td>
71
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-10]" type="text" value="<?php if(empty($wcps_ribbons["dis-10"])) echo wcps_plugin_url."css/ribbons/dis-10.png"; else echo $wcps_ribbons["dis-10"]; ?>" /></td>
72
+ </tr>
73
+
74
+
75
+
76
+
77
+ <tr>
78
+ <td>Discount 20%</td>
79
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-20"])) echo wcps_plugin_url."css/ribbons/dis-20.png"; else echo $wcps_ribbons["dis-20"]; ?>" /></td>
80
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-20]" type="text" value="<?php if(empty($wcps_ribbons["dis-20"])) echo wcps_plugin_url."css/ribbons/dis-20.png"; else echo $wcps_ribbons["dis-20"]; ?>" /></td>
81
+ </tr>
82
+
83
+
84
+ <tr>
85
+ <td>Discount 30%</td>
86
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-30"])) echo wcps_plugin_url."css/ribbons/dis-30.png"; else echo $wcps_ribbons["dis-30"]; ?>" /></td>
87
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-30]" type="text" value="<?php if(empty($wcps_ribbons["dis-30"])) echo wcps_plugin_url."css/ribbons/dis-30.png"; else echo $wcps_ribbons["dis-30"]; ?>" /></td>
88
+ </tr>
89
+
90
+
91
+ <tr>
92
+ <td>Discount 40%</td>
93
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-40"])) echo wcps_plugin_url."css/ribbons/dis-40.png"; else echo $wcps_ribbons["dis-40"]; ?>" /></td>
94
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-40]" type="text" value="<?php if(empty($wcps_ribbons["dis-40"])) echo wcps_plugin_url."css/ribbons/dis-40.png"; else echo $wcps_ribbons["dis-40"]; ?>" /></td>
95
+ </tr>
96
+
97
+
98
+ <tr>
99
+ <td>Discount 50%</td>
100
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-50"])) echo wcps_plugin_url."css/ribbons/dis-50.png"; else echo $wcps_ribbons["dis-50"]; ?>" /></td>
101
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-50]" type="text" value="<?php if(empty($wcps_ribbons["dis-50"])) echo wcps_plugin_url."css/ribbons/dis-50.png"; else echo $wcps_ribbons["dis-50"]; ?>" /></td>
102
+ </tr>
103
+
104
+
105
+
106
+ <tr>
107
+ <td>Discount 60%</td>
108
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-60"])) echo wcps_plugin_url."css/ribbons/dis-60.png"; else echo $wcps_ribbons["dis-60"]; ?>" /></td>
109
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-60]" type="text" value="<?php if(empty($wcps_ribbons["dis-60"])) echo wcps_plugin_url."css/ribbons/dis-60.png"; else echo $wcps_ribbons["dis-60"]; ?>" /></td>
110
+ </tr>
111
+
112
+
113
+
114
+
115
+ <tr>
116
+ <td>Discount 70%</td>
117
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-70"])) echo wcps_plugin_url."css/ribbons/dis-70.png"; else echo $wcps_ribbons["dis-70"]; ?>" /></td>
118
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-70]" type="text" value="<?php if(empty($wcps_ribbons["dis-70"])) echo wcps_plugin_url."css/ribbons/dis-70.png"; else echo $wcps_ribbons["dis-70"]; ?>" /></td>
119
+ </tr>
120
+
121
+
122
+
123
+
124
+ <tr>
125
+ <td>Discount 80%</td>
126
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-80"])) echo wcps_plugin_url."css/ribbons/dis-80.png"; else echo $wcps_ribbons["dis-80"]; ?>" /></td>
127
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-80]" type="text" value="<?php if(empty($wcps_ribbons["dis-80"])) echo wcps_plugin_url."css/ribbons/dis-80.png"; else echo $wcps_ribbons["dis-80"]; ?>" /></td>
128
+ </tr>
129
+
130
+
131
+
132
+ <tr>
133
+ <td>Discount 90%</td>
134
+ <td><img title="size - 90px * 24px " src="<?php if(empty($wcps_ribbons["dis-90"])) echo wcps_plugin_url."css/ribbons/dis-90.png"; else echo $wcps_ribbons["dis-90"]; ?>" /></td>
135
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-90]" type="text" value="<?php if(empty($wcps_ribbons["dis-90"])) echo wcps_plugin_url."css/ribbons/dis-90.png"; else echo $wcps_ribbons["dis-90"]; ?>" /></td>
136
+ </tr>
137
+
138
+
139
+
140
+ <tr>
141
+ <td>Discount 100%</td>
142
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["dis-100"])) echo wcps_plugin_url."css/ribbons/dis-100.png"; else echo $wcps_ribbons["dis-100"]; ?>" /></td>
143
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[dis-100]" type="text" value="<?php if(empty($wcps_ribbons["dis-100"])) echo wcps_plugin_url."css/ribbons/dis-100.png"; else echo $wcps_ribbons["dis-100"]; ?>" /></td>
144
+ </tr>
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <tr>
153
+ <td>Free</td>
154
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["free"])) echo wcps_plugin_url."css/ribbons/free.png"; else echo $wcps_ribbons["free"]; ?>" /></td>
155
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[free]" type="text" value="<?php if(empty($wcps_ribbons["free"])) echo wcps_plugin_url."css/ribbons/free.png"; else echo $wcps_ribbons["free"]; ?>" /></td>
156
+ </tr>
157
+
158
+
159
+
160
+ <tr>
161
+ <td>Fresh</td>
162
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["fresh"])) echo wcps_plugin_url."css/ribbons/fresh.png"; else echo $wcps_ribbons["fresh"]; ?>" /></td>
163
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[fresh]" type="text" value="<?php if(empty($wcps_ribbons["fresh"])) echo wcps_plugin_url."css/ribbons/fresh.png"; else echo $wcps_ribbons["fresh"]; ?>" /></td>
164
+ </tr>
165
+
166
+
167
+ <tr>
168
+ <td>Gift</td>
169
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["gift"])) echo wcps_plugin_url."css/ribbons/gift.png"; else echo $wcps_ribbons["gift"]; ?>" /></td>
170
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[gift]" type="text" value="<?php if(empty($wcps_ribbons["gift"])) echo wcps_plugin_url."css/ribbons/gift.png"; else echo $wcps_ribbons["gift"]; ?>" /></td>
171
+ </tr>
172
+
173
+
174
+
175
+ <tr>
176
+ <td>Hot</td>
177
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["hot"])) echo wcps_plugin_url."css/ribbons/hot.png"; else echo $wcps_ribbons["hot"]; ?>" /></td>
178
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[hot]" type="text" value="<?php if(empty($wcps_ribbons["hot"])) echo wcps_plugin_url."css/ribbons/hot.png"; else echo $wcps_ribbons["hot"]; ?>" /></td>
179
+ </tr>
180
+
181
+
182
+
183
+ <tr>
184
+ <td>new</td>
185
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["new"])) echo wcps_plugin_url."css/ribbons/new.png"; else echo $wcps_ribbons["new"]; ?>" /></td>
186
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[new]" type="text" value="<?php if(empty($wcps_ribbons["new"])) echo wcps_plugin_url."css/ribbons/new.png"; else echo $wcps_ribbons["new"]; ?>" /></td>
187
+ </tr>
188
+
189
+
190
+
191
+
192
+ <tr>
193
+ <td>Pro</td>
194
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["pro"])) echo wcps_plugin_url."css/ribbons/pro.png"; else echo $wcps_ribbons["pro"]; ?>" /></td>
195
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[pro]" type="text" value="<?php if(empty($wcps_ribbons["pro"])) echo wcps_plugin_url."css/ribbons/pro.png"; else echo $wcps_ribbons["pro"]; ?>" /></td>
196
+ </tr>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ <tr>
206
+ <td>sale</td>
207
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["sale"])) echo wcps_plugin_url."css/ribbons/sale.png"; else echo $wcps_ribbons["sale"]; ?>" /></td>
208
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[sale]" type="text" value="<?php if(empty($wcps_ribbons["sale"])) echo wcps_plugin_url."css/ribbons/sale.png"; else echo $wcps_ribbons["sale"]; ?>" /></td>
209
+ </tr>
210
+
211
+
212
+
213
+ <tr>
214
+ <td>save</td>
215
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["save"])) echo wcps_plugin_url."css/ribbons/save.png"; else echo $wcps_ribbons["save"]; ?>" /></td>
216
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[save]" type="text" value="<?php if(empty($wcps_ribbons["save"])) echo wcps_plugin_url."css/ribbons/save.png"; else echo $wcps_ribbons["save"]; ?>" /></td>
217
+ </tr>
218
+
219
+
220
+ <tr>
221
+ <td>Top</td>
222
+ <td><img title="size - 90px × 24px " src="<?php if(empty($wcps_ribbons["top"])) echo wcps_plugin_url."css/ribbons/top.png"; else echo $wcps_ribbons["top"]; ?>" /></td>
223
+ <td><input class="wcps_ribbons" size="50%" name="wcps_ribbons[top]" type="text" value="<?php if(empty($wcps_ribbons["top"])) echo wcps_plugin_url."css/ribbons/top.png"; else echo $wcps_ribbons["top"]; ?>" /></td>
224
+ </tr>
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ </table>
247
+
248
+
249
+
250
+
251
+ </td>
252
+ </tr>
253
+ </table>
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <p class="submit">
261
+ <input class="button button-primary" type="submit" name="Submit" value="<?php _e('Save Changes' ) ?>" />
262
+ </p>
263
+ </form>
264
+
265
+
266
+ </div>
woocommerce-products-slider.php ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Woocommerce Products Slider
4
+ Plugin URI:
5
+ Description:
6
+ Version: 1.0
7
+ Author: wpkids
8
+ Author URI:
9
+ License: GPLv2 or later
10
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
+ */
12
+
13
+ define('wcps_plugin_url', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
14
+ define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
15
+
16
+ require_once( plugin_dir_path( __FILE__ ) . 'includes/wcps-meta.php');
17
+ require_once( plugin_dir_path( __FILE__ ) . 'includes/wcps-functions.php');
18
+
19
+
20
+ //Themes php files
21
+
22
+ require_once( plugin_dir_path( __FILE__ ) . 'themes/flat/index.php');
23
+ require_once( plugin_dir_path( __FILE__ ) . 'themes/rossi/index.php');
24
+ require_once( plugin_dir_path( __FILE__ ) . 'themes/saiga/index.php');
25
+ require_once( plugin_dir_path( __FILE__ ) . 'themes/sako/index.php');
26
+ require_once( plugin_dir_path( __FILE__ ) . 'themes/ruger/index.php');
27
+ require_once( plugin_dir_path( __FILE__ ) . 'themes/anti-ruger/index.php');
28
+
29
+
30
+ function wcps_init_scripts()
31
+ {
32
+ wp_enqueue_script('jquery');
33
+ wp_enqueue_script('wcps_js', plugins_url( '/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
34
+
35
+ wp_localize_script('wcps_js', 'wcps_ajax', array( 'wcps_ajaxurl' => admin_url( 'admin-ajax.php')));
36
+ wp_enqueue_style('wcps_style', wcps_plugin_url.'css/style.css');
37
+
38
+ wp_enqueue_script('owl.carousel', plugins_url( '/js/owl.carousel.js' , __FILE__ ) , array( 'jquery' ));
39
+ wp_enqueue_style('owl.carousel', wcps_plugin_url.'css/owl.carousel.css');
40
+ wp_enqueue_style('owl.theme', wcps_plugin_url.'css/owl.theme.css');
41
+
42
+
43
+ wp_enqueue_style( 'wp-color-picker' );
44
+ wp_enqueue_script( 'wcps_color_picker', plugins_url('/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
45
+
46
+
47
+
48
+ // Style for themes
49
+ wp_enqueue_style('wcps-style-flat', wcps_plugin_url.'themes/flat/style.css');
50
+ wp_enqueue_style('wcps-style-rossi', wcps_plugin_url.'themes/rossi/style.css');
51
+ wp_enqueue_style('wcps-style-saiga', wcps_plugin_url.'themes/saiga/style.css');
52
+ wp_enqueue_style('wcps-style-sako', wcps_plugin_url.'themes/sako/style.css');
53
+ wp_enqueue_style('wcps-style-ruger', wcps_plugin_url.'themes/ruger/style.css');
54
+ wp_enqueue_style('wcps-style-anti-ruger', wcps_plugin_url.'themes/anti-ruger/style.css');
55
+
56
+
57
+
58
+
59
+ //Style for font
60
+
61
+
62
+ wp_register_style( 'Raleway', 'http://fonts.googleapis.com/css?family=Raleway:900');
63
+ wp_enqueue_style( 'Raleway' );
64
+
65
+
66
+
67
+ }
68
+ add_action("init","wcps_init_scripts");
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ register_activation_hook(__FILE__, 'wcps_activation');
77
+
78
+
79
+ function wcps_activation()
80
+ {
81
+ $wcps_version= "1.0";
82
+ update_option('wcps_version', $wcps_version); //update plugin version.
83
+
84
+ $wcps_customer_type= "free"; //customer_type "free"
85
+ update_option('wcps_customer_type', $wcps_customer_type); //update plugin version.
86
+
87
+ }
88
+
89
+
90
+ function wcps_display($atts, $content = null ) {
91
+ $atts = shortcode_atts(
92
+ array(
93
+ 'id' => "",
94
+
95
+ ), $atts);
96
+
97
+
98
+ $post_id = $atts['id'];
99
+
100
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
101
+
102
+ $wcps_display ="";
103
+
104
+ if($wcps_themes== "flat")
105
+ {
106
+ $wcps_display.= wcps_body_flat($post_id);
107
+ }
108
+
109
+ else if($wcps_themes== "rossi")
110
+ {
111
+ $wcps_display.= wcps_body_rossi($post_id);
112
+ }
113
+
114
+ else if($wcps_themes== "saiga")
115
+ {
116
+ $wcps_display.= wcps_body_saiga($post_id);
117
+ }
118
+ else if($wcps_themes== "sako")
119
+ {
120
+ $wcps_display.= wcps_body_sako($post_id);
121
+ }
122
+
123
+ else if($wcps_themes== "ruger")
124
+ {
125
+ $wcps_display.= wcps_body_ruger($post_id);
126
+ }
127
+
128
+ else if($wcps_themes== "anti-ruger")
129
+ {
130
+ $wcps_display.= wcps_body_anti_ruger($post_id);
131
+ }
132
+
133
+
134
+ return $wcps_display;
135
+
136
+
137
+
138
+ }
139
+
140
+ add_shortcode('wcps', 'wcps_display');
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ add_action('admin_menu', 'wcps_menu_init');
151
+
152
+
153
+
154
+ function wcps_menu_help(){
155
+ include('wcps-help.php');
156
+ }
157
+
158
+
159
+ function wcps_menu_settings(){
160
+ include('wcps-settings.php');
161
+ }
162
+
163
+
164
+
165
+ function wcps_menu_init() {
166
+
167
+
168
+ add_submenu_page('edit.php?post_type=wcps', __('Settings','menu-wpt'), __('Settings','menu-wpt'), 'manage_options', 'wcps_menu_settings', 'wcps_menu_settings');
169
+
170
+ add_submenu_page('edit.php?post_type=wcps', __('Help & Upgrade','menu-wpt'), __('Help & Upgrade','menu-wpt'), 'manage_options', 'wcps_menu_help', 'wcps_menu_help');
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
+ //Only for Pro version
208
+
209
+
210
+ $wcps_customer_type = get_option('wcps_customer_type');
211
+
212
+ if($wcps_customer_type=="pro")
213
+ {
214
+
215
+
216
+
217
+
218
+ //Update
219
+
220
+
221
+ set_site_transient('update_plugins', null);
222
+
223
+ // TEMP: Show which variables are being requested when query plugin API
224
+ add_filter('plugins_api_result', 'wcps_notice_result', 10, 3);
225
+ function wcps_notice_result($res, $action, $args) {
226
+ return $res;
227
+ }
228
+ // NOTE: All variables and functions will need to be prefixed properly to allow multiple plugins to be updated
229
+
230
+
231
+
232
+ $api_url = 'http://pricing-table.com/api/';
233
+ $plugin_slug = basename(dirname(__FILE__));
234
+
235
+
236
+ // Take over the update check
237
+ add_filter('pre_set_site_transient_update_plugins', 'wcps_check_for_plugin_update');
238
+
239
+ function wcps_check_for_plugin_update($checked_data) {
240
+ global $api_url, $plugin_slug, $wp_version;
241
+
242
+ //Comment out these two lines during testing.
243
+ if (empty($checked_data->checked))
244
+ return $checked_data;
245
+
246
+ $args = array(
247
+ 'slug' => $plugin_slug,
248
+ 'version' => $checked_data->checked[$plugin_slug .'/'.$plugin_slug.'.php'],
249
+ );
250
+ $request_string = array(
251
+ 'body' => array(
252
+ 'action' => 'basic_check',
253
+ 'request' => serialize($args),
254
+ 'api-key' => md5(get_bloginfo('url'))
255
+ ),
256
+ 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url'),
257
+ 'wcps_order_id' => get_option( 'wcps_order_id' ),
258
+ 'wcps_order_email' => get_option( 'wcps_order_email' ),
259
+
260
+ );
261
+
262
+ // Start checking for an update
263
+ $raw_response = wp_remote_post($api_url, $request_string);
264
+
265
+ if (!is_wp_error($raw_response) && ($raw_response['response']['code'] == 200))
266
+ $response = unserialize($raw_response['body']);
267
+
268
+ if (is_object($response) && !empty($response)) // Feed the update data into WP updater
269
+ $checked_data->response[$plugin_slug .'/'. $plugin_slug .'.php'] = $response;
270
+
271
+ update_option('wcps_customer_apikey', $response); //update api.
272
+
273
+
274
+
275
+
276
+ return $checked_data;
277
+ }
278
+
279
+
280
+ // Take over the Plugin info screen
281
+ add_filter('plugins_api', 'wcps_plugin_api_call', 10, 3);
282
+
283
+ function wcps_plugin_api_call($def, $action, $args) {
284
+ global $plugin_slug, $api_url, $wp_version;
285
+
286
+ if ($args->slug != $plugin_slug)
287
+ return false;
288
+
289
+ // Get the current version
290
+ $plugin_info = get_site_transient('update_plugins');
291
+ $current_version = $plugin_info->checked[$plugin_slug .'/'. $plugin_slug .'.php'];
292
+ $args->version = $current_version;
293
+
294
+ $request_string = array(
295
+ 'body' => array(
296
+ 'action' => $action,
297
+ 'request' => serialize($args),
298
+ 'api-key' => md5(get_bloginfo('url'))
299
+ ),
300
+ 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')
301
+ );
302
+
303
+ $request = wp_remote_post($api_url, $request_string);
304
+
305
+ if (is_wp_error($request)) {
306
+ $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $request->get_error_message());
307
+ } else {
308
+ $res = unserialize($request['body']);
309
+
310
+
311
+
312
+
313
+ if ($res === false)
314
+ $res = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $request['body']);
315
+ }
316
+
317
+ return $res;
318
+ }
319
+
320
+ }
321
+
322
+
323
+
324
+
325
+
326
+ ?>