Post Grid - Version 1.0

Version Description

  • 06/02/2015 Initial release.
Download this release

Release Info

Developer paratheme
Plugin Icon 128x128 Post Grid
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (53) hide show
  1. ParaAdmin/cross-mark.png +0 -0
  2. ParaAdmin/css/ParaAdmin.css +394 -0
  3. ParaAdmin/css/ParaIcons.css +82 -0
  4. ParaAdmin/css/icons/browser-firefox.png +0 -0
  5. ParaAdmin/css/icons/device-monitor.png +0 -0
  6. ParaAdmin/css/icons/globe.png +0 -0
  7. ParaAdmin/css/icons/keywords.png +0 -0
  8. ParaAdmin/css/icons/map-pin.png +0 -0
  9. ParaAdmin/css/icons/os-apple.png +0 -0
  10. ParaAdmin/css/icons/os-windows.png +0 -0
  11. ParaAdmin/css/icons/page.png +0 -0
  12. ParaAdmin/css/icons/share-hub.png +0 -0
  13. ParaAdmin/css/icons/user-crowd.png +0 -0
  14. ParaAdmin/css/icons/user-group.png +0 -0
  15. ParaAdmin/js/ParaAdmin.js +33 -0
  16. ParaAdmin/tik-mark.png +0 -0
  17. css/bg/bgnoise_lg.png +0 -0
  18. css/bg/congruent_outline.png +0 -0
  19. css/bg/congruent_pentagon.png +0 -0
  20. css/bg/food.png +0 -0
  21. css/bg/giftly.png +0 -0
  22. css/bg/retina_wood.png +0 -0
  23. css/bg/skulls.png +0 -0
  24. css/bg/wood_pattern.png +0 -0
  25. css/five-star.png +0 -0
  26. css/icons/author.png +0 -0
  27. css/icons/categorys.png +0 -0
  28. css/icons/cayegory.png +0 -0
  29. css/icons/comment.png +0 -0
  30. css/icons/comments.png +0 -0
  31. css/icons/facebook.png +0 -0
  32. css/icons/gplus.png +0 -0
  33. css/icons/tag.png +0 -0
  34. css/icons/tags.png +0 -0
  35. css/icons/time.png +0 -0
  36. css/icons/twitter.png +0 -0
  37. css/loading.gif +0 -0
  38. css/no-thumb.png +0 -0
  39. css/style.css +322 -0
  40. includes/post-grid-functions.php +257 -0
  41. includes/post-grid-meta.php +589 -0
  42. index.php +2 -0
  43. js/masonry.pkgd.min.js +9 -0
  44. js/scripts.js +93 -0
  45. post-grid-help.php +139 -0
  46. post-grid.php +138 -0
  47. readme.txt +73 -0
  48. themes/flat/index.php +186 -0
  49. themes/flat/style.css +78 -0
  50. themes/masonry/index.php +218 -0
  51. themes/masonry/style.css +83 -0
  52. themes/rounded/index.php +185 -0
  53. themes/rounded/style.css +82 -0
