Post Grid - Version 2.0.51

Version Description

  • 2020-05-01 fix - pagination displaying issue fixed
    • 2020-05-01 add - action hook post_grid_pagination_{type} added
Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Post Grid
Version 2.0.51
Comparing to
See all releases

Code changes from version 2.0.50 to 2.0.51

assets/settings-tabs/settings-tabs.css CHANGED
@@ -234,7 +234,8 @@
234
235
236
.settings-tabs .expandable .setting-field{
237
- padding: 0 15px 15px 0px;
238
}
239
.settings-tabs .expandable .setting-field .field-lable{
240
float: left;
@@ -244,10 +245,6 @@
244
margin-left: 270px;
245
}
246
247
-
248
- .settings-tabs .expandable .setting-field{
249
- padding: 0 15px 15px 0px;
250
- }
251
.settings-tabs .expandable .setting-field .setting-field .field-lable{
252
float: none;
253
}
@@ -318,6 +315,16 @@
318
margin-bottom: 15px;
319
}
320
321
/*input*/
322
323
.settings-tabs input[type="text"], .settings-tabs .range-slider, .settings-tabs input[type="email"],.settings-tabs textarea, .settings-tabs select, .settings-tabs input[type="range"]{
@@ -381,45 +388,20 @@
381
/*expandable*/
382
383
384
- .settings-tabs .expandable{}
385
- .settings-tabs .expandable .item {
386
387
margin: 1px 0;
388
-
389
- }
390
-
391
-
392
- .settings-tabs .expandable .header label{
393
-
394
}
395
396
-
397
-
398
.settings-tabs .expandable .header {
399
background: #eee none repeat scroll 0 0;
400
-
401
- }
402
-
403
-
404
- .settings-tabs .expandable {
405
-
406
}
407
408
.settings-tabs .expandable .options {
409
- background: #bde6fc;
410
display: none;
411
padding: 10px;
412
}
413
414
-
415
-
416
- .settings-tabs .expandable .options {
417
- background:#f1f1f1;
418
- display: none;
419
- padding: 10px;
420
- }
421
-
422
-
423
.settings-tabs .expandable .item.ui-sortable-helper {
424
border: 1px dashed rgb(153, 153, 153);
425
}
@@ -448,17 +430,8 @@
448
449
}
450
451
-
452
- /*.settings-tabs .expandable .active .options {*/
453
-
454
- /* display: block;*/
455
-
456
- /*}*/
457
-
458
.settings-tabs .expandable .options.active {
459
-
460
display: block;
461
-
462
}
463
464
234
235
236
.settings-tabs .expandable .setting-field{
237
+ padding: 10px 0;
238
+ margin: 10px 0;
239
}
240
.settings-tabs .expandable .setting-field .field-lable{
241
float: left;
245
margin-left: 270px;
246
}
247
248
.settings-tabs .expandable .setting-field .setting-field .field-lable{
249
float: none;
250
}
315
margin-bottom: 15px;
316
}
317
318
+
319
+ .settings-tabs .field-media-wrapper .media-upload, .field-media-wrapper .clear {
320
+ display: inline-block;
321
+ background: #ddd;
322
+ padding: 2px 10px;
323
+ border-radius: 3px;
324
+ border: 1px solid #999;
325
+ }
326
+
327
+
328
/*input*/
329
330
.settings-tabs input[type="text"], .settings-tabs .range-slider, .settings-tabs input[type="email"],.settings-tabs textarea, .settings-tabs select, .settings-tabs input[type="range"]{
388
/*expandable*/
389
390
391
392
+ .settings-tabs .expandable .item {
393
margin: 1px 0;
394
}
395
396
.settings-tabs .expandable .header {
397
background: #eee none repeat scroll 0 0;
398
}
399
400
.settings-tabs .expandable .options {
401
display: none;
402
padding: 10px;
403
}
404
405
.settings-tabs .expandable .item.ui-sortable-helper {
406
border: 1px dashed rgb(153, 153, 153);
407
}
430
431
}
432
433
.settings-tabs .expandable .options.active {
434
display: block;
435
}
436
437
assets/settings-tabs/settings-tabs.js CHANGED
@@ -10,15 +10,7 @@ jQuery(document).ready(function($){
10
collapsible: true,
11
});
12
13
-
14
-
15
-
16
- //console.log(typeof(wpColorPicker));
17
-
18
- //if(typeof(wpColorPicker) != 'undefined'){
19
- $( ".settings-tabs [colorPicker]").wpColorPicker();
20
- //}
21
-
22
23
24
$( ".settings-tabs .accordion[sortable='true']").sortable({
@@ -38,33 +30,6 @@ jQuery(document).ready(function($){
38
39
$(".settings-tabs .sortable" ).sortable({ handle: ".sort" });
40
41
- $(document).on('click','.settings-tabs .textarea-editor',function(){
42
-
43
- id = $(this).attr('id');
44
- editor_enabled = $(this).attr('editor_enabled');
45
-
46
-
47
- console.log(typeof wp.editor);
48
-
49
- if(editor_enabled == 'no' && typeof wp.editor != 'undefined'){
50
- wp.editor.initialize( id, {
51
- mediaButtons: true,
52
- tinymce: {
53
- wpautop: true,
54
- plugins : 'charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview',
55
- toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv',
56
- toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap | outdent indent | undo redo | wp_help'
57
- },
58
- quicktags: true,
59
- } );
60
-
61
- $(this).attr('editor_enabled','yes');
62
- }
63
-
64
-
65
-
66
-
67
- })
68
69
$(document).on('click','.settings-tabs .tab-nav',function(){
70
@@ -91,28 +56,6 @@ jQuery(document).ready(function($){
91
92
93
94
- // $(document).on('click','.settings-tabs .media-upload',function(){
95
- //
96
- // dataId = $(this).attr('data-id');
97
- //
98
- //
99
- //
100
- // var send_attachment_bkp = wp.media.editor.send.attachment;
101
- //
102
- // wp.media.editor.send.attachment = function(props, attachment) {
103
- // $("#media_preview_"+dataId).attr("src", attachment.url);
104
- // $("#media_input_"+dataId).val(attachment.id);
105
- // wp.media.editor.send.attachment = send_attachment_bkp;
106
- // }
107
- // wp.media.editor.open($(this));
108
- // return false;
109
- // });
110
- //
111
- // $("#media_clear_<?php echo $id; ?>").click(function() {
112
- // $("#media_input_<?php echo $id; ?>").val("");
113
- // $("#media_preview_<?php echo $id; ?>").attr("src","");
114
- // })
115
-
116
$(document).on('click','.settings-tabs .field-media-wrapper .clear ',function(e){
117
118
$(this).parent().children().children('.media-preview').attr('src', '');
@@ -233,8 +176,6 @@ jQuery(document).ready(function($){
233
jQuery(this).parent().children('.field-list').append(html);
234
235
236
- // $(".sortable" ).sortable({ handle: ".sort" });
237
-
238
239
})
240
@@ -245,32 +186,91 @@ jQuery(document).ready(function($){
245
jQuery(this).parent().parent().removeClass("active");
246
}else{
247
jQuery(this).parent().parent().addClass("active");
248
}
249
})
250
251
252
253
- jQuery(document).on("click", ".settings-tabs .field-repeatable-wrapper .clone", function() {
254
255
256
257
})
258
259
260
261
- jQuery(document).on("click", ".settings-tabs .select-reset", function() {
262
263
- $(this).prev('select').val('');
264
265
- })
266
267
268
269
270
271
272
273
274
275
276
10
collapsible: true,
11
});
12
13
+ $( ".settings-tabs [colorPicker]").wpColorPicker();
14
15
16
$( ".settings-tabs .accordion[sortable='true']").sortable({
30
31
$(".settings-tabs .sortable" ).sortable({ handle: ".sort" });
32
33
34
$(document).on('click','.settings-tabs .tab-nav',function(){
35
56
57
58
59
$(document).on('click','.settings-tabs .field-media-wrapper .clear ',function(e){
60
61
$(this).parent().children().children('.media-preview').attr('src', '');
176
jQuery(this).parent().children('.field-list').append(html);
177
178
179
180
})
181
186
jQuery(this).parent().parent().removeClass("active");
187
}else{
188
jQuery(this).parent().parent().addClass("active");
189
+ textarea_to_editor();
190
}
191
})
192
193
+ jQuery(document).on("click", ".settings-tabs .field-repeatable-wrapper .add-repeat-field", function() {
194
+ now = jQuery.now();
195
+ add_html = $(this).attr('add_html');
196
197
+ repeatable_html = add_html.replace(/TIMEINDEX/g, now);
198
199
+ $(this).parent().children('.repeatable-field-list').append(repeatable_html);
200
201
+ textarea_to_editor();
202
203
204
})
205
206
207
+ function textarea_to_editor(){
208
209
+ //textarea = $('.textarea-editor');
210
211
+ var textarea = document.getElementsByClassName("textarea-editor");
212
213
+ for (i = 0; i < textarea.length; i++) {
214
+
215
+ el_id = textarea[i].id;
216
+ el_attr = textarea[i].getAttribute('editor_enabled');
217
+
218
+ //editor_enabled = $(this).attr('editor_enabled');
219
220
221
+ //console.log(typeof wp.editor);
222
223
+ if(el_attr == 'no' && typeof wp.editor != 'undefined'){
224
+ wp.editor.initialize( el_id, {
225
+ mediaButtons: true,
226
+ tinymce: {
227
+ wpautop: true,
228
+ toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv',
229
+ toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap table | outdent indent | undo redo | wp_help',
230
231
+ },
232
+ quicktags: true,
233
+ } );
234
235
+ textarea[i].setAttribute('editor_enabled','yes')
236
+ //$(this).attr('editor_enabled','yes');
237
+ }
238
239
240
241
+ }
242
+
243
+ }
244
+
245
+ $(document).on('click','.settings-tabs .textarea-editor',function(){
246
+
247
+ id = $(this).attr('id');
248
+ editor_enabled = $(this).attr('editor_enabled');
249
+
250
+
251
+ //console.log(typeof wp.editor);
252
+
253
+ if(editor_enabled == 'no' && typeof wp.editor != 'undefined'){
254
+ wp.editor.initialize( id, {
255
+ mediaButtons: true,
256
+ tinymce: {
257
+ wpautop: true,
258
+ toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv',
259
+ toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap table | outdent indent | undo redo | wp_help'
260
+ },
261
+ quicktags: true,
262
+ } );
263
+
264
+ $(this).attr('editor_enabled','yes');
265
+ }
266
+
267
+ })
268
+
269
+ jQuery(document).on("click", ".settings-tabs .select-reset", function() {
270
+
271
+ $(this).prev('select').val('');
272
+
273
+ })
274
275
276
includes/class-metabox-post-grid-layout-hook.php CHANGED
@@ -169,7 +169,7 @@ if(!function_exists('post_grid_layout_metabox_content_layout_builder')){
169
foreach ($group_items as $elementIndex => $element):
170
ob_start();
171
172
- do_action('post_grid_layout_elements_option_'.$elementIndex);
173
174
$layout_elements_option[$elementIndex] = ob_get_clean();
175
endforeach;
@@ -242,7 +242,7 @@ if(!function_exists('post_grid_layout_metabox_content_layout_builder')){
242
foreach ($item_data as $elementIndex => $element_data){
243
244
$args = array('input_name'=> 'layout_elements_data['.$index.']', 'element_data'=> $element_data, 'index'=>$index);
245
- do_action('post_grid_layout_elements_option_'.$elementIndex, $args);
246
}
247
248
@@ -301,7 +301,16 @@ if(!function_exists('post_grid_layout_metabox_content_layout_builder')){
301
.layout-elements{
302
margin-left: 390px;
303
}
304
-
305
</style>
306
307
</div>
169
foreach ($group_items as $elementIndex => $element):
170
ob_start();
171
172
+ do_action('post_grid_layout_element_option_'.$elementIndex);
173
174
$layout_elements_option[$elementIndex] = ob_get_clean();
175
endforeach;
242
foreach ($item_data as $elementIndex => $element_data){
243
244
$args = array('input_name'=> 'layout_elements_data['.$index.']', 'element_data'=> $element_data, 'index'=>$index);
245
+ do_action('post_grid_layout_element_option_'.$elementIndex, $args);
246
}
247
248
301
.layout-elements{
302
margin-left: 390px;
303
}
304
+ @media (max-width: 1550px){
305
+ .layout-elements {
306
+ margin-left: 0px;
307
+ }
308
+ .layout-tags {
309
+ display: block;
310
+ width: 100%;
311
+ float: none;
312
+ }
313
+ }
314
</style>
315
316
</div>
includes/functions-layout-hook.php CHANGED
@@ -1,10 +1,10 @@
1
<?php
2
if ( ! defined('ABSPATH')) exit; // if direct access
3
4
- add_action('post_grid_layout_elements_option_custom_text','post_grid_layout_elements_option_custom_text');
5
6
7
- function post_grid_layout_elements_option_custom_text($parameters){
8
9
$settings_tabs_field = new settings_tabs_field();
10
@@ -180,8 +180,8 @@ function post_grid_layout_elements_option_custom_text($parameters){
180
}
181
182
183
- add_action('post_grid_layout_elements_option_title','post_grid_layout_elements_option_title');
184
- function post_grid_layout_elements_option_title($parameters){
185
186
$settings_tabs_field = new settings_tabs_field();
187
@@ -408,10 +408,10 @@ function post_grid_layout_elements_option_title($parameters){
408
409
410
411
- add_action('post_grid_layout_elements_option_title_link','post_grid_layout_elements_option_title_link');
412
413
414
- function post_grid_layout_elements_option_title_link($parameters){
415
416
$settings_tabs_field = new settings_tabs_field();
417
@@ -639,8 +639,8 @@ function post_grid_layout_elements_option_title_link($parameters){
639
640
641
642
- add_action('post_grid_layout_elements_option_excerpt_read_more','post_grid_layout_elements_option_excerpt_read_more');
643
- function post_grid_layout_elements_option_excerpt_read_more($parameters){
644
645
$settings_tabs_field = new settings_tabs_field();
646
@@ -839,8 +839,8 @@ function post_grid_layout_elements_option_excerpt_read_more($parameters){
839
}
840
841
842
- add_action('post_grid_layout_elements_option_read_more','post_grid_layout_elements_option_read_more');
843
- function post_grid_layout_elements_option_read_more($parameters){
844
845
$settings_tabs_field = new settings_tabs_field();
846
@@ -1046,10 +1046,10 @@ function post_grid_layout_elements_option_read_more($parameters){
1046
1047
1048
1049
- add_action('post_grid_layout_elements_option_media','post_grid_layout_elements_option_media');
1050
1051
1052
- function post_grid_layout_elements_option_media($parameters){
1053
1054
$settings_tabs_field = new settings_tabs_field();
1055
@@ -1335,10 +1335,10 @@ function post_grid_layout_elements_option_media($parameters){
1335
1336
1337
1338
- add_action('post_grid_layout_elements_option_thumb_link','post_grid_layout_elements_option_thumb_link');
1339
1340
1341
- function post_grid_layout_elements_option_thumb_link($parameters){
1342
1343
$settings_tabs_field = new settings_tabs_field();
1344
@@ -1572,10 +1572,10 @@ function post_grid_layout_elements_option_thumb_link($parameters){
1572
1573
1574
1575
- add_action('post_grid_layout_elements_option_thumb','post_grid_layout_elements_option_thumb');
1576
1577
1578
- function post_grid_layout_elements_option_thumb($parameters){
1579
1580
$settings_tabs_field = new settings_tabs_field();
1581
@@ -1808,10 +1808,10 @@ function post_grid_layout_elements_option_thumb($parameters){
1808
}
1809
1810
1811
- add_action('post_grid_layout_elements_option_content','post_grid_layout_elements_option_content');
1812
1813
1814
- function post_grid_layout_elements_option_content($parameters){
1815
1816
$settings_tabs_field = new settings_tabs_field();
1817
@@ -2059,8 +2059,8 @@ function post_grid_layout_elements_option_content($parameters){
2059
2060
2061
2062
- add_action('post_grid_layout_elements_option_excerpt','post_grid_layout_elements_option_excerpt');
2063
- function post_grid_layout_elements_option_excerpt($parameters){
2064
2065
$settings_tabs_field = new settings_tabs_field();
2066
@@ -2264,10 +2264,10 @@ function post_grid_layout_elements_option_excerpt($parameters){
2264
2265
2266
2267
- add_action('post_grid_layout_elements_option_wrapper_start','post_grid_layout_elements_option_wrapper_start');
2268
2269
2270
- function post_grid_layout_elements_option_wrapper_start($parameters){
2271
2272
$settings_tabs_field = new settings_tabs_field();
2273
@@ -2397,10 +2397,10 @@ function post_grid_layout_elements_option_wrapper_start($parameters){
2397
2398
2399
2400
- add_action('post_grid_layout_elements_option_wrapper_end','post_grid_layout_elements_option_wrapper_end');
2401
2402
2403
- function post_grid_layout_elements_option_wrapper_end($parameters){
2404
2405
$settings_tabs_field = new settings_tabs_field();
2406
@@ -2452,8 +2452,8 @@ function post_grid_layout_elements_option_wrapper_end($parameters){
2452
2453
2454
2455
- add_action('post_grid_layout_elements_option_categories','post_grid_layout_elements_option_categories');
2456
- function post_grid_layout_elements_option_categories($parameters){
2457
2458
$settings_tabs_field = new settings_tabs_field();
2459
@@ -2658,8 +2658,8 @@ function post_grid_layout_elements_option_categories($parameters){
2658
}
2659
2660
2661
- add_action('post_grid_layout_elements_option_tags','post_grid_layout_elements_option_tags');
2662
- function post_grid_layout_elements_option_tags($parameters){
2663
2664
$settings_tabs_field = new settings_tabs_field();
2665
@@ -2833,8 +2833,8 @@ function post_grid_layout_elements_option_tags($parameters){
2833
2834
}
2835
2836
- add_action('post_grid_layout_elements_option_comments_count','post_grid_layout_elements_option_comments_count');
2837
- function post_grid_layout_elements_option_comments_count($parameters){
2838
2839
$settings_tabs_field = new settings_tabs_field();
2840
@@ -3010,8 +3010,8 @@ function post_grid_layout_elements_option_comments_count($parameters){
3010
3011
3012
3013
- add_action('post_grid_layout_elements_option_five_star','post_grid_layout_elements_option_five_star');
3014
- function post_grid_layout_elements_option_five_star($parameters){
3015
3016
$settings_tabs_field = new settings_tabs_field();
3017
@@ -3154,8 +3154,8 @@ function post_grid_layout_elements_option_five_star($parameters){
3154
3155
}
3156
3157
- add_action('post_grid_layout_elements_option_hr','post_grid_layout_elements_option_hr');
3158
- function post_grid_layout_elements_option_hr($parameters){
3159
3160
$settings_tabs_field = new settings_tabs_field();
3161
@@ -3282,8 +3282,8 @@ function post_grid_layout_elements_option_hr($parameters){
3282
3283
}
3284
3285
- add_action('post_grid_layout_elements_option_share_button','post_grid_layout_elements_option_share_button');
3286
- function post_grid_layout_elements_option_share_button($parameters){
3287
3288
$settings_tabs_field = new settings_tabs_field();
3289
@@ -3413,8 +3413,8 @@ function post_grid_layout_elements_option_share_button($parameters){
3413
}
3414
3415
3416
- add_action('post_grid_layout_elements_option_author','post_grid_layout_elements_option_author');
3417
- function post_grid_layout_elements_option_author($parameters){
3418
3419
$settings_tabs_field = new settings_tabs_field();
3420
@@ -3594,8 +3594,8 @@ function post_grid_layout_elements_option_author($parameters){
3594
3595
3596
3597
- add_action('post_grid_layout_elements_option_author_link','post_grid_layout_elements_option_author_link');
3598
- function post_grid_layout_elements_option_author_link($parameters){
3599
3600
$settings_tabs_field = new settings_tabs_field();
3601
@@ -3760,8 +3760,8 @@ function post_grid_layout_elements_option_author_link($parameters){
3760
3761
3762
3763
- add_action('post_grid_layout_elements_option_post_date','post_grid_layout_elements_option_post_date');
3764
- function post_grid_layout_elements_option_post_date($parameters){
3765
3766
$settings_tabs_field = new settings_tabs_field();
3767
1
<?php
2
if ( ! defined('ABSPATH')) exit; // if direct access
3
4
+ add_action('post_grid_layout_element_option_custom_text','post_grid_layout_element_option_custom_text');
5
6
7
+ function post_grid_layout_element_option_custom_text($parameters){
8
9
$settings_tabs_field = new settings_tabs_field();
10
180
}
181
182
183
+ add_action('post_grid_layout_element_option_title','post_grid_layout_element_option_title');
184
+ function post_grid_layout_element_option_title($parameters){
185
186
$settings_tabs_field = new settings_tabs_field();
187
408
409
410
411
+ add_action('post_grid_layout_element_option_title_link','post_grid_layout_element_option_title_link');
412
413
414
+ function post_grid_layout_element_option_title_link($parameters){
415
416
$settings_tabs_field = new settings_tabs_field();
417
639
640
641
642
+ add_action('post_grid_layout_element_option_excerpt_read_more','post_grid_layout_element_option_excerpt_read_more');
643
+ function post_grid_layout_element_option_excerpt_read_more($parameters){
644
645
$settings_tabs_field = new settings_tabs_field();
646
839
}
840
841
842
+ add_action('post_grid_layout_element_option_read_more','post_grid_layout_element_option_read_more');
843
+ function post_grid_layout_element_option_read_more($parameters){
844
845
$settings_tabs_field = new settings_tabs_field();
846
1046
1047
1048
1049
+ add_action('post_grid_layout_element_option_media','post_grid_layout_element_option_media');
1050
1051
1052
+ function post_grid_layout_element_option_media($parameters){
1053
1054
$settings_tabs_field = new settings_tabs_field();
1055
1335
1336
1337
1338
+ add_action('post_grid_layout_element_option_thumb_link','post_grid_layout_element_option_thumb_link');
1339
1340
1341
+ function post_grid_layout_element_option_thumb_link($parameters){
1342
1343
$settings_tabs_field = new settings_tabs_field();
1344
1572
1573
1574
1575
+ add_action('post_grid_layout_element_option_thumb','post_grid_layout_element_option_thumb');
1576
1577
1578
+ function post_grid_layout_element_option_thumb($parameters){
1579
1580
$settings_tabs_field = new settings_tabs_field();
1581
1808
}
1809
1810
1811
+ add_action('post_grid_layout_element_option_content','post_grid_layout_element_option_content');
1812
1813
1814
+ function post_grid_layout_element_option_content($parameters){
1815
1816
$settings_tabs_field = new settings_tabs_field();
1817
2059
2060
2061
2062
+ add_action('post_grid_layout_element_option_excerpt','post_grid_layout_element_option_excerpt');
2063
+ function post_grid_layout_element_option_excerpt($parameters){
2064
2065
$settings_tabs_field = new settings_tabs_field();
2066
2264
2265
2266
2267
+ add_action('post_grid_layout_element_option_wrapper_start','post_grid_layout_element_option_wrapper_start');
2268
2269
2270
+ function post_grid_layout_element_option_wrapper_start($parameters){
2271
2272
$settings_tabs_field = new settings_tabs_field();
2273
2397
2398
2399
2400
+ add_action('post_grid_layout_element_option_wrapper_end','post_grid_layout_element_option_wrapper_end');
2401
2402
2403
+ function post_grid_layout_element_option_wrapper_end($parameters){
2404
2405
$settings_tabs_field = new settings_tabs_field();
2406
2452
2453
2454
2455
+ add_action('post_grid_layout_element_option_categories','post_grid_layout_element_option_categories');
2456
+ function post_grid_layout_element_option_categories($parameters){
2457
2458
$settings_tabs_field = new settings_tabs_field();
2459
2658
}
2659
2660
2661
+ add_action('post_grid_layout_element_option_tags','post_grid_layout_element_option_tags');
2662
+ function post_grid_layout_element_option_tags($parameters){
2663
2664
$settings_tabs_field = new settings_tabs_field();
2665
2833
2834
}
2835
2836
+ add_action('post_grid_layout_element_option_comments_count','post_grid_layout_element_option_comments_count');
2837
+ function post_grid_layout_element_option_comments_count($parameters){
2838
2839
$settings_tabs_field = new settings_tabs_field();
2840
3010
3011
3012
3013
+ add_action('post_grid_layout_element_option_five_star','post_grid_layout_element_option_five_star');
3014
+ function post_grid_layout_element_option_five_star($parameters){
3015
3016
$settings_tabs_field = new settings_tabs_field();
3017
3154
3155
}
3156
3157
+ add_action('post_grid_layout_element_option_hr','post_grid_layout_element_option_hr');
3158
+ function post_grid_layout_element_option_hr($parameters){
3159
3160
$settings_tabs_field = new settings_tabs_field();
3161
3282
3283
}
3284
3285
+ add_action('post_grid_layout_element_option_share_button','post_grid_layout_element_option_share_button');
3286
+ function post_grid_layout_element_option_share_button($parameters){
3287
3288
$settings_tabs_field = new settings_tabs_field();
3289
3413
}
3414
3415
3416
+ add_action('post_grid_layout_element_option_author','post_grid_layout_element_option_author');
3417
+ function post_grid_layout_element_option_author($parameters){
3418
3419
$settings_tabs_field = new settings_tabs_field();
3420
3594
3595
3596
3597
+ add_action('post_grid_layout_element_option_author_link','post_grid_layout_element_option_author_link');
3598
+ function post_grid_layout_element_option_author_link($parameters){
3599
3600
$settings_tabs_field = new settings_tabs_field();
3601
3760
3761
3762
3763
+ add_action('post_grid_layout_element_option_post_date','post_grid_layout_element_option_post_date');
3764
+ function post_grid_layout_element_option_post_date($parameters){
3765
3766
$settings_tabs_field = new settings_tabs_field();
3767
includes/functions.php CHANGED
@@ -1,11 +1,8 @@
1
<?php
2
3
- /*
4
- * @Author pickplugins
5
- * Copyright: 2015 pickplugins.com
6
- */
7
8
- if ( ! defined('ABSPATH')) exit; // if direct access
9
10
11
function post_grid_get_first_post($post_type = 'post'){
1
<?php
2
+ if ( ! defined('ABSPATH')) exit; // if direct access
3
+
4
5
6
7
8
function post_grid_get_first_post($post_type = 'post'){
includes/functions/functions-post-grid-meta-box.php CHANGED
@@ -843,7 +843,6 @@ function post_grid_metabox_tabs_content_skin_layout($tab, $post_id){
843
</div>
844
<style type="text/css">
845
#post_grid_metabox .layout-list .idle, #post_grid_metabox .layout-list .hover {
846
- background: rgba(0, 0, 0, 0) url("../images/tile.png") repeat scroll 0 0;
847
display: inline-block;
848
height: auto;
849
margin: 0 10px;
@@ -953,7 +952,6 @@ function post_grid_metabox_tabs_content_skin_layout($tab, $post_id){
953
width: 310px;
954
overflow: hidden;
955
vertical-align: top;
956
- background: rgba(0, 0, 0, 0) url("../images/tile.png") repeat scroll 0 0;
957
padding: 15px;
958
}
959
#post_grid_metabox .skin-list .skin-container .header {
843
</div>
844
<style type="text/css">
845
#post_grid_metabox .layout-list .idle, #post_grid_metabox .layout-list .hover {
846
display: inline-block;
847
height: auto;
848
margin: 0 10px;
952
width: 310px;
953
overflow: hidden;
954
vertical-align: top;
955
padding: 15px;
956
}
957
#post_grid_metabox .skin-list .skin-container .header {
post-grid.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Post Grid by PickPlugins
4
Plugin URI: https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/
5
Description: Awesome post grid for query post from any post type and display on grid.
6
- Version: 2.0.50
7
Author: PickPlugins
8
Author URI: https://www.pickplugins.com/
9
License: GPLv2 or later
@@ -21,7 +21,7 @@ if( !class_exists( 'PostGrid' )){
21
define('post_grid_plugin_dir', plugin_dir_path(__FILE__));
22
define('post_grid_plugin_basename', plugin_basename(__FILE__));
23
define('post_grid_plugin_name', 'Post Grid');
24
- define('post_grid_version', '2.0.50');
25
26
include('includes/classes/class-post-types.php');
27
include('includes/functions/functions-settings-hook.php');
3
Plugin Name: Post Grid by PickPlugins
4
Plugin URI: https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/
5
Description: Awesome post grid for query post from any post type and display on grid.
6
+ Version: 2.0.51
7
Author: PickPlugins
8
Author URI: https://www.pickplugins.com/
9
License: GPLv2 or later
21
define('post_grid_plugin_dir', plugin_dir_path(__FILE__));
22
define('post_grid_plugin_basename', plugin_basename(__FILE__));
23
define('post_grid_plugin_name', 'Post Grid');
24
+ define('post_grid_version', '2.0.51');
25
26
include('includes/classes/class-post-types.php');
27
include('includes/functions/functions-settings-hook.php');
readme.txt CHANGED
@@ -4,7 +4,7 @@
4
Tags: post grid, grid, custom post grid, post type grid, grid display, category filter, custom post, filter, filtering, grid, layout, list, masonry, post, post filter, post layout, taxonomy, taxonomy filter,
5
Requires at least: 3.8
6
Tested up to: 5.4
7
- Stable tag: 2.0.50
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -139,6 +139,12 @@ then paste this shortcode anywhere in your page to display grid<br />
139
140
== Changelog ==
141
142
= 2.0.50 =
143
* 2020-04-30 fix - media link issue fixed.
144
4
Tags: post grid, grid, custom post grid, post type grid, grid display, category filter, custom post, filter, filtering, grid, layout, list, masonry, post, post filter, post layout, taxonomy, taxonomy filter,
5
Requires at least: 3.8
6
Tested up to: 5.4
7
+ Stable tag: 2.0.51
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
139
140
== Changelog ==
141
142
+
143
+ = 2.0.51 =
144
+ * 2020-05-01 fix - pagination displaying issue fixed
145
+ * 2020-05-01 add - action hook post_grid_pagination_{type} added
146
+
147
+
148
= 2.0.50 =
149
* 2020-04-30 fix - media link issue fixed.
150
templates/post-grid-hook.php CHANGED
@@ -585,18 +585,33 @@ function post_grid_item_layout_new($args){
585
586
587
588
589
590
591
- add_action('post_grid_loop_bottom', 'post_grid_loop_bottom_pagination', 10, 2);
592
593
- function post_grid_loop_bottom_pagination($args, $post_grid_wp_query){
594
595
596
- $post_grid_options = $args['options'];
597
- $grid_type = isset($post_grid_options['grid_type']) ? $post_grid_options['grid_type'] : 'grid';
598
599
- if($grid_type != 'grid') return;
600
601
if ( get_query_var('paged') ) {
602
$paged = get_query_var('paged');
@@ -612,28 +627,24 @@ function post_grid_loop_bottom_pagination($args, $post_grid_wp_query){
612
613
614
?>
615
- <div class="pagination">
616
- <div class="paginate">
617
- <?php
618
619
- $big = 999999999; // need an unlikely integer
620
621
- echo paginate_links(
622
- array(
623
- 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
624
- 'format' => '?paged=%#%',
625
- 'current' => max( 1, $paged ),
626
- 'total' => $max_num_pages,
627
- 'prev_text' => $pagination_prev_text,
628
- 'next_text' => $pagination_next_text,
629
630
- )
631
- );
632
-
633
- ?>
634
- </div>
635
</div>
636
-
637
<?php
638
639
}
@@ -1622,28 +1633,30 @@ add_action('post_grid_container', 'post_grid_main_convert_layout', 90);
1622
1623
function post_grid_main_convert_layout($args){
1624
1625
- $options = $args['options'];
1626
- $grid_id = (int) $args['grid_id'];
1627
-
1628
- $layout_id = isset($options['layout_id']) ? $options['layout_id'] : '';
1629
1630
- //echo '<pre>'.var_export($layout_id, true).'</pre>';
1631
1632
$post_grid_layout_convert = isset($_GET['post_grid_layout_convert']) ? sanitize_text_field($_GET['post_grid_layout_convert']) : '';
1633
$_wpnonce = isset($_GET['_wpnonce']) ? sanitize_text_field($_GET['_wpnonce']) : '';
1634
1635
$layout_converted = false;
1636
1637
if(wp_verify_nonce($_wpnonce,'post_grid_layout_convert')){
1638
1639
- //echo '<pre>'.var_export($_wpnonce, true).'</pre>';
1640
$layout_converted = true;
1641
-
1642
}else{
1643
if(!empty($layout_id)) return;
1644
}
1645
1646
1647
if(!$layout_converted) return;
1648
1649
585
586
587
588
+ add_action('post_grid_loop_bottom', 'post_grid_loop_bottom_pagination', 10, 2);
589
590
+ function post_grid_loop_bottom_pagination($args, $post_grid_wp_query){
591
592
+ $post_grid_options = $args['options'];
593
594
+ $pagination_type = isset($post_grid_options['nav_bottom']['pagination_type']) ? $post_grid_options['nav_bottom']['pagination_type'] : 'normal';
595
596
+ if($pagination_type =='none') return;
597
+
598
+ ?>
599
+ <div class="pagination">
600
+ <?php
601
+ do_action('post_grid_pagination_'.$pagination_type, $args, $post_grid_wp_query);
602
+ ?>
603
+ </div>
604
+ <?php
605
606
+ }
607
608
609
+ add_action('post_grid_pagination_normal', 'post_grid_pagination_normal', 10, 2);
610
+
611
+ function post_grid_pagination_normal($args, $post_grid_wp_query){
612
+
613
+
614
+ $post_grid_options = $args['options'];
615
616
if ( get_query_var('paged') ) {
617
$paged = get_query_var('paged');
627
628
629
?>
630
+ <div class="paginate">
631
+ <?php
632
633
+ $big = 999999999; // need an unlikely integer
634
635
+ echo paginate_links(
636
+ array(
637
+ 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
638
+ 'format' => '?paged=%#%',
639
+ 'current' => max( 1, $paged ),
640
+ 'total' => $max_num_pages,
641
+ 'prev_text' => $pagination_prev_text,
642
+ 'next_text' => $pagination_next_text,
643
+ )
644
+ );
645
646
+ ?>
647
</div>
648
<?php
649
650
}
1633
1634
function post_grid_main_convert_layout($args){
1635
1636
1637
1638
$post_grid_layout_convert = isset($_GET['post_grid_layout_convert']) ? sanitize_text_field($_GET['post_grid_layout_convert']) : '';
1639
$_wpnonce = isset($_GET['_wpnonce']) ? sanitize_text_field($_GET['_wpnonce']) : '';
1640
1641
+ if(empty($post_grid_layout_convert)) return;
1642
+
1643
+
1644
$layout_converted = false;
1645
1646
if(wp_verify_nonce($_wpnonce,'post_grid_layout_convert')){
1647
1648
$layout_converted = true;
1649
}else{
1650
+ $options = $args['options'];
1651
+ $grid_id = (int) $args['grid_id'];
1652
+
1653
+ $layout_id = isset($options['layout_id']) ? $options['layout_id'] : '';
1654
+
1655
if(!empty($layout_id)) return;
1656
}
1657
1658
1659
+
1660
if(!$layout_converted) return;
1661
1662