Woocommerce Products Slider - Version 1.8

Version Description

  • 17/10/2015 fix - ssl issue fixed.
Download this release

Release Info

Developer paratheme
Plugin Icon 128x128 Woocommerce Products Slider
Version 1.8
Comparing to
See all releases

Code changes from version 1.5 to 1.8

Files changed (66) hide show
  1. ParaAdmin/ParaAdminClass.php +245 -0
  2. ParaAdmin/css/ParaAdmin.css +26 -233
  3. ParaAdmin/css/ParaDashboard.css +83 -0
  4. ParaAdmin/css/icons/dark/browser-firefox.png +0 -0
  5. ParaAdmin/css/icons/dark/device-monitor.png +0 -0
  6. ParaAdmin/css/icons/dark/globe.png +0 -0
  7. ParaAdmin/css/icons/dark/keywords.png +0 -0
  8. ParaAdmin/css/icons/dark/map-pin.png +0 -0
  9. ParaAdmin/css/icons/dark/os-apple.png +0 -0
  10. ParaAdmin/css/icons/dark/os-windows.png +0 -0
  11. ParaAdmin/css/icons/dark/page.png +0 -0
  12. ParaAdmin/css/icons/dark/share-hub.png +0 -0
  13. ParaAdmin/css/icons/dark/user-crowd.png +0 -0
  14. ParaAdmin/css/icons/dark/user-group.png +0 -0
  15. ParaAdmin/js/ParaAdmin.js +29 -1
  16. admin/css/loading.gif +0 -0
  17. admin/css/style.css +82 -0
  18. admin/js/scripts.js +102 -0
  19. {themes/flat → css}/images/arrow-next.png +0 -0
  20. {themes/flat → css}/images/arrow-prev.png +0 -0
  21. css/images/featured.png +0 -0
  22. css/images/sale-icon.png +0 -0
  23. css/images/sale.png +0 -0
  24. css/no-thumb.png +0 -0
  25. css/style.css +223 -77
  26. css/tags.png +0 -0
  27. includes/class-functions.php +92 -0
  28. includes/class-settings.php +36 -0
  29. includes/class-shortcodes.php +51 -0
  30. includes/menu/settings.php +145 -0
  31. includes/wcps-functions.php +93 -17
  32. includes/wcps-meta.php +706 -104
  33. js/scripts.js +0 -61
  34. readme.txt +14 -2
  35. templates/custom-css.php +62 -0
  36. templates/query.php +237 -0
  37. templates/scripts.php +152 -0
  38. templates/variables.php +101 -0
  39. templates/wcps-cart.php +12 -0
  40. templates/wcps-category.php +24 -0
  41. templates/wcps-excerpt.php +17 -0
  42. templates/wcps-featured.php +23 -0
  43. templates/wcps-price.php +12 -0
  44. templates/wcps-rating.php +26 -0
  45. templates/wcps-ribbon.php +20 -0
  46. templates/wcps-sale.php +20 -0
  47. templates/wcps-thumb.php +11 -0
  48. templates/wcps-title.php +12 -0
  49. themes/flat/index.php +0 -448
  50. themes/flat/style.css +0 -199
  51. themes/rossi/index.php +0 -448
  52. themes/rossi/style.css +0 -164
  53. themes/{rossi → theme1}/images/arrow-next.png +0 -0
  54. themes/{rossi → theme1}/images/arrow-prev.png +0 -0
  55. themes/theme1/images/tags.png +0 -0
  56. themes/theme1/index-old.php +147 -0
  57. themes/theme1/index.php +100 -0
  58. themes/theme1/style.css +166 -0
  59. themes/theme6/images/arrow-next.png +0 -0
  60. themes/theme6/images/arrow-prev.png +0 -0
  61. themes/theme6/images/tags.png +0 -0
  62. themes/theme6/index - Copy.php +182 -0
  63. themes/theme6/index.php +142 -0
  64. themes/theme6/style.css +225 -0
  65. wcps-settings.php +0 -253
  66. woocommerce-products-slider.php +74 -114