ParaAdmin/cross-mark.png ADDED
Binary file
ParaAdmin/css/ParaAdmin.css ADDED
@@ -0,0 +1,394 @@
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+ /*Admin CSS*/
6
+
7
+ .para-settings {
8
+ margin: 20px 0;
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
+
24
+ .para-settings .option-box .option-title {
25
+ font-size: 16px;
26
+ font-weight: bold;
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;
34
+ }
35
+
36
+ .para-settings ul.tab-nav {
37
+ clear: both;
38
+ margin: 0;
39
+ padding: 0;
40
+ }
41
+
42
+ .para-settings ul.tab-nav li {
43
+ background: none repeat scroll 0 0 rgb(230, 230, 230);
44
+ border-left: 1px solid rgb(199, 199, 199);
45
+ cursor: pointer;
46
+ display: inline-block;
47
+ float: left;
48
+ margin: 0;
49
+ padding: 8px 15px;
50
+ }
51
+
52
+ .para-settings ul.tab-nav li.active{
53
+ background:#d8d6d6;
54
+ border-top:2px solid #11b063;
55
+ padding-top:6px;
56
+ font-weight: bold;
57
+ }
58
+ .para-settings ul.box {
59
+ clear: both;
60
+ margin: 0;
61
+ padding: 0;
62
+ }
63
+
64
+ .para-settings ul.box li.tab-box {
65
+ border: 1px solid rgb(153, 153, 153);
66
+ display: none;
67
+ margin: 0;
68
+ width: 100%;
69
+ }
70
+
71
+
72
+
73
+
74
+ .para-settings .new_user_profile_social {
75
+ margin: 15px 5px;
76
+ }
77
+
78
+
79
+
80
+ .para-settings ul.voting-bg-img-list{}
81
+
82
+ .para-settings ul.voting-bg-img-list li {
83
+ display: inline-block;
84
+ margin: 5px;
85
+ }
86
+ .para-settings ul.voting-bg-img-list li.bg-selected {}
87
+
88
+ .para-settings ul.voting-bg-img-list li img{border: 2px solid #ffffff;}
89
+
90
+ .para-settings ul.voting-bg-img-list li.bg-selected img{
91
+ border: 2px solid #ff5a11;
92
+ }
93
+
94
+
95
+ .para-settings h2 {
96
+ font-size: 20px;
97
+ font-weight: bold;
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;
354
+ float: none;
355
+
356
+ }
357
+
358
+ .para-settings ul.tab-nav li.active{
359
+ font-weight: bold;
360
+ }
361
+
362
+
363
+
364
+
365
+
366
+ .para-settings .pricing-table .column {
367
+ display:block;
368
+ float:none;
369
+ width:100%;
370
+ border-right: 1px solid #ff9601;
371
+ margin: 50px 0;
372
+
373
+ }
374
+
375
+
376
+
377
+
378
+
379
+
380
+ }
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
ParaAdmin/css/ParaIcons.css ADDED
@@ -0,0 +1,82 @@
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+ /*Admin CSS*/
6
+
7
+ .para-icons {
8
+ padding-left: 25px;
9
+
10
+ }
11
+
12
+ .para-icons.globe {
13
+ background: url("icons/globe.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
14
+
15
+ }
16
+
17
+ .para-icons.os-windows {
18
+ background: url("icons/os-windows.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
19
+
20
+ }
21
+
22
+
23
+ .para-icons.device-monitor {
24
+ background: url("icons/device-monitor.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
25
+
26
+ }
27
+
28
+ .para-icons.browser-firefox {
29
+ background: url("icons/browser-firefox.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
30
+
31
+ }
32
+
33
+
34
+ .para-icons.keywords {
35
+ background: url("icons/keywords.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
36
+
37
+ }
38
+
39
+ .para-icons.map-pin {
40
+ background: url("icons/map-pin.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
41
+
42
+ }
43
+
44
+
45
+
46
+ .para-icons.share-hub {
47
+ background: url("icons/share-hub.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
48
+
49
+ }
50
+
51
+ .para-icons.page {
52
+ background: url("icons/page.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
53
+
54
+ }
55
+
56
+ .para-icons.user-group {
57
+ background: url("icons/user-group.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
58
+
59
+ }
60
+
61
+ .para-icons.user-crowd {
62
+ background: url("icons/user-crowd.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
63
+
64
+ }
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
ParaAdmin/css/icons/browser-firefox.png ADDED
Binary file
ParaAdmin/css/icons/device-monitor.png ADDED
Binary file
ParaAdmin/css/icons/globe.png ADDED
Binary file
ParaAdmin/css/icons/keywords.png ADDED
Binary file
ParaAdmin/css/icons/map-pin.png ADDED
Binary file
ParaAdmin/css/icons/os-apple.png ADDED
Binary file
ParaAdmin/css/icons/os-windows.png ADDED
Binary file
ParaAdmin/css/icons/page.png ADDED
Binary file
ParaAdmin/css/icons/share-hub.png ADDED
Binary file
ParaAdmin/css/icons/user-crowd.png ADDED
Binary file
ParaAdmin/css/icons/user-group.png ADDED
Binary file
ParaAdmin/js/ParaAdmin.js ADDED
@@ -0,0 +1,33 @@
1
+
2
+ jQuery(document).ready(function($)
3
+ {
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ $(document).on('click', '.tab-nav li', function()
13
+ {
14
+ $(".active").removeClass("active");
15
+ $(this).addClass("active");
16
+
17
+ var nav = $(this).attr("nav");
18
+
19
+ $(".box li.tab-box").css("display","none");
20
+ $(".box"+nav).css("display","block");
21
+
22
+ })
23
+
24
+
25
+
26
+ });
27
+
28
+
29
+
30
+
31
+
32
+
33
+
ParaAdmin/tik-mark.png ADDED
Binary file
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/five-star.png ADDED
Binary file
css/icons/author.png ADDED
Binary file
css/icons/categorys.png ADDED
Binary file
css/icons/cayegory.png ADDED
Binary file
css/icons/comment.png ADDED
Binary file
css/icons/comments.png ADDED
Binary file
css/icons/facebook.png ADDED
Binary file
css/icons/gplus.png ADDED
Binary file
css/icons/tag.png ADDED
Binary file
css/icons/tags.png ADDED
Binary file
css/icons/time.png ADDED
Binary file
css/icons/twitter.png ADDED
Binary file
css/loading.gif ADDED
Binary file
css/no-thumb.png ADDED
Binary file
css/style.css ADDED
@@ -0,0 +1,322 @@
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+
4
+
5
+
6
+ ul.post_grid_bg_img_list{}
7
+
8
+ ul.post_grid_bg_img_list li {
9
+ display: inline-block;
10
+ margin: 5px;
11
+ }
12
+ ul.post_grid_bg_img_list li.bg-selected {}
13
+
14
+ ul.post_grid_bg_img_list li img{border: 2px solid #ffffff;}
15
+
16
+ ul.post_grid_bg_img_list li.bg-selected img{
17
+ border: 2px solid #ff5a11;
18
+ }
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ .post-grid-container-main {
31
+ padding: 50px 20px;
32
+ text-align: center;
33
+ }
34
+
35
+ /**************/
36
+ .post-grid-container .social-icon {
37
+ color: rgb(255, 0, 0);
38
+ position: absolute;
39
+ transition: all 0.3s ease 0s;
40
+ }
41
+
42
+
43
+ .post-grid-container .social-icon.LeftTop {
44
+ top: 10px;
45
+ left: -100px;
46
+ }
47
+ .post-grid-container .thumb:hover .social-icon.LeftTop {
48
+ left: 10px;
49
+ }
50
+
51
+
52
+
53
+ .post-grid-container .social-icon.LeftBottom {
54
+ bottom: 10px;
55
+ left: -100px;
56
+ }
57
+ .post-grid-container .thumb:hover .social-icon.LeftBottom {
58
+ left: 10px;
59
+ }
60
+ .post-grid-container .social-icon.RightTop {
61
+ top: 10px;
62
+ right: -100px;
63
+ }
64
+ .post-grid-container .thumb:hover .social-icon.RightTop {
65
+ right: 10px;
66
+ }
67
+ .post-grid-container .social-icon.RightBottom {
68
+ bottom: 10px;
69
+ right: -100px;
70
+ }
71
+
72
+ .post-grid-container .thumb:hover .social-icon.RightBottom {
73
+ right: 10px;
74
+ }
75
+
76
+
77
+ .post-grid-container .social-icon.TopMiddle {
78
+ text-align: center;
79
+ top: -100px;
80
+ width: 100%;
81
+ }
82
+
83
+ .post-grid-container .thumb:hover .social-icon.TopMiddle {
84
+ top: 15%;
85
+ }
86
+
87
+
88
+ .post-grid-container .social-icon.BottomMiddle {
89
+ text-align: center;
90
+ bottom: -100px;
91
+ width: 100%;
92
+ }
93
+
94
+ .post-grid-container .thumb:hover .social-icon.BottomMiddle {
95
+ bottom: 15%;
96
+ }
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ .post-grid-container .social-icon span {
105
+ display: inline-block;
106
+ height: 24px;
107
+ width: 24px;
108
+ }
109
+
110
+ .post-grid-container .social-icon span a {
111
+ display: block;
112
+ height: 100%;
113
+ width: 100%;
114
+ }
115
+
116
+
117
+ .post-grid-container .social-icon .fb {
118
+ background: url("icons/facebook.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
119
+ }
120
+ .post-grid-container .social-icon .twitter {
121
+ background: url("icons/twitter.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
122
+ }
123
+ .post-grid-container .social-icon .gplus {
124
+ background: url("icons/gplus.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
125
+ }
126
+
127
+
128
+
129
+ .post-grid-container .meta {
130
+ padding: 10px 0;
131
+ text-align: left;
132
+ }
133
+
134
+ .post-grid-container .meta span {
135
+ display: inline-block;
136
+ font-size: 11px;
137
+ height: 20px;
138
+ margin-right: 15px;
139
+ padding-left: 20px;
140
+ }
141
+
142
+ .post-grid-container .meta span a {
143
+ text-decoration: none;
144
+ }
145
+
146
+
147
+
148
+ .post-grid-container .meta .date {
149
+ background: url("icons/time.png") no-repeat scroll 0 0px rgba(0, 0, 0, 0);
150
+
151
+ }
152
+
153
+ .post-grid-container .meta .author {
154
+ background: url("icons/author.png") no-repeat scroll 0 0px rgba(0, 0, 0, 0);
155
+
156
+ }
157
+ .post-grid-container .meta .cayegory {
158
+ background: url("icons/cayegory.png") no-repeat scroll 0 0px rgba(0, 0, 0, 0);
159
+
160
+ }
161
+ .post-grid-container .meta .tags {
162
+ background: url("icons/tags.png") no-repeat scroll 0 0px rgba(0, 0, 0, 0);
163
+
164
+ }
165
+ .post-grid-container .meta .comments {
166
+ background: url("icons/comments.png") no-repeat scroll 0 0px rgba(0, 0, 0, 0);
167
+
168
+ }
169
+
170
+
171
+
172
+
173
+
174
+ /* ############################################## */
175
+
176
+
177
+
178
+
179
+ .post-grid-container .link {
180
+ position: absolute;
181
+ text-align: center;
182
+ width: 100%;
183
+ transition: all 0.5s ease 0s;
184
+ }
185
+
186
+
187
+ .post-grid-container .link.TopMiddle {
188
+ top: -100%;
189
+
190
+ }
191
+
192
+ .post-grid-container .thumb:hover .link.TopMiddle {
193
+ top: 30%;
194
+
195
+ }
196
+ .post-grid-container .link.BottomMiddle {
197
+ bottom: -100%;
198
+ }
199
+
200
+ .post-grid-container .thumb:hover .link.BottomMiddle {
201
+ bottom: 50%;
202
+
203
+ }
204
+ .post-grid-container .link.LeftMiddle {
205
+ left: -100%;
206
+ top: 30%;
207
+
208
+ }
209
+
210
+ .post-grid-container .thumb:hover .link.LeftMiddle {
211
+ left: 0;
212
+
213
+ }
214
+
215
+
216
+ .post-grid-container .link.RightMiddle {
217
+ right: -100%;
218
+ top: 30%;
219
+ }
220
+
221
+ .post-grid-container .thumb:hover .link.RightMiddle {
222
+ right: 0;
223
+
224
+ }
225
+
226
+
227
+
228
+ .post-grid-container .link a {
229
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
230
+ border: 1px solid rgb(226, 226, 226);
231
+ border-radius: 3px;
232
+ color: rgb(255, 255, 255) !important;
233
+ font-size: 12px;
234
+ padding: 5px 15px;
235
+ text-decoration: none;
236
+ }
237
+
238
+ /* ############################################## */
239
+
240
+ .post-grid-container .link.zoomIn {
241
+ transform: scale(0);
242
+ }
243
+
244
+ .post-grid-container .thumb:hover .link.zoomIn {
245
+ transform: scale(1.2);
246
+
247
+ }
248
+
249
+ .post-grid-container .link.fadeIn {
250
+ opacity: 0;
251
+ }
252
+
253
+ .post-grid-container .thumb:hover .link.fadeIn {
254
+ opacity: 1;
255
+ }
256
+
257
+ .post-grid-container .link.rotate {
258
+ transform: rotate(0deg);
259
+ }
260
+
261
+ .post-grid-container .thumb:hover .link.rotate {
262
+ transform: rotate(360deg);
263
+ }
264
+
265
+
266
+
267
+
268
+ /* ###################paginate########################### */
269
+
270
+
271
+ .post-grid-container-main .paginate {
272
+
273
+ }
274
+
275
+ .post-grid-container-main .paginate .page-numbers {
276
+ background: none repeat scroll 0 0 rgb(31, 191, 69);
277
+ color: rgb(255, 255, 255);
278
+ display: inline-block;
279
+ margin: 3px 0;
280
+ padding: 3px 8px;
281
+ text-decoration: none;
282
+ }
283
+
284
+ .post-grid-container-main .paginate .page-numbers:hover {
285
+ background: none repeat scroll 0 0 rgb(14, 140, 44);
286
+ }
287
+
288
+ .post-grid-container-main .paginate span{
289
+
290
+ }
291
+ .post-grid-container-main .paginate a{
292
+
293
+ }
294
+ .post-grid-container-main .paginate .current {
295
+ background: none repeat scroll 0 0 rgb(14, 140, 44);
296
+ }
297
+
298
+
299
+
300
+
301
+ .post-grid-container .load-more {
302
+ margin-top: 50px;
303
+ text-align: center;
304
+ }
305
+ .post-grid-container .load-more .load {
306
+ background: none repeat scroll 0 0 rgb(31, 191, 69);
307
+ color: rgb(255, 255, 255);
308
+ cursor: pointer;
309
+ padding: 7px 10px;
310
+ }
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
includes/post-grid-functions.php ADDED
@@ -0,0 +1,257 @@
1
+ <?php
2
+
3
+
4
+
5
+ function post_grid_get_all_product_ids($postid)
6
+ {
7
+
8
+ $post_grid_product_ids = get_post_meta( $postid, 'post_grid_product_ids', true );
9
+
10
+
11
+
12
+ $return_string = '';
13
+ $return_string .= '<ul style="margin: 0;">';
14
+
15
+
16
+
17
+ $args_product = array(
18
+ 'post_type' => 'product',
19
+ 'posts_per_page' => -1,
20
+ );
21
+
22
+ $product_query = new WP_Query( $args_product );
23
+
24
+ if($product_query->have_posts()): while($product_query->have_posts()): $product_query->the_post();
25
+
26
+
27
+ $return_string .= '<li><label ><input class="post_grid_product_ids" type="checkbox" name="post_grid_product_ids['.get_the_ID().']" value ="'.get_the_ID().'" ';
28
+
29
+ if ( isset( $post_grid_product_ids[get_the_ID()] ) )
30
+ {
31
+ $return_string .= "checked";
32
+ }
33
+
34
+
35
+
36
+
37
+ $return_string .= '/>';
38
+
39
+ $return_string .= get_the_title().'</label ></li>';
40
+
41
+ endwhile; endif; wp_reset_query();
42
+
43
+
44
+ $return_string .= '</ul>';
45
+ echo $return_string;
46
+
47
+ }
48
+
49
+
50
+
51
+
52
+
53
+
54
+ function post_grid_get_taxonomy_category($postid)
55
+ {
56
+
57
+
58
+
59
+ $post_grid_taxonomy = get_post_meta( $postid, 'post_grid_taxonomy', true );
60
+ if(empty($post_grid_taxonomy))
61
+ {
62
+ $post_grid_taxonomy= "";
63
+ }
64
+ $post_grid_taxonomy_category = get_post_meta( $postid, 'post_grid_taxonomy_category', true );
65
+
66
+
67
+ if(empty($post_grid_taxonomy_category))
68
+ {
69
+ $post_grid_taxonomy_category =array('none'); // an empty array when no category element selected
70
+
71
+
72
+ }
73
+
74
+
75
+
76
+ if(!isset($_POST['taxonomy']))
77
+ {
78
+ $taxonomy =$post_grid_taxonomy;
79
+ }
80
+ else
81
+ {
82
+ $taxonomy = $_POST['taxonomy'];
83
+ }
84
+
85
+
86
+ $args=array(
87
+ 'orderby' => 'name',
88
+ 'order' => 'ASC',
89
+ 'taxonomy' => $taxonomy,
90
+ );
91
+
92
+ $categories = get_categories($args);
93
+
94
+
95
+ if(empty($categories))
96
+ {
97
+ echo "No Items Found!";
98
+ }
99
+
100
+
101
+ $return_string = '';
102
+ $return_string .= '<ul style="margin: 0;">';
103
+
104
+ foreach($categories as $category){
105
+
106
+ if(array_search($category->cat_ID, $post_grid_taxonomy_category))
107
+ {
108
+ $return_string .= '<li class='.$category->cat_ID.'><label ><input class="post_grid_taxonomy_category" checked type="checkbox" name="post_grid_taxonomy_category['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
109
+ }
110
+
111
+ else
112
+ {
113
+ $return_string .= '<li class='.$category->cat_ID.'><label ><input class="post_grid_taxonomy_category" type="checkbox" name="post_grid_taxonomy_category['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
114
+ }
115
+
116
+
117
+
118
+
119
+ }
120
+
121
+ $return_string .= '</ul>';
122
+
123
+ echo $return_string;
124
+
125
+ if(isset($_POST['taxonomy']))
126
+ {
127
+ die();
128
+ }
129
+
130
+
131
+ }
132
+
133
+ add_action('wp_ajax_post_grid_get_taxonomy_category', 'post_grid_get_taxonomy_category');
134
+ add_action('wp_ajax_nopriv_post_grid_get_taxonomy_category', 'post_grid_get_taxonomy_category');
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ function post_grid_fix_pagination($link) {
156
+
157
+ return str_replace('#038;', '&', $link);
158
+
159
+ }
160
+ add_filter('paginate_links', 'post_grid_fix_pagination');
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
+ function post_grid_dark_color($input_color)
197
+ {
198
+ if(empty($input_color))
199
+ {
200
+ return "";
201
+ }
202
+ else
203
+ {
204
+ $input = $input_color;
205
+
206
+ $col = Array(
207
+ hexdec(substr($input,1,2)),
208
+ hexdec(substr($input,3,2)),
209
+ hexdec(substr($input,5,2))
210
+ );
211
+ $darker = Array(
212
+ $col[0]/2,
213
+ $col[1]/2,
214
+ $col[2]/2
215
+ );
216
+
217
+ return "#".sprintf("%02X%02X%02X", $darker[0], $darker[1], $darker[2]);
218
+ }
219
+
220
+
221
+
222
+ }
223
+
224
+
225
+
226
+
227
+
228
+ function post_grid_share_plugin()
229
+ {
230
+
231
+ ?>
232
+ <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwoocommerce-products-slider%2F&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80&amp;appId=652982311485932" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:80px;" allowTransparency="true"></iframe>
233
+
234
+ <br />
235
+ <!-- Place this tag in your head or just before your close body tag. -->
236
+ <script src="https://apis.google.com/js/platform.js" async defer></script>
237
+
238
+ <!-- Place this tag where you want the +1 button to render. -->
239
+ <div class="g-plusone" data-size="medium" data-annotation="inline" data-width="300" data-href="<?php echo post_grid_share_url; ?>"></div>
240
+
241
+ <br />
242
+ <br />
243
+ <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo post_grid_share_url; ?>" data-text="<?php echo post_grid_plugin_name; ?>" data-via="ParaTheme" data-hashtags="WordPress">Tweet</a>
244
+ <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>
245
+
246
+
247
+
248
+ <?php
249
+
250
+
251
+
252
+
253
+
254
+ }
255
+
256
+
257
+
includes/post-grid-meta.php ADDED
@@ -0,0 +1,589 @@
1
+ <?php
2
+
3
+
4
+ function post_grid_posttype_register() {
5
+
6
+ $labels = array(
7
+ 'name' => _x('Post Grid', 'post_grid'),
8
+ 'singular_name' => _x('Post Grid', 'post_grid'),
9
+ 'add_new' => _x('New Post Grid', 'post_grid'),
10
+ 'add_new_item' => __('New Post Grid'),
11
+ 'edit_item' => __('Edit Post Grid'),
12
+ 'new_item' => __('New Post Grid'),
13
+ 'view_item' => __('View Post Grid'),
14
+ 'search_items' => __('Search Post Grid'),
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( 'post_grid' , $args );
37
+
38
+ }
39
+
40
+ add_action('init', 'post_grid_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_post_grid()
50
+ {
51
+ $screens = array( 'post_grid' );
52
+ foreach ( $screens as $screen )
53
+ {
54
+ add_meta_box('post_grid_metabox',__( 'Post Grid Options','post_grid' ),'meta_boxes_post_grid_input', $screen);
55
+ }
56
+ }
57
+ add_action( 'add_meta_boxes', 'meta_boxes_post_grid' );
58
+
59
+
60
+ function meta_boxes_post_grid_input( $post ) {
61
+
62
+ global $post;
63
+ wp_nonce_field( 'meta_boxes_post_grid_input', 'meta_boxes_post_grid_input_nonce' );
64
+
65
+
66
+ $post_grid_post_per_page = get_post_meta( $post->ID, 'post_grid_post_per_page', true );
67
+ $post_grid_themes = get_post_meta( $post->ID, 'post_grid_themes', true );
68
+ $post_grid_bg_img = get_post_meta( $post->ID, 'post_grid_bg_img', true );
69
+ $post_grid_thumb_size = get_post_meta( $post->ID, 'post_grid_thumb_size', true );
70
+ $post_grid_empty_thumb = get_post_meta( $post->ID, 'post_grid_empty_thumb', true );
71
+
72
+ $post_grid_social_share_position = get_post_meta( $post->ID, 'post_grid_social_share_position', true );
73
+ $post_grid_pagination_display = get_post_meta( $post->ID, 'post_grid_pagination_display', true );
74
+
75
+
76
+ $post_grid_read_more_position = get_post_meta( $post->ID, 'post_grid_read_more_position', true );
77
+ $post_grid_read_more_hov_in_style = get_post_meta( $post->ID, 'post_grid_read_more_hov_in_style', true );
78
+ $post_grid_read_more_text = get_post_meta( $post->ID, 'post_grid_read_more_text', true );
79
+
80
+ $post_grid_posttype = get_post_meta( $post->ID, 'post_grid_posttype', true );
81
+
82
+ $post_grid_width = get_post_meta( $post->ID, 'post_grid_width', true );
83
+ $post_grid_thumb_width = get_post_meta( $post->ID, 'post_grid_thumb_width', true );
84
+ $post_grid_thumb_height = get_post_meta( $post->ID, 'post_grid_thumb_height', true );
85
+
86
+ $post_grid_meta_author_display = get_post_meta( $post->ID, 'post_grid_meta_author_display', true );
87
+ $post_grid_meta_date_display = get_post_meta( $post->ID, 'post_grid_meta_date_display', true );
88
+ $post_grid_meta_categories_display = get_post_meta( $post->ID, 'post_grid_meta_categories_display', true );
89
+ $post_grid_meta_tags_display = get_post_meta( $post->ID, 'post_grid_meta_tags_display', true );
90
+ $post_grid_meta_comments_display = get_post_meta( $post->ID, 'post_grid_meta_comments_display', true );
91
+
92
+
93
+
94
+ ?>
95
+
96
+ <div class="para-settings">
97
+ <div class="option-box">
98
+ <p class="option-title">Shortcode</p>
99
+ <p class="option-info">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.</p>
100
+ <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" >[post_grid <?php echo ' id="'.$post->ID.'"';?> ]</textarea>
101
+ <br /><br />
102
+ PHP Code:<br />
103
+ <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" ><?php echo '<?php echo do_shortcode("[post_grid id='; echo "'".$post->ID."' ]"; echo '"); ?>'; ?></textarea>
104
+ </div>
105
+
106
+
107
+ <ul class="tab-nav">
108
+ <li nav="1" class="nav1 active">Options</li>
109
+ <li nav="2" class="nav2">Style</li>
110
+ <li nav="3" class="nav3">Content</li>
111
+ </ul> <!-- tab-nav end -->
112
+
113
+ <ul class="box">
114
+ <li style="display: block;" class="box1 tab-box active">
115
+ <div class="option-box">
116
+ <p class="option-title">Grid Post per page</p>
117
+ <p class="option-info"></p>
118
+ <input type="text" size="5" name="post_grid_post_per_page" value="<?php if(!empty($post_grid_post_per_page))echo $post_grid_post_per_page; else echo 10; ?>" />
119
+ </div>
120
+
121
+ <div class="option-box">
122
+ <p class="option-title">Grid width</p>
123
+ <p class="option-info"></p>
124
+ <input type="text" size="10" name="post_grid_width" value="<?php if(!empty($post_grid_width))echo $post_grid_width; ?>" />
125
+ </div>
126
+
127
+ <div class="option-box">
128
+ <p class="option-title">Grid thumbnail width</p>
129
+ <p class="option-info"></p>
130
+ <input type="text" size="10" name="post_grid_thumb_width" value="<?php if(!empty($post_grid_thumb_width))echo $post_grid_thumb_width; ?>" />
131
+ </div>
132
+
133
+ <div class="option-box">
134
+ <p class="option-title">Grid thumbnail height</p>
135
+ <p class="option-info"></p>
136
+ <input type="text" size="10" name="post_grid_thumb_height" value="<?php if(!empty($post_grid_thumb_height)) echo $post_grid_thumb_height; ?>" />
137
+ </div>
138
+
139
+
140
+ <div class="option-box">
141
+ <p class="option-title">Display Pagination</p>
142
+ <p class="option-info"></p>
143
+
144
+ <select name="post_grid_pagination_display" >
145
+ <option value="yes" <?php if($post_grid_pagination_display=="yes")echo "selected"; ?>>Yes</option>
146
+ <option value="no" <?php if($post_grid_pagination_display=="no")echo "selected"; ?>>No</option>
147
+ </select>
148
+
149
+ </div>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ </li>
158
+ <li style="display: none;" class="box2 tab-box ">
159
+ <div class="option-box">
160
+ <p class="option-title">Themes</p>
161
+ <p class="option-info"></p>
162
+ <select name="post_grid_themes" >
163
+ <option value="flat" <?php if($post_grid_themes=="flat")echo "selected"; ?>>Flat</option>
164
+ <option value="rounded" <?php if($post_grid_themes=="rounded")echo "selected"; ?>>Rounded</option>
165
+ <option value="masonry" <?php if($post_grid_themes=="masonry")echo "selected"; ?>>Masonry</option>
166
+ </select>
167
+ </div>
168
+
169
+ <div class="option-box">
170
+ <p class="option-title"><?php _e('Background Image.','post_grid'); ?></p>
171
+ <p class="option-info"><?php _e('Background image for post grid area.','post_grid'); ?></p>
172
+
173
+ <script>
174
+ jQuery(document).ready(function(jQuery)
175
+ {
176
+ jQuery(".post_grid_bg_img_list li").click(function()
177
+ {
178
+ jQuery('.post_grid_bg_img_list li.bg-selected').removeClass('bg-selected');
179
+ jQuery(this).addClass('bg-selected');
180
+
181
+ var post_grid_bg_img = jQuery(this).attr('data-url');
182
+
183
+ jQuery('#post_grid_bg_img').val(post_grid_bg_img);
184
+
185
+ })
186
+
187
+
188
+ })
189
+
190
+ </script>
191
+
192
+
193
+ <?php
194
+
195
+
196
+
197
+ $dir_path = post_grid_plugin_dir."css/bg/";
198
+ $filenames=glob($dir_path."*.png*");
199
+
200
+
201
+ $post_grid_bg_img = get_post_meta( $post->ID, 'post_grid_bg_img', true );
202
+
203
+ if(empty($post_grid_bg_img))
204
+ {
205
+ $post_grid_bg_img = "";
206
+ }
207
+
208
+
209
+ $count=count($filenames);
210
+
211
+
212
+ $i=0;
213
+ echo "<ul class='post_grid_bg_img_list' >";
214
+
215
+ while($i<$count)
216
+ {
217
+ $filelink= str_replace($dir_path,"",$filenames[$i]);
218
+
219
+ $filelink= post_grid_plugin_url."css/bg/".$filelink;
220
+
221
+
222
+ if($post_grid_bg_img==$filelink)
223
+ {
224
+ echo '<li class="bg-selected" data-url="'.$filelink.'">';
225
+ }
226
+ else
227
+ {
228
+ echo '<li data-url="'.$filelink.'">';
229
+ }
230
+
231
+
232
+ echo "<img width='70px' height='50px' src='".$filelink."' />";
233
+ echo "</li>";
234
+ $i++;
235
+ }
236
+
237
+ echo "</ul>";
238
+
239
+ echo "<input style='width:100%;' value='".$post_grid_bg_img."' placeholder='Please select image or left blank' id='post_grid_bg_img' name='post_grid_bg_img' type='text' />";
240
+
241
+
242
+
243
+ ?>
244
+ </div>
245
+
246
+
247
+ <div class="option-box">
248
+ <p class="option-title"><?php _e('Thumbnail Size.','post_grid'); ?></p>
249
+ <p class="option-info"><?php _e('Thumbnail size of member on grid.','post_grid'); ?></p>
250
+ <select name="post_grid_thumb_size" >
251
+ <option value="none" <?php if($post_grid_thumb_size=="none") echo "selected"; ?>>None</option>
252
+ <option value="thumbnail" <?php if($post_grid_thumb_size=="thumbnail") echo "selected"; ?>>Thumbnail</option>
253
+ <option value="medium" <?php if($post_grid_thumb_size=="medium") echo "selected"; ?>>Medium</option>
254
+ <option value="large" <?php if($post_grid_thumb_size=="large") echo "selected"; ?>>Large</option>
255
+ <option value="full" <?php if($post_grid_thumb_size=="full") echo "selected"; ?>>Full</option>
256
+
257
+ </select>
258
+ </div>
259
+
260
+ <div class="option-box">
261
+ <p class="option-title">Empty Thumbnail</p>
262
+ <p class="option-info"></p>
263
+ <input type="text" name="post_grid_empty_thumb" id="post_grid_empty_thumb" value="<?php if(!empty($post_grid_empty_thumb)) echo $post_grid_empty_thumb; ?>" /><br />
264
+ <input id="post_grid_empty_thumb_upload" class="post_grid_empty_thumb_upload button" type="button" value="Upload Image" />
265
+ <br />
266
+
267
+
268
+ <?php
269
+ if(empty($post_grid_empty_thumb))
270
+ {
271
+ ?>
272
+ <img class="post_grid_empty_thumb_display" width="300px" src="<?php echo wcps_plugin_url.'css/no-thumb.png'; ?>" />
273
+ <?php
274
+ }
275
+ else
276
+ {
277
+ ?>
278
+ <img class="post_grid_empty_thumb_display" width="300px" src="<?php echo $post_grid_empty_thumb; ?>" />
279
+ <?php
280
+ }
281
+ ?>
282
+
283
+
284
+
285
+
286
+
287
+ <script>
288
+ jQuery(document).ready(function($){
289
+
290
+ var custom_uploader;
291
+
292
+ jQuery('#post_grid_empty_thumb_upload').click(function(e) {
293
+
294
+ e.preventDefault();
295
+
296
+ //If the uploader object has already been created, reopen the dialog
297
+ if (custom_uploader) {
298
+ custom_uploader.open();
299
+ return;
300
+ }
301
+
302
+ //Extend the wp.media object
303
+ custom_uploader = wp.media.frames.file_frame = wp.media({
304
+ title: 'Choose Image',
305
+ button: {
306
+ text: 'Choose Image'
307
+ },
308
+ multiple: false
309
+ });
310
+
311
+ //When a file is selected, grab the URL and set it as the text field's value
312
+ custom_uploader.on('select', function() {
313
+ attachment = custom_uploader.state().get('selection').first().toJSON();
314
+ jQuery('#post_grid_empty_thumb').val(attachment.url);
315
+ jQuery('.post_grid_empty_thumb_display').attr('src',attachment.url);
316
+ });
317
+
318
+ //Open the uploader dialog
319
+ custom_uploader.open();
320
+
321
+ });
322
+
323
+
324
+ })
325
+ </script>
326
+ </div>
327
+
328
+
329
+ <div class="option-box">
330
+ <p class="option-title">Social Share buttons position</p>
331
+ <p class="option-info"></p>
332
+ <select name="post_grid_social_share_position" >
333
+ <option value="LeftTop" <?php if($post_grid_social_share_position=="LeftTop")echo "selected"; ?>>Left Top</option>
334
+ <option value="LeftBottom" <?php if($post_grid_social_share_position=="LeftBottom")echo "selected"; ?>>Left Bottom</option>
335
+ <option value="RightTop" <?php if($post_grid_social_share_position=="RightTop")echo "selected"; ?>>Right Top</option>
336
+ <option value="RightBottom" <?php if($post_grid_social_share_position=="RightBottom")echo "selected"; ?>>Right Bottom</option>
337
+
338
+ <option value="TopMiddle" <?php if($post_grid_social_share_position=="TopMiddle")echo "selected"; ?>>Top Middle</option>
339
+ <option value="BottomMiddle" <?php if($post_grid_social_share_position=="BottomMiddle")echo "selected"; ?>>Bottom Middle</option>
340
+
341
+
342
+ </select>
343
+ </div>
344
+
345
+
346
+
347
+ <div class="option-box">
348
+
349
+
350
+ <p class="option-title">Read more position</p>
351
+ <p class="option-info"></p>
352
+
353
+ <select name="post_grid_read_more_position" >
354
+ <option value="TopMiddle" <?php if($post_grid_read_more_position=="TopMiddle")echo "selected"; ?>>Top Middle</option>
355
+ <option value="LeftMiddle" <?php if($post_grid_read_more_position=="LeftMiddle")echo "selected"; ?>>Left Middle</option>
356
+ <option value="RightMiddle" <?php if($post_grid_read_more_position=="RightMiddle")echo "selected"; ?>>Right Middle</option>
357
+ <option value="BottomMiddle" <?php if($post_grid_read_more_position=="BottomMiddle")echo "selected"; ?>>Bottom Middle</option>
358
+
359
+ </select>
360
+
361
+
362
+ <p class="option-title">Read more hover style</p>
363
+ <p class="option-info"></p>
364
+ <select name="post_grid_read_more_hov_in_style" >
365
+ <option value="zoomIn" <?php if($post_grid_read_more_hov_in_style=="zoomIn")echo "selected"; ?>>ZoomIn</option>
366
+ <option value="fadeIn" <?php if($post_grid_read_more_hov_in_style=="fadeIn")echo "selected"; ?>>FadeIn</option>
367
+ <option value="rotate" <?php if($post_grid_read_more_hov_in_style=="rotate")echo "selected"; ?>>Rotate</option>
368
+
369
+ </select>
370
+
371
+
372
+ <p class="option-title">Read more Text</p>
373
+ <p class="option-info"></p>
374
+ <input type="text" name="post_grid_read_more_text" value="<?php if(!empty($post_grid_read_more_text)) echo $post_grid_read_more_text; else echo 'Read More'; ?>" /><br />
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+ </div>
383
+
384
+
385
+ <div class="option-box">
386
+ <p class="option-title">Display Author</p>
387
+ <p class="option-info"></p>
388
+ <select name="post_grid_meta_author_display" >
389
+ <option value="yes" <?php if($post_grid_meta_author_display=="yes")echo "selected"; ?>>Yes</option>
390
+ <option value="no" <?php if($post_grid_meta_author_display=="no")echo "selected"; ?>>No</option>
391
+ </select>
392
+ </div>
393
+
394
+ <div class="option-box">
395
+ <p class="option-title">Display Date</p>
396
+ <p class="option-info"></p>
397
+ <select name="post_grid_meta_date_display" >
398
+ <option value="yes" <?php if($post_grid_meta_date_display=="yes")echo "selected"; ?>>Yes</option>
399
+ <option value="no" <?php if($post_grid_meta_date_display=="no")echo "selected"; ?>>No</option>
400
+ </select>
401
+ </div>
402
+
403
+ <div class="option-box">
404
+ <p class="option-title">Display Categories</p>
405
+ <p class="option-info"></p>
406
+ <select name="post_grid_meta_categories_display" >
407
+ <option value="yes" <?php if($post_grid_meta_categories_display=="yes")echo "selected"; ?>>Yes</option>
408
+ <option value="no" <?php if($post_grid_meta_categories_display=="no")echo "selected"; ?>>No</option>
409
+ </select>
410
+ </div>
411
+
412
+ <div class="option-box">
413
+ <p class="option-title">Display Tags</p>
414
+ <p class="option-info"></p>
415
+ <select name="post_grid_meta_tags_display" >
416
+ <option value="yes" <?php if($post_grid_meta_tags_display=="yes")echo "selected"; ?>>Yes</option>
417
+ <option value="no" <?php if($post_grid_meta_tags_display=="no")echo "selected"; ?>>No</option>
418
+ </select>
419
+ </div>
420
+
421
+
422
+ <div class="option-box">
423
+ <p class="option-title">Display Comments</p>
424
+ <p class="option-info"></p>
425
+ <select name="post_grid_meta_comments_display" >
426
+ <option value="yes" <?php if($post_grid_meta_comments_display=="yes")echo "selected"; ?>>Yes</option>
427
+ <option value="no" <?php if($post_grid_meta_comments_display=="no")echo "selected"; ?>>No</option>
428
+ </select>
429
+ </div>
430
+
431
+
432
+
433
+
434
+ </li>
435
+ <li style="display: none;" class="box3 tab-box ">
436
+
437
+
438
+ <div class="option-box">
439
+ <p class="option-title">Grid Content Posttype</p>
440
+ <p class="option-info"></p>
441
+ <?php
442
+
443
+ $post_types = get_post_types( '', 'names' );
444
+
445
+ foreach ( $post_types as $post_type ) {
446
+
447
+ if($post_type=='post')
448
+ {
449
+ echo '<label><input type="checkbox" name="post_grid_posttype['.$post_type.']" value ="'.$post_type.'" ' ?>
450
+ <?php if ( isset( $post_grid_posttype[$post_type] ) ) echo "checked"; ?>
451
+ <?php echo' >'. $post_type.'</label><br />' ;
452
+
453
+ }
454
+
455
+ else
456
+ {
457
+ echo '<label><input type="checkbox" name="post_grid_posttype['.$post_type.']" value ="'.$post_type.'" ' ?>
458
+ <?php if ( isset( $post_grid_posttype[$post_type] ) ) echo "checked"; ?>
459
+ <?php echo' >'. $post_type.'</label><br />' ;
460
+
461
+ }
462
+
463
+ }
464
+ ?>
465
+ </div>
466
+
467
+
468
+
469
+
470
+ </li>
471
+ </ul>
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+ </div>
487
+ <?php
488
+
489
+
490
+
491
+ }
492
+
493
+ /**
494
+ * When the post is saved, saves our custom data.
495
+ *
496
+ * @param int $post_id The ID of the post being saved.
497
+ */
498
+ function meta_boxes_post_grid_save( $post_id ) {
499
+
500
+ /*
501
+ * We need to verify this came from the our screen and with proper authorization,
502
+ * because save_post can be triggered at other times.
503
+ */
504
+
505
+ // Check if our nonce is set.
506
+ if ( ! isset( $_POST['meta_boxes_post_grid_input_nonce'] ) )
507
+ return $post_id;
508
+
509
+ $nonce = $_POST['meta_boxes_post_grid_input_nonce'];
510
+
511
+ // Verify that the nonce is valid.
512
+ if ( ! wp_verify_nonce( $nonce, 'meta_boxes_post_grid_input' ) )
513
+ return $post_id;
514
+
515
+ // If this is an autosave, our form has not been submitted, so we don't want to do anything.
516
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
517
+ return $post_id;
518
+
519
+
520
+
521
+ /* OK, its safe for us to save the data now. */
522
+
523
+ // Sanitize user input.
524
+ $post_grid_post_per_page = sanitize_text_field( $_POST['post_grid_post_per_page'] );
525
+ $post_grid_themes = sanitize_text_field( $_POST['post_grid_themes'] );
526
+ $post_grid_bg_img = sanitize_text_field( $_POST['post_grid_bg_img'] );
527
+
528
+ $post_grid_thumb_size = sanitize_text_field( $_POST['post_grid_thumb_size'] );
529
+ $post_grid_empty_thumb = sanitize_text_field( $_POST['post_grid_empty_thumb'] );
530
+
531
+ $post_grid_social_share_position = sanitize_text_field( $_POST['post_grid_social_share_position'] );
532
+ $post_grid_pagination_display = sanitize_text_field( $_POST['post_grid_pagination_display'] );
533
+
534
+ $post_grid_read_more_position = stripslashes_deep( $_POST['post_grid_read_more_position'] );
535
+ $post_grid_read_more_hov_in_style = stripslashes_deep( $_POST['post_grid_read_more_hov_in_style'] );
536
+ $post_grid_read_more_text = stripslashes_deep( $_POST['post_grid_read_more_text'] );
537
+
538
+ $post_grid_posttype = stripslashes_deep( $_POST['post_grid_posttype'] );
539
+
540
+ $post_grid_width = sanitize_text_field( $_POST['post_grid_width'] );
541
+ $post_grid_thumb_width = sanitize_text_field( $_POST['post_grid_thumb_width'] );
542
+ $post_grid_thumb_height = sanitize_text_field( $_POST['post_grid_thumb_height'] );
543
+
544
+ $post_grid_meta_author_display = sanitize_text_field( $_POST['post_grid_meta_author_display'] );
545
+ $post_grid_meta_date_display = sanitize_text_field( $_POST['post_grid_meta_date_display'] );
546
+ $post_grid_meta_categories_display = sanitize_text_field( $_POST['post_grid_meta_categories_display'] );
547
+ $post_grid_meta_tags_display = sanitize_text_field( $_POST['post_grid_meta_tags_display'] );
548
+ $post_grid_meta_comments_display = sanitize_text_field( $_POST['post_grid_meta_comments_display'] );
549
+
550
+
551
+
552
+
553
+ // Update the meta field in the database.
554
+ update_post_meta( $post_id, 'post_grid_post_per_page', $post_grid_post_per_page );
555
+ update_post_meta( $post_id, 'post_grid_themes', $post_grid_themes );
556
+ update_post_meta( $post_id, 'post_grid_bg_img', $post_grid_bg_img );
557
+
558
+ update_post_meta( $post_id, 'post_grid_thumb_size', $post_grid_thumb_size );
559
+ update_post_meta( $post_id, 'post_grid_empty_thumb', $post_grid_empty_thumb );
560
+ update_post_meta( $post_id, 'post_grid_social_share_position', $post_grid_social_share_position );
561
+ update_post_meta( $post_id, 'post_grid_pagination_display', $post_grid_pagination_display );
562
+
563
+ update_post_meta( $post_id, 'post_grid_read_more_position', $post_grid_read_more_position );
564
+ update_post_meta( $post_id, 'post_grid_read_more_hov_in_style', $post_grid_read_more_hov_in_style );
565
+ update_post_meta( $post_id, 'post_grid_read_more_text', $post_grid_read_more_text );
566
+
567
+ update_post_meta( $post_id, 'post_grid_posttype', $post_grid_posttype );
568
+
569
+ update_post_meta( $post_id, 'post_grid_width', $post_grid_width );
570
+ update_post_meta( $post_id, 'post_grid_thumb_width', $post_grid_thumb_width );
571
+ update_post_meta( $post_id, 'post_grid_thumb_height', $post_grid_thumb_height );
572
+
573
+ update_post_meta( $post_id, 'post_grid_meta_author_display', $post_grid_meta_author_display );
574
+ update_post_meta( $post_id, 'post_grid_meta_date_display', $post_grid_meta_date_display );
575
+ update_post_meta( $post_id, 'post_grid_meta_categories_display', $post_grid_meta_categories_display );
576
+ update_post_meta( $post_id, 'post_grid_meta_tags_display', $post_grid_meta_tags_display );
577
+ update_post_meta( $post_id, 'post_grid_meta_comments_display', $post_grid_meta_comments_display );
578
+
579
+
580
+
581
+ }
582
+ add_action( 'save_post', 'meta_boxes_post_grid_save' );
583
+
584
+
585
+
586
+
587
+
588
+
589
+ ?>
index.php ADDED
@@ -0,0 +1,2 @@
1
+ <?php
2
+ // silence is golden.
js/masonry.pkgd.min.js ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Masonry PACKAGED v3.2.2
3
+ * Cascading grid layout library
4
+ * http://masonry.desandro.com
5
+ * MIT License
6
+ * by David DeSandro
7
+ */
8
+
9
+ !function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.getSize()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete s[e],delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):"object"==typeof exports?module.exports=g(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size")):a.Masonry=b(a.Outlayer,a.getSize)}(window);
js/scripts.js ADDED
@@ -0,0 +1,93 @@
1
+
2
+ jQuery(document).ready(function($)
3
+ {
4
+
5
+
6
+
7
+ $(document).on('click', '.load-more .load', function()
8
+ {
9
+ $(this).html('loading...');
10
+ var postid = parseInt($(this).attr('postid'));
11
+ var per_page = parseInt($(this).attr('per_page'));
12
+ var offset = parseInt($(this).attr('offset'));
13
+
14
+ $.ajax(
15
+ {
16
+ type: 'POST',
17
+ url:timeline_um_ajax.timeline_um_ajaxurl,
18
+ data: {"action": "timeline_um_comments_by_postid", "postid":postid,"per_page":per_page,"offset":offset},
19
+ success: function(data)
20
+ {
21
+
22
+ $('.post-grid-container-'+postid).append(data);
23
+ $('.comment-load-more-'+postid).attr('offset',(offset+per_page));
24
+
25
+
26
+
27
+ }
28
+ });
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+ })
39
+
40
+
41
+
42
+ $(document).on('click', '.post_grid_content_source', function()
43
+ {
44
+ var source = $(this).val();
45
+ var source_id = $(this).attr("id");
46
+
47
+ $(".content-source-box.active").removeClass("active");
48
+ $(".content-source-box."+source_id).addClass("active");
49
+
50
+ })
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+ jQuery(".post_grid_taxonomy").click(function()
60
+ {
61
+
62
+
63
+
64
+ var taxonomy = jQuery(this).val();
65
+
66
+ jQuery(".post_grid_loading_taxonomy_category").css('display','block');
67
+
68
+ jQuery.ajax(
69
+ {
70
+ type: 'POST',
71
+ url: post_grid_ajax.post_grid_ajaxurl,
72
+ data: {"action": "post_grid_get_taxonomy_category","taxonomy":taxonomy},
73
+ success: function(data)
74
+ {
75
+ jQuery(".post_grid_taxonomy_category").html(data);
76
+ jQuery(".post_grid_loading_taxonomy_category").fadeOut('slow');
77
+ }
78
+ });
79
+
80
+
81
+ })
82
+
83
+
84
+
85
+
86
+ });
87
+
88
+
89
+
90
+
91
+
92
+
93
+
post-grid-help.php ADDED
@@ -0,0 +1,139 @@