ParaAdmin/ParaAdminClass.php ADDED
@@ -0,0 +1,245 @@
1
+ <?php
2
+
3
+ // ParaAdmin Class
4
+
5
+ class paraAdmin
6
+ {
7
+ var $options = array();
8
+
9
+
10
+ function option_output($options_all, $options_tabs)
11
+ {
12
+ $html = '';
13
+ $html .= '<div class="para-settings">';
14
+
15
+ $html .= '<ul class="tab-nav">';
16
+
17
+ $i=1;
18
+ foreach($options_tabs as $id => $tabs)
19
+ {
20
+ if($i==1)
21
+ {
22
+ $active = 'active';
23
+ }
24
+ else
25
+ {
26
+ $active = '';
27
+ }
28
+
29
+ $html.= '<li nav="'.$i.'" class="tab'.$i.' '.$active.' ">'.$tabs.'</li>';
30
+
31
+ $i++;
32
+ }
33
+ $html .= '</ul>';
34
+
35
+
36
+
37
+ $html .= '<ul class="box">';
38
+
39
+ $j = 1;
40
+ foreach($options_tabs as $id => $tabs)
41
+ {
42
+ if($j==1)
43
+ {
44
+ $active = 'active';
45
+ $display = 'block';
46
+ }
47
+ else
48
+ {
49
+ $active = '';
50
+ $display = 'none';
51
+ }
52
+ $html.= '<li style="display: '.$display.';" class="box'.$j.' tab-box '.$active.'">';
53
+ foreach($options_all[$id] as $id => $options)
54
+ {
55
+ foreach($options as $option)
56
+
57
+ $css_class = $options['css_class'];
58
+ $title = $options['title'];
59
+ $option_details = $options['option_details'];
60
+ $input_type = $options['input_type'];
61
+ $input_values = $options['input_values'];
62
+
63
+ $html.= '<div class="option-box">';
64
+
65
+ $html.= '<p class="option-title">'.$title.'</p>';
66
+ $html.= '<p class="option-info">'.$option_details.'</p>';
67
+
68
+ $html.= $this->input_type($input_type, $input_values, $id, $css_class);
69
+
70
+ $html.= '</div>';
71
+
72
+ }
73
+ $html.= '</li>';
74
+
75
+ $j++;
76
+ }
77
+ $html .= '</ul>';
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+ $html .= '</div>';
87
+
88
+
89
+ return $html;
90
+
91
+ }
92
+
93
+
94
+ function input_type($input_type, $input_values, $id, $css_class)
95
+ {
96
+
97
+
98
+
99
+ $html ='';
100
+ if($input_type == 'text')
101
+ {
102
+
103
+ $option_id_value = get_option( $id );
104
+ if(empty($option_id_value))
105
+ {
106
+ $option_id_value = '';
107
+ }
108
+
109
+
110
+
111
+ $html.= '<input name="'.$id.'" type="text" value="'.$option_id_value.'" id="'.$id.'" class="'.$css_class.'" />';
112
+ }
113
+
114
+ elseif($input_type == 'textarea')
115
+ {
116
+
117
+ $option_id_value = get_option( $id );
118
+
119
+ if(!empty($option_id_value))
120
+ {
121
+ $value = $option_id_value;
122
+ }
123
+ else
124
+ {
125
+ $value = $input_values;
126
+ }
127
+
128
+
129
+
130
+ $html.= '<textarea name="'.$id.'" type="text" id="'.$id.'" class="'.$css_class.'" >'.$value.'</textarea>';
131
+ }
132
+
133
+
134
+
135
+
136
+
137
+ elseif($input_type == 'checkbox')
138
+ {
139
+
140
+ foreach($input_values as $key => $value)
141
+ {
142
+
143
+
144
+
145
+ $option_key_value = get_option( $key );
146
+ if(empty($option_key_value))
147
+ {
148
+ $option_key_value = '';
149
+ $checked = '';
150
+ }
151
+ else
152
+ {
153
+ $checked = 'checked';
154
+ }
155
+
156
+
157
+
158
+ $html.= '<label>';
159
+
160
+ $html.= '<input name="'.$key.'" type="checkbox" '.$checked.' value="1" id="'.$key.'" class="'.$css_class.'" /> '.$value;
161
+ $html.= '</label><br />';
162
+ }
163
+
164
+
165
+ }
166
+
167
+ elseif($input_type == 'select')
168
+ {
169
+
170
+
171
+ $html.= '<select name="'.$id.'" id="'.$id.'" class="'.$css_class.'">';
172
+ foreach($input_values as $key => $value)
173
+ {
174
+
175
+
176
+ $option_id_value = get_option( $id );
177
+ if($option_id_value == $key )
178
+ {
179
+ $selected = 'selected';
180
+
181
+ }
182
+ else
183
+ {
184
+ $selected = '';
185
+ }
186
+
187
+
188
+
189
+ $html.= '<option '.$selected.' value="'.$key.'" >'.$value.'</option>';
190
+ }
191
+ $html.= '</select>';
192
+
193
+ }
194
+
195
+
196
+ elseif($input_type == 'radio')
197
+ {
198
+
199
+ foreach($input_values as $key => $value)
200
+ {
201
+ $html.= '<label>';
202
+
203
+ $option_id_value = get_option( $id );
204
+ if($option_id_value == $key )
205
+ {
206
+ $checked = 'checked';
207
+
208
+ }
209
+ else
210
+ {
211
+ $checked = '';
212
+ }
213
+
214
+
215
+
216
+
217
+ $html.= '<input '.$checked.' class="'.$css_class.'" id="'.$key.'" type="radio" name="'.$id.'" value="'.$key.'" >'.$value.'</option> ';
218
+ $html.= '</label><br />';
219
+ }
220
+
221
+
222
+ }
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ return $html;
231
+ }
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ }
244
+
245
+
ParaAdmin/css/ParaAdmin.css CHANGED
@@ -9,15 +9,13 @@
9
}
10
11
.para-settings .option-box {
12
- border-left: 3px solid rgb(255, 255, 255);
13
margin: 10px 0;
14
padding: 10px;
15
}
16
17
18
.para-settings .option-box:hover {
19
- background: #e6e6e6;
20
- border-left: 3px solid #11b063;
21
}
22
23
@@ -27,7 +25,7 @@
27
}
28
29
.para-settings .option-box .option-info {
30
- color: rgb(73, 147, 14);
31
font-size: 13px;
32
font-weight: normal;
33
margin: 10px 0;
@@ -98,256 +96,51 @@
98
margin: 25px 0;
99
}
100
101
- .para-settings .pricing-table{
102
-
103
- }
104
-
105
- .para-settings .pricing-table .column {
106
- border-bottom: 1px solid #ff9601;
107
- border-left: 1px solid #ff9601;
108
- border-top: 1px solid #ff9601;
109
- display: inline-block;
110
- float: left;
111
- text-align: center;
112
- vertical-align: top;
113
- width: 48%;
114
- }
115
-
116
- .para-settings .pricing-table .column:last-child {
117
- border-right: 1px solid #ff9601;
118
- }
119
-
120
- .para-settings .paln {
121
-
122
- border-bottom: 1px solid rgb(255, 150, 1);
123
- display: block;
124
- font-size: 20px;
125
- font-weight: bold;
126
- line-height: 30px;
127
- padding: 10px 0;
128
- }
129
- .para-settings .cell {
130
- border-bottom: 1px solid rgb(255, 150, 1);
131
- display: block;
132
- line-height: 20px;
133
- padding: 7px 0;
134
- }
135
-
136
- .para-settings .hidden-mob {
137
-
138
- display: none;
139
-
140
- }
141
-
142
-
143
-
144
- .para-settings .green {
145
- background: url("tik-mark.png") no-repeat scroll 0 3px rgba(0, 0, 0, 0);
146
- display: inline-block;
147
- padding-left: 25px;
148
- line-height: 20px;
149
-
150
- }
151
-
152
- .para-settings .red {
153
- background: url("cross-mark.png") no-repeat scroll 0 3px rgba(0, 0, 0, 0);
154
- display: inline-block;
155
- padding-left: 25px;
156
- line-height: 20px;
157
-
158
- }
159
-
160
- .para-settings .price {
161
- font-size: 18px;
162
- font-weight: bold;
163
- padding: 25px 0;
164
- border-bottom: 1px solid rgb(255, 150, 1);
165
- }
166
-
167
-
168
- .para-settings .buy-now {
169
- background: none repeat scroll 0 0 rgb(221, 221, 221);
170
- border-bottom: 2px solid rgb(157, 157, 157);
171
- border-radius: 12px;
172
- padding: 2px 12px;
173
- text-decoration: none;
174
- }
175
-
176
- .para-settings .buy-now:hover {
177
-
178
- border-bottom: 2px solid #706f6f;
179
-
180
- }
181
-
182
-
183
-
184
- .para-settings .data-table {
185
- border: 1px solid rgb(199, 199, 199);
186
- border-collapse: collapse;
187
- }
188
-
189
- .para-settings .data-table tr {
190
- border-bottom: 1px solid rgb(199, 199, 199);
191
- }
192
193
194
- .para-settings .data-table th {
195
- border-bottom: 2px solid rgb(253, 197, 28);
196
- border-collapse: collapse;
197
- padding: 10px 20px 10px 8px;
198
}
199
200
-
201
- .para-settings .data-table td {
202
- border-bottom: 1px solid rgb(199, 199, 199);
203
- border-collapse: collapse;
204
- padding: 10px 20px 10px 8px;
205
- }
206
-
207
- .para-settings .button {
208
- margin: 20px 0;
209
- }
210
-
211
- .para-settings .success {
212
- background: none repeat scroll 0 0 rgb(105, 221, 157);
213
- padding: 5px 10px;
214
- display:none;
215
- }
216
- .para-settings .para-form-table {
217
-
218
- border-collapse: collapse;
219
}
220
-
221
- .para-settings .para-form-table tr {
222
-
223
- }
224
-
225
-
226
- .para-settings .para-form-table th {
227
- border-collapse: collapse;
228
- padding: 10px 20px 10px 8px;
229
- text-align: left;
230
- vertical-align: top;
231
- width: 200px;
232
- }
233
-
234
- .para-settings .para-form-table td {
235
-
236
- border-collapse: collapse;
237
- padding: 10px 20px 10px 8px;
238
}
239
-
240
- .para-settings pre {
241
-
242
- }
243
-
244
-
245
-
246
- /*para-dashboard*/
247
-
248
- .para-dashboard {
249
- background: none repeat scroll 0 0 rgb(91, 116, 145);
250
- padding: 10px;
251
- }
252
-
253
- .para-dashboard .dash-box {
254
- background: none repeat scroll 0 0 rgb(93, 126, 163);
255
- border: 1px solid rgb(122, 170, 223);
256
- display: inline-block;
257
- height: auto;
258
- margin-bottom: 30px;
259
- margin-right: 10px;
260
- margin-top: 0;
261
- overflow: hidden;
262
- padding-bottom: 30px;
263
- vertical-align: top;
264
- width: 350px;
265
- }
266
-
267
- .para-dashboard .dash-box-title {
268
- background: none repeat scroll 0 0 rgb(100, 140, 186);
269
- color: rgb(255, 255, 255);
270
- font-size: 16px;
271
- font-weight: bold;
272
- line-height: 30px;
273
- padding: 0 10px;
274
- }
275
-
276
- .para-dashboard .dash-box-title .fa {
277
- padding-right: 10px;
278
- }
279
-
280
- .para-dashboard .dash-box-info {
281
- color: rgb(238, 238, 238);
282
- font-size: 12px;
283
- padding: 10px;
284
- }
285
-
286
- .para-dashboard .dash-box .total-online {
287
- color: rgb(255, 255, 255);
288
- font-size: 40px;
289
- padding: 30px 10px 10px;
290
- text-align: center;
291
}
292
293
- .para-dashboard .dash-box .total-session {
294
color: rgb(255, 255, 255);
295
- font-size: 40px;
296
- padding: 30px 10px 10px;
297
text-align: center;
298
}
299
300
301
302
303
- .para-dashboard .dash-box .para-data-table {
304
- border: 1px solid rgb(221, 221, 221);
305
- border-collapse: collapse;
306
- color: rgb(255, 255, 255);
307
- text-align: left;
308
- }
309
310
- .para-dashboard .dash-box .para-data-table th {
311
- padding: 7px;
312
- }
313
- .para-dashboard .dash-box tr {
314
- border-bottom: 1px solid rgb(221, 221, 221);
315
}
316
- .para-dashboard .dash-box .para-data-table td {
317
- padding: 5px;
318
- }
319
-
320
- .para-dashboard .dash-box .para-data-table a {
321
- color: rgb(255, 255, 255);
322
- text-decoration: none;
323
}
324
325
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
@media all and (max-width: 799px) {
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
352
.para-settings ul.tab-nav li {
353
display: block;
9
}
10
11
.para-settings .option-box {
12
margin: 10px 0;
13
padding: 10px;
14
}
15
16
17
.para-settings .option-box:hover {
18
+
19
}
20
21
25
}
26
27
.para-settings .option-box .option-info {
28
+ color: rgb(153, 153, 153);
29
font-size: 13px;
30
font-weight: normal;
31
margin: 10px 0;
96
margin: 25px 0;
97
}
98
99
100
+ .para-settings .expandable {
101
102
}
103
104
+ .para-settings .expandable .items {
105
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
106
+ border-bottom: 1px solid rgb(153, 153, 153);
107
+ margin: 2px 0;
108
}
109
+ .para-settings .expandable .items.ui-sortable-helper {
110
+ border: 1px dashed rgb(153, 153, 153);
111
}
112
+ .para-settings .expandable .header {
113
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
114
+ padding: 5px;
115
}
116
117
+ .para-settings .expandable .header .remove {
118
+ background: rgb(242, 79, 47) none repeat scroll 0 0;
119
color: rgb(255, 255, 255);
120
+ cursor: pointer;
121
+ display: inline-block;
122
+ float: right;
123
+ padding: 0 7px;
124
text-align: center;
125
}
126
127
128
129
130
+ .para-settings .expandable .active .options {
131
+
132
+ display: block;
133
134
}
135
+ .para-settings .expandable .options {
136
+ background: none repeat scroll 0 0 rgb(240, 240, 240);
137
+ display: none;
138
+ padding: 10px;
139
}
140
141
142
@media all and (max-width: 799px) {
143
+
144
145
.para-settings ul.tab-nav li {
146
display: block;
ParaAdmin/css/ParaDashboard.css ADDED
@@ -0,0 +1,83 @@
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+ /*para-dashboard*/
7
+
8
+ .para-dashboard {
9
+ background: none repeat scroll 0 0 rgb(91, 116, 145);
10
+ padding: 10px;
11
+ }
12
+
13
+ .para-dashboard .dash-box {
14
+ background: none repeat scroll 0 0 rgb(93, 126, 163);
15
+ border: 1px solid rgb(122, 170, 223);
16
+ display: inline-block;
17
+ height: auto;
18
+ margin-bottom: 30px;
19
+ margin-right: 10px;
20
+ margin-top: 0;
21
+ overflow: hidden;
22
+ padding-bottom: 30px;
23
+ vertical-align: top;
24
+ width: 350px;
25
+ }
26
+
27
+ .para-dashboard .dash-box-title {
28
+ background: none repeat scroll 0 0 rgb(100, 140, 186);
29
+ color: rgb(255, 255, 255);
30
+ font-size: 16px;
31
+ font-weight: bold;
32
+ line-height: 30px;
33
+ padding: 0 10px;
34
+ }
35
+
36
+ .para-dashboard .dash-box-title .fa {
37
+ padding-right: 10px;
38
+ }
39
+
40
+ .para-dashboard .dash-box-info {
41
+ color: rgb(238, 238, 238);
42
+ font-size: 12px;
43
+ padding: 10px;
44
+ }
45
+
46
+ .para-dashboard .dash-box .total-online {
47
+ color: rgb(255, 255, 255);
48
+ font-size: 40px;
49
+ padding: 30px 10px 10px;
50
+ text-align: center;
51
+ }
52
+
53
+ .para-dashboard .dash-box .total-session {
54
+ color: rgb(255, 255, 255);
55
+ font-size: 40px;
56
+ padding: 30px 10px 10px;
57
+ text-align: center;
58
+ }
59
+
60
+
61
+
62
+
63
+ .para-dashboard .dash-box .para-data-table {
64
+ border: 1px solid rgb(221, 221, 221);
65
+ border-collapse: collapse;
66
+ color: rgb(255, 255, 255);
67
+ text-align: left;
68
+ }
69
+
70
+ .para-dashboard .dash-box .para-data-table th {
71
+ padding: 7px;
72
+ }
73
+ .para-dashboard .dash-box tr {
74
+ border-bottom: 1px solid rgb(221, 221, 221);
75
+ }
76
+ .para-dashboard .dash-box .para-data-table td {
77
+ padding: 5px;
78
+ }
79
+
80
+ .para-dashboard .dash-box .para-data-table a {
81
+ color: rgb(255, 255, 255);
82
+ text-decoration: none;
83
+ }
ParaAdmin/css/icons/dark/browser-firefox.png ADDED
Binary file
ParaAdmin/css/icons/dark/device-monitor.png ADDED
Binary file
ParaAdmin/css/icons/dark/globe.png ADDED
Binary file
ParaAdmin/css/icons/dark/keywords.png ADDED
Binary file
ParaAdmin/css/icons/dark/map-pin.png ADDED
Binary file
ParaAdmin/css/icons/dark/os-apple.png ADDED
Binary file
ParaAdmin/css/icons/dark/os-windows.png ADDED
Binary file
ParaAdmin/css/icons/dark/page.png ADDED
Binary file
ParaAdmin/css/icons/dark/share-hub.png ADDED
Binary file
ParaAdmin/css/icons/dark/user-crowd.png ADDED
Binary file
ParaAdmin/css/icons/dark/user-group.png ADDED
Binary file
ParaAdmin/js/ParaAdmin.js CHANGED
@@ -3,7 +3,35 @@ jQuery(document).ready(function($)
3
{
4
5
6
-
7
8
9
3
{
4
5
6
+ $(document).on('click', '.expandable .header', function()
7
+ {
8
+ if($(this).parent().hasClass('active'))
9
+ {
10
+ $(this).parent().removeClass('active');
11
+ }
12
+ else
13
+ {
14
+ $(this).parent().addClass('active');
15
+ }
16
+
17
+
18
+ })
19
+
20
+
21
+ $(document).on('click', '.expandable .header .remove', function()
22
+ {
23
+ if(confirm('Do you really want to remove ?')){
24
+
25
+ $(this).parent().parent().remove();
26
+ }
27
+
28
+ })
29
+
30
+
31
+
32
+
33
+
34
+
35
36
37
admin/css/loading.gif ADDED
Binary file
admin/css/style.css ADDED
@@ -0,0 +1,82 @@
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
+ #wcps_metabox .wcps_loading_taxonomy_category {
24
+ background: url("loading.gif") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
25
+ height: 11px;
26
+ margin-bottom: 20px;
27
+ width: 30px;
28
+ }
29
+
30
+
31
+ #wcps_metabox div..wcps_taxonomy_category{}
32
+
33
+
34
+ #wcps_metabox ul.content_source_area {
35
+ margin-left: 15px;
36
+ }
37
+
38
+ #wcps_metabox ul.content_source_area li{}
39
+
40
+
41
+ #wcps_metabox ul.content_source_area .content-source-box {
42
+ display: none;
43
+ }
44
+
45
+ #wcps_metabox ul.content_source_area li div.active {
46
+ background: none repeat scroll 0 0 #e6e6e6;
47
+ border-left: 3px solid #11b063;
48
+ display: block;
49
+ margin: 10px 10px 0 20px;
50
+ padding: 10px 0 10px 5px;
51
+ }
52
+
53
+ #wcps_metabox .tab-box td {
54
+ border-left: 3px solid #fff;
55
+ }
56
+
57
+ #wcps_metabox .tab-box td:hover {
58
+ background: #e6e6e6;
59
+ border-left: 3px solid #11b063;
60
+ }
61
+
62
+
63
+ #wcps_metabox .tab-box > table {
64
+ width: 100%;
65
+ }
66
+
67
+ #wcps_metabox .wcps_ribbons {
68
+ width: 100%;
69
+ }
70
+
71
+
72
+ .form-table .wcps_ribbons {
73
+ }
74
+
75
+ #wcps_metabox #wcps_ribbon_custom {
76
+ display: none;
77
+ }
78
+
79
+
80
+ #wcps_metabox .wcps_grid_items_hide {
81
+ float: right;
82
+ }
admin/js/scripts.js ADDED
@@ -0,0 +1,102 @@
1
+
2
+ jQuery(document).ready(function($)
3
+ {
4
+
5
+
6
+
7
+ $(document).on('click','.wcps_grid_items_reset',function(){
8
+
9
+ if(confirm('Do you really want to reset ?')){
10
+ wcps_id = jQuery(this).attr('wcps_id');
11
+
12
+ //alert(wcps_id);
13
+
14
+
15
+ jQuery.ajax(
16
+ {
17
+ type: 'POST',
18
+ context:this,
19
+ url: wcps_ajax.wcps_ajaxurl,
20
+ data: {"action": "wcps_grid_items_reset","wcps_id":wcps_id},
21
+ success: function(data)
22
+ {
23
+ jQuery(this).html(data);
24
+ window.location.reload();
25
+ }
26
+ });
27
+ }
28
+
29
+
30
+
31
+ })
32
+
33
+
34
+
35
+
36
+ $(document).on('change', '#wcps_ribbon_name', function()
37
+ {
38
+ value = $(this).val();
39
+
40
+ if(value=='custom'){
41
+
42
+ $('#wcps_ribbon_custom').css('display','block');
43
+ }
44
+ else{
45
+ $('#wcps_ribbon_custom').css('display','none');
46
+
47
+ }
48
+
49
+
50
+
51
+ })
52
+
53
+
54
+
55
+
56
+
57
+ $(document).on('click', '.wcps_content_source', function()
58
+ {
59
+ var source = $(this).val();
60
+ var source_id = $(this).attr("id");
61
+
62
+ $(".content-source-box.active").removeClass("active");
63
+ $(".content-source-box."+source_id).addClass("active");
64
+
65
+ })
66
+
67
+
68
+ jQuery(".wcps_taxonomy").click(function()
69
+ {
70
+
71
+
72
+
73
+ var taxonomy = jQuery(this).val();
74
+
75
+ jQuery(".wcps_loading_taxonomy_category").css('display','block');
76
+
77
+ jQuery.ajax(
78
+ {
79
+ type: 'POST',
80
+ url: wcps_ajax.wcps_ajaxurl,
81
+ data: {"action": "wcps_get_taxonomy_category","taxonomy":taxonomy},
82
+ success: function(data)
83
+ {
84
+ jQuery(".wcps_taxonomy_category").html(data);
85
+ jQuery(".wcps_loading_taxonomy_category").fadeOut('slow');
86
+ }
87
+ });
88
+
89
+
90
+ })
91
+
92
+
93
+
94
+
95
+ });
96
+
97
+
98
+
99
+
100
+
101
+
102
+
{themes/flat → css}/images/arrow-next.png RENAMED
File without changes
{themes/flat → css}/images/arrow-prev.png RENAMED
File without changes
css/images/featured.png ADDED
Binary file
css/images/sale-icon.png ADDED
Binary file
css/images/sale.png ADDED
Binary file
css/no-thumb.png CHANGED
Binary file
css/style.css CHANGED
@@ -2,85 +2,10 @@
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
- #wcps_metabox .wcps_loading_taxonomy_category {
24
- background: url("loading.gif") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
25
- height: 11px;
26
- margin-bottom: 20px;
27
- width: 30px;
28
- }
29
-
30
-
31
- #wcps_metabox div..wcps_taxonomy_category{}
32
-
33
-
34
- #wcps_metabox ul.content_source_area {
35
- margin-left: 15px;
36
- }
37
-
38
- #wcps_metabox ul.content_source_area li{}
39
-
40
-
41
- #wcps_metabox ul.content_source_area .content-source-box {
42
- display: none;
43
- }
44
-
45
- #wcps_metabox ul.content_source_area li div.active {
46
- background: none repeat scroll 0 0 #e6e6e6;
47
- border-left: 3px solid #11b063;
48
- display: block;
49
- margin: 10px 10px 0 20px;
50
- padding: 10px 0 10px 5px;
51
- }
52
-
53
- #wcps_metabox .tab-box td {
54
- border-left: 3px solid #fff;
55
- }
56
-
57
- #wcps_metabox .tab-box td:hover {
58
- background: #e6e6e6;
59
- border-left: 3px solid #11b063;
60
- }
61
-
62
-
63
- #wcps_metabox .tab-box > table {
64
- width: 100%;
65
- }
66
-
67
- #wcps_metabox .wcps_ribbons {
68
- width: 100%;
69
- }
70
-
71
-
72
- .form-table .wcps_ribbons {
73
- }
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
/*CSS front page*/
82
83
.wcps-container {
84
margin: 50px 0;
85
overflow: hidden;
86
position: relative;
@@ -163,4 +88,225 @@ background:url("ribbons/dis-90.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
163
}
164
.wcps-container div.wcps-ribbon.wcps-ribbon-dis-100{
165
background:url("ribbons/dis-100.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
166
- }
2
/* CSS Document */
3
4
5
/*CSS front page*/
6
7
.wcps-container {
8
+ background:none repeat scroll 0 0 rgb(241, 241, 241);
9
margin: 50px 0;
10
overflow: hidden;
11
position: relative;
88
}
89
.wcps-container div.wcps-ribbon.wcps-ribbon-dis-100{
90
background:url("ribbons/dis-100.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
91
+ }
92
+
93
+
94
+
95
+
96
+
97
+
98
+ /* Navigation CSS middle */
99
+
100
+ .wcps-container .owl-buttons.middle {
101
+ left: 0;
102
+ position: absolute;
103
+ top: 40%;
104
+ width: 100%;
105
+ }
106
+
107
+
108
+ .wcps-container .owl-controls .owl-buttons.middle .owl-prev {
109
+ background: url("images/arrow-prev.png") no-repeat scroll 10px 14px rgba(0, 0, 0, 0);
110
+ border: 1px solid rgb(221, 221, 221);
111
+ border-radius: 50%;
112
+ color: rgb(0, 0, 0);
113
+ height: 50px;
114
+ left: -100px;
115
+ padding: 0;
116
+ position: absolute;
117
+ top: 0;
118
+
119
+ width: 50px;
120
+ transition: all 0.6s ease 0s;
121
+ }
122
+
123
+ .wcps-container .owl-controls .owl-buttons.middle .owl-next {
124
+ background: url("images/arrow-next.png") no-repeat scroll 10px 14px rgba(0, 0, 0, 0);
125
+ border: 1px solid rgb(221, 221, 221);
126
+ border-radius: 50%;
127
+ color: rgb(0, 0, 0);
128
+ height: 50px;
129
+ padding: 0;
130
+ position: absolute;
131
+ right: -100px;
132
+ top: 0;
133
+
134
+ width: 50px;
135
+ transition: all 0.6s ease 0s;
136
+ }
137
+
138
+
139
+ .wcps-container:hover .owl-controls .owl-buttons.middle .owl-prev,
140
+ .wcps-container:hover .owl-controls .owl-buttons.middle .owl-next {
141
+ box-shadow: 0 0 8px 0 rgb(102, 102, 102);
142
+ }
143
+
144
+
145
+ .wcps-container:hover .owl-controls .owl-buttons.middle .owl-prev {
146
+ left: 30px;
147
+ }
148
+
149
+ .wcps-container:hover .owl-controls .owl-buttons.middle .owl-next {
150
+ right: 30px;
151
+ }
152
+
153
+
154
+
155
+
156
+ /*#####################################*/
157
+
158
+
159
+
160
+ .wcps-container .owl-buttons.middle-fixed {
161
+ left: 0;
162
+ position: absolute;
163
+ top: 40%;
164
+ width: 100%;
165
+ }
166
+
167
+
168
+ .wcps-container .owl-controls .owl-buttons.middle-fixed .owl-prev {
169
+ background: url("images/arrow-prev.png") no-repeat scroll 10px 14px rgba(0, 0, 0, 0);
170
+ border: 1px solid rgb(221, 221, 221);
171
+ border-radius: 50%;
172
+ color: rgb(0, 0, 0);
173
+ height: 50px;
174
+ left: -50px;
175
+ padding: 0;
176
+ position: absolute;
177
+ top: 0;
178
+
179
+ width: 50px;
180
+ transition: all 0.6s ease 0s;
181
+ }
182
+
183
+ .wcps-container .owl-controls .owl-buttons.middle-fixed .owl-next {
184
+ background: url("images/arrow-next.png") no-repeat scroll 10px 14px rgba(0, 0, 0, 0);
185
+ border: 1px solid rgb(221, 221, 221);
186
+ border-radius: 50%;
187
+ color: rgb(0, 0, 0);
188
+ height: 50px;
189
+ padding: 0;
190
+ position: absolute;
191
+ right: -50px;
192
+ top: 0;
193
+
194
+ width: 50px;
195
+ transition: all 0.6s ease 0s;
196
+ }
197
+
198
+
199
+ .wcps-container:hover .owl-controls .owl-buttons.middle-fixed .owl-prev,
200
+ .wcps-container:hover .owl-controls .owl-buttons.middle-fixed .owl-next {
201
+ box-shadow: 0 0 8px 0 rgb(102, 102, 102);
202
+ }
203
+
204
+
205
+ .wcps-container:hover .owl-controls .owl-buttons.middle-fixed .owl-prev {
206
+ left: -50px;
207
+ }
208
+
209
+ .wcps-container:hover .owl-controls .owl-buttons.middle-fixed .owl-next {
210
+ right: -50px;
211
+ }
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+ /* Navigation CSS topright*/
233
+ .wcps-container .owl-buttons.topright {
234
+ position: absolute;
235
+ right: 15px;
236
+ top: 15px;
237
+ }
238
+
239
+ .wcps-container .owl-controls .owl-buttons.topright .owl-prev {
240
+ background: url("images/arrow-prev.png") repeat scroll 0 0 rgb(255, 255, 255);
241
+ border: 1px solid rgb(221, 221, 221);
242
+ border-radius: 0;
243
+ color: rgb(0, 0, 0);
244
+ height: 20px;
245
+ padding: 0;
246
+ opacity: 1;
247
+ width: 30px;
248
+ }
249
+
250
+
251
+
252
+ .wcps-container .owl-controls .owl-buttons.topright .owl-next {
253
+ background: url("images/arrow-next.png") repeat scroll 0 0 rgb(255, 255, 255);
254
+ border: 1px solid rgb(221, 221, 221);
255
+ border-radius: 0;
256
+ color: rgb(0, 0, 0);
257
+ padding: 0;
258
+ width: 30px;
259
+ opacity: 1;
260
+ height: 20px;
261
+ }
262
+
263
+
264
+
265
+ .wcps-container .owl-controls .owl-buttons.topright div.owl-prev:hover{
266
+ background-image: url("images/arrow-prev.png") ;
267
+ background-color:#d5d5d5 !important; }
268
+
269
+
270
+ .wcps-container .owl-controls .owl-buttons.topright div.owl-next:hover{
271
+ background-image: url("images/arrow-next.png");
272
+ background-color:#d5d5d5 !important; }
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+ .wcps-container div.wcps-featured {
281
+ background: url("images/featured.png") no-repeat scroll 0 0 rgba(0, 0, 0,0);
282
+ color: rgb(255, 255, 255);
283
+ font-size: 12px;
284
+ height: 32px;
285
+ left: 10px;
286
+ padding: 0;
287
+ position: absolute;
288
+ top: 10px;
289
+ width: 26px;
290
+ }
291
+
292
+
293
+ .wcps-container div.wcps-sale {
294
+ background: url("images/sale.png") no-repeat scroll 0 center rgb(241, 241, 241);
295
+ box-shadow: 0 1px 6px -3px rgb(153, 153, 153);
296
+ color: rgb(255, 255, 255);
297
+ font-size: 12px;
298
+ height: 30px;
299
+ padding: 0;
300
+ position: absolute;
301
+ right: -30px;
302
+ top: 0;
303
+ transform: rotate(45deg);
304
+ width: 90px;
305
+ }
306
+
307
+
308
+
309
+
310
+
311
+
312
+
css/tags.png ADDED
Binary file
includes/class-functions.php ADDED
@@ -0,0 +1,92 @@
1
+ <?php
2
+
3
+ /*
4
+ * @Author ParaTheme
5
+ * Copyright: 2015 ParaTheme
6
+ */
7
+
8
+ if ( ! defined('ABSPATH')) exit; // if direct access
9
+
10
+ class class_wcps_functions {
11
+
12
+
13
+ public function __construct(){
14
+
15
+ }
16
+
17
+
18
+ public function wcps_themes($themes = array())
19
+ {
20
+
21
+ $themes = array(
22
+ 'theme1'=>'Theme 1',
23
+ 'theme6'=>'Theme 6',
24
+
25
+ );
26
+
27
+ foreach(apply_filters( 'wcps_themes', $themes ) as $theme_key=> $theme_name)
28
+ {
29
+ $theme_list[$theme_key] = $theme_name;
30
+ }
31
+
32
+
33
+ return $theme_list;
34
+
35
+ }
36
+
37
+
38
+ public function wcps_themes_dir($themes_dir = array())
39
+ {
40
+ $main_dir = wcps_plugin_dir.'themes/';
41
+ $themes_dir = $this->wcps_themes();
42
+
43
+ foreach($themes_dir as $theme_key=> $theme_dir)
44
+ {
45
+ $theme_list_dir[$theme_key] = $main_dir.$theme_key;
46
+ }
47
+
48
+ return $theme_list_dir;
49
+
50
+ }
51
+
52
+
53
+ public function wcps_themes_url($themes_url = array())
54
+ {
55
+ $main_url = wcps_plugin_url.'themes/';
56
+ $themes_url = $this->wcps_themes();
57
+
58
+ foreach($themes_url as $theme_key=> $theme_url)
59
+ {
60
+ $theme_list_url[$theme_key] = $main_url.$theme_key;
61
+ }
62
+
63
+ return $theme_list_url;
64
+
65
+ }
66
+
67
+
68
+
69
+
70
+ public function wcps_grid_items($grid_items = array()){
71
+
72
+ $grid_items = array(
73
+ 'thumb'=>'Thumbnail',
74
+ 'title'=>'Title',
75
+ 'excerpt'=>'Excerpt',
76
+ 'category'=>'Category',
77
+ 'price'=>'Price',
78
+ 'cart'=>'Cart',
79
+ 'sale'=>'Sale',
80
+ //'featured'=>'Featured',
81
+ );
82
+ return $grid_items;
83
+ }
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+ }
includes/class-settings.php ADDED
@@ -0,0 +1,36 @@
1
+ <?php
2
+
3
+ /*
4
+ * @Author ParaTheme
5
+ * Copyright: 2015 ParaTheme
6
+ */
7
+
8
+ if ( ! defined('ABSPATH')) exit; // if direct access
9
+
10
+ class class_wcps_settings{
11
+
12
+ public function __construct(){
13
+
14
+ add_action( 'admin_menu', array( $this, 'admin_menu' ), 12 );
15
+
16
+ }
17
+
18
+
19
+ public function admin_menu() {
20
+
21
+ add_submenu_page('edit.php?post_type=wcps', __('Settings','wcps'), __('Settings','wcps'), 'manage_options', 'wcps_menu_settings', array( $this, 'settings_page' ));
22
+
23
+
24
+ }
25
+
26
+ public function settings_page(){
27
+
28
+ include( 'menu/settings.php' );
29
+
30
+ }
31
+
32
+
33
+
34
+ }
35
+
36
+ new class_wcps_settings();
includes/class-shortcodes.php ADDED
@@ -0,0 +1,51 @@
1
+ <?php
2
+
3
+ /*
4
+ * @Author ParaTheme
5
+ * Copyright: 2015 ParaTheme
6
+ */
7
+
8
+ if ( ! defined('ABSPATH')) exit; // if direct access
9
+
10
+ class class_wcps_shortcodes{
11
+
12
+
13
+ public function __construct(){
14
+
15
+ add_shortcode( 'wcps', array( $this, 'wcps_display' ) );
16
+
17
+ }
18
+
19
+ public function wcps_display($atts, $content = null ) {
20
+ $atts = shortcode_atts(
21
+ array(
22
+ 'id' => "",
23
+
24
+ ), $atts);
25
+
26
+ $html = '';
27
+ $post_id = $atts['id'];
28
+
29
+ $wcps_themes = get_post_meta( $post_id, 'wcps_themes', true );
30
+
31
+ $class_wcps_functions = new class_wcps_functions();
32
+ $wcps_themes_dir = $class_wcps_functions->wcps_themes_dir();
33
+ $wcps_themes_url = $class_wcps_functions->wcps_themes_url();
34
+
35
+ //var_dump($wcps_themes_url);
36
+
37
+
38
+ $html.= '<link type="text/css" media="all" rel="stylesheet" href="'.$wcps_themes_url[$wcps_themes].'/style.css" >';
39
+
40
+ include $wcps_themes_dir[$wcps_themes].'/index.php';
41
+
42
+ return $html;
43
+
44
+
45
+ }
46
+
47
+
48
+
49
+ }
50
+
51
+ new class_wcps_shortcodes();
includes/menu/settings.php ADDED
@@ -0,0 +1,145 @@
1
+ <?php
2
+
3
+ /*
4
+ * @Author ParaTheme
5
+ * Copyright: 2015 ParaTheme
6
+ */
7
+
8
+ if ( ! defined('ABSPATH')) exit; // if direct access
9
+
10
+
11
+
12
+ if(empty($_POST['wcps_hidden']))
13
+ {
14
+
15
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
16
+
17
+
18
+
19
+ }
20
+ else
21
+ {
22
+
23
+
24
+ if($_POST['wcps_hidden'] == 'Y') {
25
+ //Form data sent
26
+
27
+
28
+ $wcps_ribbons = stripslashes_deep($_POST['wcps_ribbons']);
29
+ update_option('wcps_ribbons', $wcps_ribbons);
30
+
31
+
32
+
33
+
34
+
35
+ ?>
36
+ <div class="updated"><p><strong><?php _e('Changes Saved.' ); ?></strong></p></div>
37
+
38
+ <?php
39
+ }
40
+ }
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+ ?>
49
+
50
+
51
+
52
+
53
+
54
+ <div class="wrap">
55
+
56
+ <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__(wcps_plugin_name.' Settings')."</h2>";?>
57
+ <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
58
+ <input type="hidden" name="wcps_hidden" value="Y">
59
+ <?php settings_fields( 'wcps_plugin_options' );
60
+ do_settings_sections( 'wcps_plugin_options' );
61
+
62
+ ?>
63
+
64
+
65
+ <div class="para-settings">
66
+ <ul class="tab-nav">
67
+ <li nav="2" class="nav2 active">Help</li>
68
+ </ul> <!-- tab-nav end -->
69
+
70
+ <ul class="box">
71
+
72
+ <li style="display: block;" class="box2 tab-box active">
73
+
74
+ <div class="option-box">
75
+ <p class="option-title">Need Help ?</p>
76
+ <p class="option-info">Feel free to contact with any issue for this plugin, Ask any question via forum <a href="<?php echo wcps_qa_url; ?>"><?php echo wcps_qa_url; ?></a> <strong style="color:#139b50;">(free)</strong><br />
77
+
78
+ <?php
79
+
80
+ if(wcps_customer_type=="free")
81
+ {
82
+
83
+ echo 'You are using <strong> '.wcps_customer_type.' version '.wcps_plugin_version.'</strong> of <strong>'.wcps_plugin_name.'</strong>, To get more feature you could try our premium version. ';
84
+
85
+ echo '<br /><a href="'.wcps_pro_url.'">'.wcps_pro_url.'</a>';
86
+
87
+ }
88
+ else
89
+ {
90
+
91
+ echo 'Thanks for using <strong> premium version '.wcps_plugin_version.'</strong> of <strong>'.wcps_plugin_name.'</strong> ';
92
+
93
+
94
+ }
95
+
96
+ ?>
97
+
98
+
99
+ </p>
100
+
101
+ </div>
102
+ <div class="option-box">
103
+ <p class="option-title">Submit Reviews...</p>
104
+ <p class="option-info">We are working hard to build some awesome plugins for you and spend thousand hour for plugins. we wish your three(3) minute by submitting five star reviews at wordpress.org. if you have any issue please submit at forum.</p>
105
+ <img class="wcps-pro-pricing" src="<?php echo wcps_plugin_url."css/five-star.png";?>" /><br />
106
+ <a target="_blank" href="<?php echo wcps_wp_reviews; ?>">
107
+ <?php echo wcps_wp_reviews; ?>
108
+ </a>
109
+
110
+
111
+
112
+ </div>
113
+ <div class="option-box">
114
+ <p class="option-title">Please Share</p>
115
+ <p class="option-info">If you like this plugin please share with your social share network.</p>
116
+ <?php
117
+
118
+ echo wcps_share_plugin();
119
+ ?>
120
+ </div>
121
+ <div class="option-box">
122
+ <p class="option-title">Video Tutorial</p>
123
+ <p class="option-info">Please watch this video tutorial.</p>
124
+ <iframe width="640" height="480" src="<?php echo wcps_tutorial_video_url; ?>" frameborder="0" allowfullscreen></iframe>
125
+ </div>
126
+
127
+
128
+ </li>
129
+
130
+ </ul>
131
+
132
+
133
+
134
+ </div>
135
+
136
+
137
+
138
+
139
+ <p class="submit">
140
+ <input class="button button-primary" type="submit" name="Submit" value="<?php _e('Save Changes' ) ?>" />
141
+ </p>
142
+ </form>
143
+
144
+
145
+ </div>
includes/wcps-functions.php CHANGED
@@ -1,12 +1,56 @@
1
<?php
2
3
4
5
function wcps_get_all_product_ids($postid)
6
{
7
8
$wcps_product_ids = get_post_meta( $postid, 'wcps_product_ids', true );
9
-
10
11
12
$return_string = '';
@@ -59,7 +103,7 @@ function wcps_get_taxonomy_category($postid)
59
$wcps_taxonomy = get_post_meta( $postid, 'wcps_taxonomy', true );
60
if(empty($wcps_taxonomy))
61
{
62
- $wcps_taxonomy= "";
63
}
64
$wcps_taxonomy_category = get_post_meta( $postid, 'wcps_taxonomy_category', true );
65
@@ -141,22 +185,53 @@ add_action('wp_ajax_nopriv_wcps_get_taxonomy_category', 'wcps_get_taxonomy_categ
141
142
143
144
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
161
162
@@ -249,4 +324,5 @@ function wcps_dark_color($input_color)
249
}
250
251
252
1
<?php
2
3
+ /*
4
+ * @Author ParaTheme
5
+ * Copyright: 2015 ParaTheme
6
+ */
7
+
8
+ if ( ! defined('ABSPATH')) exit; // if direct access
9
+
10
+ /*
11
+
12
+ function wcps_grid_items($grid_items){
13
+
14
+ $grid_items_extra = array(
15
+ 'thumb1'=>'Thumbnail 1',
16
+ 'title1'=>'Title 1',
17
+ );
18
+
19
+ $grid_items = array_merge($grid_items,$grid_items_extra);
20
+
21
+ return $grid_items;
22
+ }
23
+
24
+ add_filter('wcps_grid_items', 'wcps_grid_items');
25
+
26
+ */
27
+
28
+
29
+
30
+ function wcps_grid_items_reset(){
31
+ $wcps_id = (int)$_POST['wcps_id'];
32
+
33
+ if(delete_post_meta($wcps_id, 'wcps_grid_items')){
34
+ echo 'Reset done!';
35
+ }
36
+ else{
37
+ echo 'Reset failed!';
38
+ }
39
+
40
+ die();
41
+
42
+ }
43
+
44
+ add_action('wp_ajax_wcps_grid_items_reset', 'wcps_grid_items_reset');
45
+ add_action('wp_ajax_nopriv_wcps_grid_items_reset', 'wcps_grid_items_reset');
46
+
47
48
49
function wcps_get_all_product_ids($postid)
50
{
51
52
$wcps_product_ids = get_post_meta( $postid, 'wcps_product_ids', true );
53
+ $wcps_query_orderby = get_post_meta( $postid, 'wcps_query_orderby', true );
54
55
56
$return_string = '';
103
$wcps_taxonomy = get_post_meta( $postid, 'wcps_taxonomy', true );
104
if(empty($wcps_taxonomy))
105
{
106
+ $wcps_taxonomy= "product_cat";
107
}
108
$wcps_taxonomy_category = get_post_meta( $postid, 'wcps_taxonomy_category', true );
109
185
186
187
188
+ function wcps_get_product_categories($postid)
189
+ {
190
+
191
+ $taxonomy= "product_cat";
192
+ $wcps_taxonomy_category = get_post_meta( $postid, 'wcps_slide_categories', true );
193
+ $args=array(
194
+ 'orderby' => 'name',
195
+ 'order' => 'ASC',
196
+ 'taxonomy' => $taxonomy,
197
+ );
198
+
199
+ $categories = get_categories($args);
200
+
201
+
202
+ if(empty($categories))
203
+ {
204
+ echo "No categories found!";
205
+ $categories = array();
206
+ }
207
+
208
+
209
+ $html = '';
210
+ $html .= '<ul style="margin: 0;">';
211
+
212
+ foreach($categories as $category){
213
+
214
+ if(array_search($category->cat_ID, $wcps_taxonomy_category))
215
+ {
216
+ $html .= '<li class='.$category->cat_ID.'><label ><input checked type="checkbox" name="wcps_slide_categories['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
217
+ }
218
+
219
+ else
220
+ {
221
+ $html .= '<li class='.$category->cat_ID.'><label ><input type="checkbox" name="wcps_slide_categories['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
222
+ }
223
+
224
+
225
226
+
227
+ }
228
+
229
+ $html .= '</ul>';
230
+
231
+ echo $html;
232
+
233
+
234
+ }
235
236
237
324
}
325
326
327
+
328
includes/wcps-meta.php CHANGED
@@ -1,5 +1,11 @@
1
<?php
2
3
4
function wcps_posttype_register() {
5
@@ -67,18 +73,25 @@ function meta_boxes_wcps_input( $post ) {
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
70
$wcps_column_number = get_post_meta( $post->ID, 'wcps_column_number', true );
71
-
72
73
$wcps_auto_play = get_post_meta( $post->ID, 'wcps_auto_play', true );
74
$wcps_stop_on_hover = get_post_meta( $post->ID, 'wcps_stop_on_hover', true );
75
$wcps_slider_navigation = get_post_meta( $post->ID, 'wcps_slider_navigation', true );
76
$wcps_slider_navigation_speed = get_post_meta( $post->ID, 'wcps_slider_navigation_speed', true );
77
-
78
$wcps_slider_pagination = get_post_meta( $post->ID, 'wcps_slider_pagination', true );
79
$wcps_pagination_slide_speed = get_post_meta( $post->ID, 'wcps_pagination_slide_speed', true );
80
$wcps_slider_pagination_count = get_post_meta( $post->ID, 'wcps_slider_pagination_count', true );
81
82
83
$wcps_slider_touch_drag = get_post_meta( $post->ID, 'wcps_slider_touch_drag', true );
84
$wcps_slider_mouse_drag = get_post_meta( $post->ID, 'wcps_slider_mouse_drag', true );
@@ -93,22 +106,63 @@ function meta_boxes_wcps_input( $post ) {
93
94
$wcps_product_ids = get_post_meta( $post->ID, 'wcps_product_ids', true );
95
96
97
98
$wcps_cart_bg = get_post_meta( $post->ID, 'wcps_cart_bg', true );
99
-
100
$wcps_items_thumb_size = get_post_meta( $post->ID, 'wcps_items_thumb_size', true );
101
$wcps_items_thumb_max_hieght = get_post_meta( $post->ID, 'wcps_items_thumb_max_hieght', true );
102
103
- $wcps_items_empty_thumb = get_post_meta( $post->ID, 'wcps_items_empty_thumb', true );
104
105
106
- $wcps_ribbon_name = get_post_meta( $post->ID, 'wcps_ribbon_name', true );
107
108
109
110
111
112
?>
113
114
@@ -138,6 +192,7 @@ function meta_boxes_wcps_input( $post ) {
138
<li nav="1" class="nav1 active">Options</li>
139
<li nav="2" class="nav2">Style</li>
140
<li nav="3" class="nav3">Content</li>
141
</ul> <!-- tab-nav end -->
142
143
<ul class="box">
@@ -151,13 +206,27 @@ function meta_boxes_wcps_input( $post ) {
151
<div class="option-box">
152
<p class="option-title">Slider Column Number</p>
153
<p class="option-info"></p>
154
- In Destop: <br />
155
- <input type="text" size="5" name="wcps_column_number" value="<?php if(!empty($wcps_column_number))echo $wcps_column_number; else echo 5; ?>" />
156
-
157
</div>
158
159
160
161
<div class="option-box">
162
<p class="option-title">Slider Auto Play</p>
163
<p class="option-info"></p>
@@ -205,7 +274,28 @@ function meta_boxes_wcps_input( $post ) {
205
<?php
206
}
207
?>
208
- </div>
209
210
<div class="option-box">
211
<p class="option-title">Slider Pagination at Bottom</p>
@@ -248,7 +338,7 @@ function meta_boxes_wcps_input( $post ) {
248
<p class="option-title">Pagination Slide Speed</p>
249
<p class="option-info"></p>
250
<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"; ?>" />
251
- </div>
252
253
<div class="option-box">
254
<p class="option-title">Slider Touch Drag Enabled</p>
@@ -288,12 +378,31 @@ function meta_boxes_wcps_input( $post ) {
288
<div class="option-box">
289
<p class="option-title">Themes</p>
290
<p class="option-info"></p>
291
<select name="wcps_themes" >
292
- <option class="wcps_themes_flat" value="flat" <?php if($wcps_themes=="flat")echo "selected"; ?>>Flat</option>
293
- <option class="wcps_themes_rossi" value="rossi" <?php if($wcps_themes=="rossi")echo "selected"; ?>>Rossi</option>
294
-
295
- </select>
296
</div>
297
298
299
<div class="option-box">
@@ -301,13 +410,14 @@ function meta_boxes_wcps_input( $post ) {
301
<p class="option-info"></p>
302
<?php
303
304
- echo '<select name="wcps_ribbon_name" >';
305
306
if(empty($wcps_ribbon_name))
307
{
308
$wcps_ribbon_name = "";
309
}
310
echo '<option value="none" '.(($wcps_ribbon_name=="none" ) ? "selected" : "").' >None</option>';
311
echo '<option value="free" '.(($wcps_ribbon_name=="free" ) ? "selected" : "").' >Free</option>';
312
echo '<option value="save" '.(($wcps_ribbon_name=="save" ) ? "selected" : "").' >Save</option>';
313
echo '<option value="hot" '.(($wcps_ribbon_name=="hot" ) ? "selected" : "").' >Hot</option>';
@@ -341,27 +451,30 @@ function meta_boxes_wcps_input( $post ) {
341
342
343
344
- ?>
345
- </div>
346
-
347
-
348
- <div class="option-box">
349
- <p class="option-title">Slider Thumbnail Size</p>
350
- <p class="option-info"></p>
351
- <select name="wcps_items_thumb_size" >
352
- <option value="thumbnail" <?php if($wcps_items_thumb_size=="thumbnail")echo "selected"; ?>>Thumbnail</option>
353
- <option value="medium" <?php if($wcps_items_thumb_size=="medium")echo "selected"; ?>>medium</option>
354
- <option value="large" <?php if($wcps_items_thumb_size=="large")echo "selected"; ?>>large</option>
355
- <option value="full" <?php if($wcps_items_thumb_size=="full")echo "selected"; ?>>full</option>
356
357
- </select>
358
</div>
359
360
- <div class="option-box">
361
- <p class="option-title">Slider thumb max hieght(px)</p>
362
- <p class="option-info"></p>
363
- <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"; ?>" />
364
- </div>
365
366
<div class="option-box">
367
<p class="option-title">Background Image</p>
@@ -435,27 +548,70 @@ function meta_boxes_wcps_input( $post ) {
435
436
437
438
- ?>
439
440
441
442
</div>
443
444
<div class="option-box">
445
- <p class="option-title">Add to cart Background Color</p>
446
<p class="option-info"></p>
447
- <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"; ?>" />
448
- </div>
449
-
450
</li>
451
<li style="display: none;" class="box3 tab-box ">
452
453
<div class="option-box">
454
<p class="option-title">Empty Thumbnail</p>
455
<p class="option-info"></p>
456
- <input type="text" name="wcps_items_empty_thumb" id="wcps_items_empty_thumb" value="<?php if(!empty($wcps_items_empty_thumb)) echo $wcps_items_empty_thumb; ?>" /><br />
457
<input id="wcps_items_empty_thumb_upload" class="wcps_items_empty_thumb_upload button" type="button" value="Upload Image" />
458
- <br />
459
460
461
<?php
@@ -518,33 +674,65 @@ function meta_boxes_wcps_input( $post ) {
518
</script>
519
</div>
520
521
<div class="option-box">
522
<p class="option-title">Filter Slider Content.</p>
523
<p class="option-info"></p>
524
<ul class="content_source_area" >
525
- <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>
526
- <div class="wcps_content_source_latest content-source-box">Slider items will query from latest published product.</div>
527
- </li>
528
-
529
- <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>
530
- <div class="wcps_content_source_older content-source-box">Slider items will query from older published product.</div>
531
- </li>
532
533
<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 Product</label>
534
535
<div class="wcps_content_source_featured content-source-box">Slider items will query from featured marked product.</div>
536
</li>
537
-
538
-
539
540
<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>
541
542
<div class="wcps_content_source_year content-source-box">Slider items will query from a year.
543
<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" />
544
</div>
545
</li>
546
-
547
-
548
<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>
549
550
<div class="wcps_content_source_month content-source-box">Slider items will query from Month of a year. <br />
@@ -553,27 +741,393 @@ function meta_boxes_wcps_input( $post ) {
553
</div>
554
</li>
555
556
-
557
</ul>
558
- </div>
559
-
560
- </li>
561
- </ul>
562
-
563
-
564
-
565
566
567