Post Grid - Version 2.1.5

Version Description

  • 2021-05-05 fix - php error issue fixed for old layouts users.
Download this release

Release Info

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

Code changes from version 2.1.3 to 2.1.5

includes/classes/class-meta-boxes.php CHANGED
@@ -469,7 +469,7 @@ class post_grid_meta_boxs{
469
  $keywords = isset($item['keywords']) ? $item['keywords'] : '';
470
 
471
  ?>
472
- <li keywords="<?php echo $keywords; ?>" class="item">
473
  <a target="_blank" href="<?php echo $url; ?>"><i class="far fa-dot-circle"></i> <?php echo $title; ?></a>
474
 
475
  </li>
469
  $keywords = isset($item['keywords']) ? $item['keywords'] : '';
470
 
471
  ?>
472
+ <li keywords="<?php echo esc_attr($keywords); ?>" class="item">
473
  <a target="_blank" href="<?php echo $url; ?>"><i class="far fa-dot-circle"></i> <?php echo $title; ?></a>
474
 
475
  </li>
includes/classes/class-settings-tabs.php CHANGED
@@ -142,7 +142,7 @@ class settings_tabs_field{
142
  ob_start();
143
 
144
  ?>
145
- <div <?php if(!empty($depends)) {?> data-depends="[<?php echo $depends; ?>]" <?php } ?> class="setting-field <?php if($is_error) echo 'field-error'; ?> <?php echo $wraper_class; ?> <?php if(!empty($depends)) echo 'dependency-field'; ?>">
146
  <div class="field-lable">%s</div>
147
  <div class="field-input">%s
148
  <p class="description">%s</p>
@@ -251,7 +251,7 @@ class settings_tabs_field{
251
 
252
  ob_start();
253
  ?>
254
- <div class="option-group-accordion-wrap" id="<?php echo $css_id; ?>">
255
  <div sortable="<?php echo ($sortable) ? 'true': 'false'; ?>" class='option-group-accordion accordion'>
256
  <?php
257
 
@@ -453,8 +453,8 @@ class settings_tabs_field{
453
  //wp_enqueue_media();
454
 
455
  ?>
456
- <div id="input-wrapper-<?php echo $css_id; ?>" class="input-wrapper field-media-wrapper
457
- field-media-wrapper-<?php echo $css_id; ?>">
458
  <div class="media-preview-wrap" style="width: 150px;margin-bottom: 10px;background: #eee;padding: 5px; text-align: center;word-break: break-all;">
459
  <?php
460
 
@@ -477,21 +477,21 @@ class settings_tabs_field{
477
  "image/ico" == $media_type
478
  ){
479
  ?>
480
- <img class="media-preview" src="<?php echo $media_url; ?>" style="width:100%"/>
481
  <div class="media-title"><?php echo $media_title; ?></div>
482
  <?php
483
  }else {
484
  ?>
485
- <img class="media-preview" src="<?php echo $media_url; ?>" style="width:100%"/>
486
  <div class="media-title"><?php echo $media_title; ?></div>
487
 
488
  <?php
489
  }
490
  ?>
491
  </div>
492
- <input class="media-input-value" type="hidden" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
493
- <div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload', $this->textdomain);?></div>
494
- <div placeholder="<?php echo $placeholder; ?>" class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear', $this->textdomain);?></div>
495
  <div class="error-mgs"></div>
496
  </div>
497
 
@@ -545,8 +545,8 @@ class settings_tabs_field{
545
 
546
 
547
  ?>
548
- <div id="input-wrapper-<?php echo $css_id; ?>" class="input-wrapper field-media-url-wrapper
549
- field-media-wrapper-<?php echo $css_id; ?>">
550
  <div class="media-preview-wrap" style="width: 150px;margin-bottom: 10px;background: #eee;padding: 5px; text-align: center;">
551
  <?php
552
 
@@ -560,22 +560,22 @@ class settings_tabs_field{
560
  "images/gif" == $media_type ||
561
  "images/ico" == $media_type){
562
  ?>
563
- <img class="media-preview" src="<?php echo $media_url; ?>" style="width:100%"/>
564
 
565
  <?php
566
  }
567
 
568
  else {
569
  ?>
570
- <img class="media-preview" src="<?php echo $media_url; ?>" style="width:100%"/>
571
 
572
  <?php
573
  }
574
  ?>
575
  </div>
576
- <input type="text" placeholder="<?php echo $placeholder; ?>" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
577
- <div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload', $this->textdomain);?></div>
578
- <div class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear','post-grid');?></div>
579
  <div class="error-mgs"></div>
580
  </div>
581
 
@@ -674,10 +674,10 @@ class settings_tabs_field{
674
  ?>
675
 
676
 
677
- <div id="input-wrapper-<?php echo $css_id; ?>" class=" input-wrapper field-repeatable-wrapper
678
- field-repeatable-wrapper-<?php echo $css_id; ?>">
679
- <div add_html="<?php echo esc_attr($fieldHtml); ?>" class="add-repeat-field"><i class="far fa-plus-square"></i> <?php _e('Add','post-grid'); ?></div>
680
- <div class="repeatable-field-list sortable" id="<?php echo $css_id; ?>">
681
  <?php
682
  if(!empty($values)):
683
  $count = 1;
@@ -687,7 +687,7 @@ class settings_tabs_field{
687
  //var_dump($index);
688
 
689
  ?>
690
- <div class="item-wrap <?php if($collapsible) echo 'collapsible'; ?>" index="<?php echo $index; ?>">
691
  <?php if($collapsible):?>
692
  <div class="header">
693
  <?php endif; ?>
@@ -712,7 +712,7 @@ class settings_tabs_field{
712
 
713
  $title_field_class = ($title_field == $field_index) ? 'title-field':'';
714
  ?>
715
- <div class="item <?php echo $title_field_class; ?>">
716
  <?php if($collapsible):?>
717
  <div class="content">
718
  <?php endif; ?>
@@ -804,7 +804,7 @@ class settings_tabs_field{
804
  ob_start();
805
  ?>
806
 
807
- <select <?php if($multiple) echo 'multiple'; ?> name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>">
808
  <?php
809
  foreach( $args as $key => $name ):
810
  if($multiple){
@@ -815,7 +815,7 @@ class settings_tabs_field{
815
 
816
 
817
  ?>
818
- <option <?php echo $selected; ?> value="<?php echo $key; ?>"><?php echo $name; ?></option>
819
  <?php
820
  endforeach;
821
  ?>
@@ -823,7 +823,7 @@ class settings_tabs_field{
823
  <?php
824
  if($multiple):
825
  ?>
826
- <div class="button select-reset">Reset</div><br>
827
  <?php
828
  endif;
829
  ?>
@@ -880,7 +880,7 @@ class settings_tabs_field{
880
 
881
  ob_start();
882
  ?>
883
- <select <?php echo $attributes_html; ?> class="select2" <?php if($multiple) echo 'multiple'; ?> name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>">
884
  <?php
885
  foreach( $args as $key => $name ):
886
 
@@ -891,7 +891,7 @@ class settings_tabs_field{
891
  }
892
 
893
  ?>
894
- <option <?php echo $selected; ?> value="<?php echo $key; ?>"><?php echo $name; ?></option>
895
  <?php
896
  endforeach;
897
  ?>
@@ -945,10 +945,10 @@ class settings_tabs_field{
945
 
946
  ob_start();
947
  ?>
948
- <div id="input-wrapper-<?php echo $id; ?>" class="input-wrapper input-text-multi-wrapper
949
- input-text-multi-wrapper-<?php echo $css_id; ?>">
950
- <span data-placeholder="<?php echo esc_attr($placeholder); ?>" data-sort="<?php echo $sortable; ?>" data-clone="<?php echo $allow_clone; ?>" data-name="<?php echo $field_name; ?>[]" class="button add-item"><?php echo __('Add', $this->textdomain); ?></span>
951
- <div class="field-list <?php if($sortable){ echo 'sortable'; }?>" id="<?php echo $css_id; ?>">
952
  <?php
953
  if(!empty($values)):
954
  foreach ($values as $value):
@@ -966,7 +966,7 @@ class settings_tabs_field{
966
  <span class="button sort"><i class="fas fa-arrows-alt"></i></span>
967
  <?php endif; ?>
968
 
969
- <span class="button remove" onclick="jQuery(this).parent().remove()"><?php echo ($remove_text); ?></span>
970
  </div>
971
  <?php
972
  endforeach;
@@ -987,7 +987,7 @@ class settings_tabs_field{
987
  <span class="button sort"><i class="fas fa-arrows-alt"></i></span>
988
  <?php endif; ?>
989
 
990
- <span class="button remove" onclick="jQuery(this).parent().remove()"><?php echo ($remove_text); ?></span>
991
  </div>
992
  <?php
993
 
@@ -1034,7 +1034,7 @@ class settings_tabs_field{
1034
 
1035
  ob_start();
1036
  ?>
1037
- <input type="hidden" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo $placeholder; ?>" value="<?php echo esc_attr($value); ?>" />
1038
  <?php
1039
 
1040
  $input_html = ob_get_clean();
@@ -1071,7 +1071,7 @@ class settings_tabs_field{
1071
 
1072
  ob_start();
1073
  ?>
1074
- <input type="text" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo $placeholder; ?>" value="<?php echo esc_attr($value); ?>" />
1075
  <?php
1076
 
1077
  $input_html = ob_get_clean();
@@ -1113,8 +1113,8 @@ class settings_tabs_field{
1113
  ob_start();
1114
 
1115
  ?>
1116
- <div id="field-wrapper-<?php echo $id; ?>" class="<?php if(!empty($depends)) echo 'dependency-field'; ?> field-wrapper field-wp_editor-wrapper
1117
- field-wp_editor-wrapper-<?php echo $id; ?>">
1118
  <?php
1119
  wp_editor( $value, $css_id, $editor_settings);
1120
  ?>
@@ -1163,7 +1163,7 @@ class settings_tabs_field{
1163
  ob_start();
1164
  ?>
1165
  <div class="text-icon">
1166
- <span class="icon"><?php echo $option_value; ?></span><input type="text" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($option_value); ?>" />
1167
  </div>
1168
  <style type="text/css">
1169
  .text-icon{}
@@ -1228,12 +1228,12 @@ class settings_tabs_field{
1228
  ob_start();
1229
  ?>
1230
  <div class="range-input">
1231
- <span class="range-value"><?php echo $value; ?></span><input type="range" min="<?php if($min) echo $min; ?>" max="<?php if($max) echo $max; ?>" step="<?php if($step) echo $step; ?>" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
1232
  </div>
1233
 
1234
  <script>
1235
  jQuery(document).ready(function($){
1236
- $(document).on("change", "#<?php echo $css_id; ?>", function () {
1237
  val = $(this).val();
1238
  if(val){
1239
  $(this).parent().children(".range-value").html(val);
@@ -1286,7 +1286,7 @@ class settings_tabs_field{
1286
 
1287
  ob_start();
1288
  ?>
1289
- <textarea name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
1290
  <?php
1291
 
1292
  $input_html = ob_get_clean();
@@ -1323,7 +1323,7 @@ class settings_tabs_field{
1323
 
1324
  ob_start();
1325
  ?>
1326
- <textarea editor_enabled="no" class="textarea-editor" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
1327
  <?php
1328
 
1329
  $input_html = ob_get_clean();
@@ -1359,11 +1359,11 @@ class settings_tabs_field{
1359
 
1360
  ob_start();
1361
  ?>
1362
- <textarea name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
1363
 
1364
  <script>
1365
  jQuery(document).ready(function($){
1366
- wp.codeEditor.initialize($('#<?php echo $css_id; ?>'), <?php echo $code_editor; ?>);
1367
  })
1368
  </script>
1369
  <?php
@@ -1406,13 +1406,13 @@ class settings_tabs_field{
1406
 
1407
  ob_start();
1408
  ?>
1409
- <textarea name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
1410
  <script>
1411
 
1412
 
1413
  jQuery(document).ready(function($){
1414
 
1415
- wp.codeEditor.initialize($('#<?php echo $css_id; ?>'), <?php echo $code_editor; ?>);
1416
 
1417
 
1418
  })
@@ -1473,7 +1473,7 @@ class settings_tabs_field{
1473
 
1474
 
1475
  ?>
1476
- <label for='<?php echo $for;?>'><input name='<?php echo $field_name; ?>[]' type='checkbox' id='<?php echo $for; ?>' value='<?php echo $key;?>' <?php echo $checked;?>><span><?php echo $value;?></span></label>
1477
 
1478
  <?php
1479
 
@@ -1524,7 +1524,7 @@ class settings_tabs_field{
1524
  $checked = ( $key == $option_value ) ? "checked" : "";
1525
  $for = !empty($for) ? $for.'-'.$css_id."-".$key : $css_id."-".$key;
1526
  ?>
1527
- <label for="<?php echo $for;?>"><input name="<?php echo $field_name; ?>" type="radio" id="<?php echo $for; ?>" value="<?php echo $key;?>" <?php echo $checked;?>><span><?php echo $value;?></span></label>
1528
 
1529
  <?php
1530
  endforeach;
@@ -1583,14 +1583,14 @@ class settings_tabs_field{
1583
  //var_dump($checked);
1584
 
1585
  ?>
1586
- <label style="width: <?php echo $width; ?>;" title="<?php echo $name; ?>" class="<?php if($checked =='checked') echo 'active';?> <?php if($disabled == true) echo 'disabled';?>">
1587
- <input <?php if($disabled) echo 'disabled'; ?> name="<?php echo $field_name; ?>" type="radio" id="<?php echo $css_id; ?>-<?php echo $key; ?>" value="<?php echo $key; ?>" <?php echo $checked; ?>>
1588
 
1589
  <?php
1590
  if(!empty($thumb)):
1591
 
1592
  ?>
1593
- <img class="lazy" alt="<?php echo $name; ?>" data-src="<?php echo $thumb; ?>" src="<?php echo $lazy_load_img; ?>">
1594
  <div style="padding: 5px;" class="name"><?php echo $name; ?></div>
1595
 
1596
  <?php
@@ -1603,7 +1603,7 @@ class settings_tabs_field{
1603
  <span class="pro-msg"><?php echo $pro_msg; ?></span>
1604
  <?php endif; ?>
1605
  <?php if(!empty($link)):?>
1606
- <a target="_blank" class="link" href="<?php echo $link; ?>"><?php echo $link_text; ?></a>
1607
  <?php endif; ?>
1608
 
1609
  </label>
@@ -1707,8 +1707,8 @@ class settings_tabs_field{
1707
 
1708
  ob_start();
1709
  ?>
1710
- <input type="text" autocomplete="off" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo $placeholder; ?>" value="<?php echo $value; ?>" />
1711
- <script>jQuery(document).ready(function($) { $("#<?php echo $css_id; ?>").datepicker({ dateFormat: "<?php echo $format; ?>" });});</script>
1712
  <?php
1713
 
1714
  $input_html = ob_get_clean();
@@ -1740,7 +1740,7 @@ class settings_tabs_field{
1740
 
1741
  ob_start();
1742
  ?>
1743
- <input colorPicker="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1744
  <?php
1745
 
1746
  $input_html = ob_get_clean();
@@ -1786,8 +1786,8 @@ class settings_tabs_field{
1786
  ?>
1787
  <div class="">
1788
  <span><?php echo $arg_key; ?></span>
1789
- <input name="<?php echo $field_name; ?>[<?php echo $arg_key; ?>]" id="<?php echo $arg_key.'-'.$css_id; ?>" value="<?php echo $item_value; ?>" />
1790
- <script>jQuery(document).ready(function($) { $("#<?php echo $arg_key.'-'.$css_id; ?>").wpColorPicker();});</script>
1791
  </div>
1792
 
1793
  <?php
142
  ob_start();
143
 
144
  ?>
145
+ <div <?php if(!empty($depends)) {?> data-depends="[<?php echo esc_attr($depends); ?>]" <?php } ?> class="setting-field <?php if($is_error) echo 'field-error'; ?> <?php echo esc_attr($wraper_class); ?> <?php if(!empty($depends)) echo 'dependency-field'; ?>">
146
  <div class="field-lable">%s</div>
147
  <div class="field-input">%s
148
  <p class="description">%s</p>
251
 
252
  ob_start();
253
  ?>
254
+ <div class="option-group-accordion-wrap" id="<?php echo esc_attr($css_id); ?>">
255
  <div sortable="<?php echo ($sortable) ? 'true': 'false'; ?>" class='option-group-accordion accordion'>
256
  <?php
257
 
453
  //wp_enqueue_media();
454
 
455
  ?>
456
+ <div id="input-wrapper-<?php echo esc_attr($css_id); ?>" class="input-wrapper field-media-wrapper
457
+ field-media-wrapper-<?php echo esc_attr($css_id); ?>">
458
  <div class="media-preview-wrap" style="width: 150px;margin-bottom: 10px;background: #eee;padding: 5px; text-align: center;word-break: break-all;">
459
  <?php
460
 
477
  "image/ico" == $media_type
478
  ){
479
  ?>
480
+ <img class="media-preview" src="<?php echo esc_url_raw($media_url); ?>" style="width:100%"/>
481
  <div class="media-title"><?php echo $media_title; ?></div>
482
  <?php
483
  }else {
484
  ?>
485
+ <img class="media-preview" src="<?php echo esc_url_raw($media_url); ?>" style="width:100%"/>
486
  <div class="media-title"><?php echo $media_title; ?></div>
487
 
488
  <?php
489
  }
490
  ?>
491
  </div>
492
+ <input class="media-input-value" type="hidden" name="<?php echo esc_attr($field_name); ?>" id="media_input_<?php echo esc_attr($css_id); ?>" value="<?php echo $value; ?>" />
493
+ <div class="media-upload button" id="media_upload_<?php echo esc_attr($css_id); ?>"><?php echo __('Upload', $this->textdomain);?></div>
494
+ <div placeholder="<?php echo esc_attr($placeholder); ?>" class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"><?php echo __('Clear', $this->textdomain);?></div>
495
  <div class="error-mgs"></div>
496
  </div>
497
 
545
 
546
 
547
  ?>
548
+ <div id="input-wrapper-<?php echo esc_attr($css_id); ?>" class="input-wrapper field-media-url-wrapper
549
+ field-media-wrapper-<?php echo esc_attr($css_id); ?>">
550
  <div class="media-preview-wrap" style="width: 150px;margin-bottom: 10px;background: #eee;padding: 5px; text-align: center;">
551
  <?php
552
 
560
  "images/gif" == $media_type ||
561
  "images/ico" == $media_type){
562
  ?>
563
+ <img class="media-preview" src="<?php echo esc_url_raw($media_url); ?>" style="width:100%"/>
564
 
565
  <?php
566
  }
567
 
568
  else {
569
  ?>
570
+ <img class="media-preview" src="<?php echo esc_url_raw($media_url); ?>" style="width:100%"/>
571
 
572
  <?php
573
  }
574
  ?>
575
  </div>
576
+ <input type="text" placeholder="<?php echo esc_attr($placeholder); ?>" name="<?php echo esc_attr($field_name); ?>" id="media_input_<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" />
577
+ <div class="media-upload button" id="media_upload_<?php echo esc_attr($css_id); ?>"><?php echo __('Upload', $this->textdomain);?></div>
578
+ <div class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"><?php echo __('Clear', $this->textdomain);?></div>
579
  <div class="error-mgs"></div>
580
  </div>
581
 
674
  ?>
675
 
676
 
677
+ <div id="input-wrapper-<?php echo esc_attr($css_id); ?>" class=" input-wrapper field-repeatable-wrapper
678
+ field-repeatable-wrapper-<?php echo esc_attr($css_id); ?>">
679
+ <div add_html="<?php echo esc_attr($fieldHtml); ?>" class="add-repeat-field"><i class="far fa-plus-square"></i> <?php _e('Add',$this->textdomain); ?></div>
680
+ <div class="repeatable-field-list sortable" id="<?php echo esc_attr($css_id); ?>">
681
  <?php
682
  if(!empty($values)):
683
  $count = 1;
687
  //var_dump($index);
688
 
689
  ?>
690
+ <div class="item-wrap <?php if($collapsible) echo 'collapsible'; ?>" index="<?php echo esc_attr($index); ?>">
691
  <?php if($collapsible):?>
692
  <div class="header">
693
  <?php endif; ?>
712
 
713
  $title_field_class = ($title_field == $field_index) ? 'title-field':'';
714
  ?>
715
+ <div class="item <?php echo esc_attr($title_field_class); ?>">
716
  <?php if($collapsible):?>
717
  <div class="content">
718
  <?php endif; ?>
804
  ob_start();
805
  ?>
806
 
807
+ <select <?php if($multiple) echo 'multiple'; ?> name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>">
808
  <?php
809
  foreach( $args as $key => $name ):
810
  if($multiple){
815
 
816
 
817
  ?>
818
+ <option <?php echo esc_attr($selected); ?> value="<?php echo esc_attr($key); ?>"><?php echo $name; ?></option>
819
  <?php
820
  endforeach;
821
  ?>
823
  <?php
824
  if($multiple):
825
  ?>
826
+ <div class="button select-reset"><?php echo __('Reset', $this->textdomain); ?></div><br>
827
  <?php
828
  endif;
829
  ?>
880
 
881
  ob_start();
882
  ?>
883
+ <select <?php echo esc_attr($attributes_html); ?> class="select2" <?php if($multiple) echo 'multiple'; ?> name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>">
884
  <?php
885
  foreach( $args as $key => $name ):
886
 
891
  }
892
 
893
  ?>
894
+ <option <?php echo esc_attr($selected); ?> value="<?php echo esc_attr($key); ?>"><?php echo $name; ?></option>
895
  <?php
896
  endforeach;
897
  ?>
945
 
946
  ob_start();
947
  ?>
948
+ <div id="input-wrapper-<?php echo esc_attr($id); ?>" class="input-wrapper input-text-multi-wrapper
949
+ input-text-multi-wrapper-<?php echo esc_attr($css_id); ?>">
950
+ <span data-placeholder="<?php echo esc_attr($placeholder); ?>" data-sort="<?php echo esc_attr($sortable); ?>" data-clone="<?php echo esc_attr($allow_clone); ?>" data-name="<?php echo esc_attr($field_name); ?>[]" class="button add-item"><?php echo __('Add', $this->textdomain); ?></span>
951
+ <div class="field-list <?php if($sortable){ echo 'sortable'; }?>" id="<?php echo esc_attr($css_id); ?>">
952
  <?php
953
  if(!empty($values)):
954
  foreach ($values as $value):
966
  <span class="button sort"><i class="fas fa-arrows-alt"></i></span>
967
  <?php endif; ?>
968
 
969
+ <span class="button remove" onclick="jQuery(this).parent().remove()"><?php echo $remove_text; ?></span>
970
  </div>
971
  <?php
972
  endforeach;
987
  <span class="button sort"><i class="fas fa-arrows-alt"></i></span>
988
  <?php endif; ?>
989
 
990
+ <span class="button remove" onclick="jQuery(this).parent().remove()"><?php echo $remove_text; ?></span>
991
  </div>
992
  <?php
993
 
1034
 
1035
  ob_start();
1036
  ?>
1037
+ <input type="hidden" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1038
  <?php
1039
 
1040
  $input_html = ob_get_clean();
1071
 
1072
  ob_start();
1073
  ?>
1074
+ <input type="text" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1075
  <?php
1076
 
1077
  $input_html = ob_get_clean();
1113
  ob_start();
1114
 
1115
  ?>
1116
+ <div id="field-wrapper-<?php echo esc_attr($id); ?>" class="<?php if(!empty($depends)) echo 'dependency-field'; ?> field-wrapper field-wp_editor-wrapper
1117
+ field-wp_editor-wrapper-<?php echo esc_attr($id); ?>">
1118
  <?php
1119
  wp_editor( $value, $css_id, $editor_settings);
1120
  ?>
1163
  ob_start();
1164
  ?>
1165
  <div class="text-icon">
1166
+ <span class="icon"><?php echo $option_value; ?></span><input type="text" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($option_value); ?>" />
1167
  </div>
1168
  <style type="text/css">
1169
  .text-icon{}
1228
  ob_start();
1229
  ?>
1230
  <div class="range-input">
1231
+ <span class="range-value"><?php echo $value; ?></span><input type="range" min="<?php if($min) echo esc_attr($min); ?>" max="<?php if($max) echo esc_attr($max); ?>" step="<?php if($step) echo esc_attr($step); ?>" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" />
1232
  </div>
1233
 
1234
  <script>
1235
  jQuery(document).ready(function($){
1236
+ $(document).on("change", "#<?php echo esc_attr($css_id); ?>", function () {
1237
  val = $(this).val();
1238
  if(val){
1239
  $(this).parent().children(".range-value").html(val);
1286
 
1287
  ob_start();
1288
  ?>
1289
+ <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo $value; ?></textarea>
1290
  <?php
1291
 
1292
  $input_html = ob_get_clean();
1323
 
1324
  ob_start();
1325
  ?>
1326
+ <textarea editor_enabled="no" class="textarea-editor" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo $value; ?></textarea>
1327
  <?php
1328
 
1329
  $input_html = ob_get_clean();
1359
 
1360
  ob_start();
1361
  ?>
1362
+ <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo $value; ?></textarea>
1363
 
1364
  <script>
1365
  jQuery(document).ready(function($){
1366
+ wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo $code_editor; ?>);
1367
  })
1368
  </script>
1369
  <?php
1406
 
1407
  ob_start();
1408
  ?>
1409
+ <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo $value; ?></textarea>
1410
  <script>
1411
 
1412
 
1413
  jQuery(document).ready(function($){
1414
 
1415
+ wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo $code_editor; ?>);
1416
 
1417
 
1418
  })
1473
 
1474
 
1475
  ?>
1476
+ <label for='<?php echo $for;?>'><input name='<?php echo esc_attr($field_name); ?>[]' type='checkbox' id='<?php echo esc_attr($for); ?>' value='<?php echo esc_attr($key);?>' <?php echo esc_attr($checked);?>><span><?php echo $value;?></span></label>
1477
 
1478
  <?php
1479
 
1524
  $checked = ( $key == $option_value ) ? "checked" : "";
1525
  $for = !empty($for) ? $for.'-'.$css_id."-".$key : $css_id."-".$key;
1526
  ?>
1527
+ <label for="<?php echo esc_attr($for);?>"><input name="<?php echo esc_attr($field_name); ?>" type="radio" id="<?php echo esc_attr($for); ?>" value="<?php echo esc_attr($key);?>" <?php echo esc_attr($checked);?>><span><?php echo $value;?></span></label>
1528
 
1529
  <?php
1530
  endforeach;
1583
  //var_dump($checked);
1584
 
1585
  ?>
1586
+ <label style="width: <?php echo esc_attr($width); ?>;" title="<?php echo esc_attr($name); ?>" class="<?php if($checked =='checked') echo 'active';?> <?php if($disabled == true) echo 'disabled';?>">
1587
+ <input <?php if($disabled) echo 'disabled'; ?> name="<?php echo esc_attr($field_name); ?>" type="radio" id="<?php echo esc_attr($css_id); ?>-<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($key); ?>" <?php echo $checked; ?>>
1588
 
1589
  <?php
1590
  if(!empty($thumb)):
1591
 
1592
  ?>
1593
+ <img class="lazy" alt="<?php echo esc_attr($name); ?>" data-src="<?php echo esc_attr($thumb); ?>" src="<?php echo esc_url_raw($lazy_load_img); ?>">
1594
  <div style="padding: 5px;" class="name"><?php echo $name; ?></div>
1595
 
1596
  <?php
1603
  <span class="pro-msg"><?php echo $pro_msg; ?></span>
1604
  <?php endif; ?>
1605
  <?php if(!empty($link)):?>
1606
+ <a target="_blank" class="link" href="<?php echo esc_url_raw($link); ?>"><?php echo $link_text; ?></a>
1607
  <?php endif; ?>
1608
 
1609
  </label>
1707
 
1708
  ob_start();
1709
  ?>
1710
+ <input type="text" autocomplete="off" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1711
+ <script>jQuery(document).ready(function($) { $("#<?php echo $css_id; ?>").datepicker({ dateFormat: "<?php echo esc_attr($format); ?>" });});</script>
1712
  <?php
1713
 
1714
  $input_html = ob_get_clean();
1740
 
1741
  ob_start();
1742
  ?>
1743
+ <input colorPicker="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr(esc_attr($placeholder)); ?>" value="<?php echo esc_attr($value); ?>" />
1744
  <?php
1745
 
1746
  $input_html = ob_get_clean();
1786
  ?>
1787
  <div class="">
1788
  <span><?php echo $arg_key; ?></span>
1789
+ <input name="<?php echo esc_attr($field_name); ?>[<?php echo esc_attr($arg_key); ?>]" id="<?php echo esc_attr($arg_key.'-'.$css_id); ?>" value="<?php echo esc_attr($item_value); ?>" />
1790
+ <script>jQuery(document).ready(function($) { $("#<?php echo esc_attr($arg_key.'-'.$css_id); ?>").wpColorPicker();});</script>
1791
  </div>
1792
 
1793
  <?php
includes/functions.php CHANGED
@@ -42,7 +42,7 @@ function post_grid_recursive_sanitize_arr($array) {
42
  $value = post_grid_recursive_sanitize_arr($value);
43
  }
44
  else {
45
- $value = sanitize_text_field( $value );
46
  }
47
  }
48
 
42
  $value = post_grid_recursive_sanitize_arr($value);
43
  }
44
  else {
45
+ $value = wp_kses_post( $value );
46
  }
47
  }
48
 
includes/menu/import-layouts.php CHANGED
@@ -15,7 +15,6 @@ $max_num_pages = 0;
15
  wp_enqueue_script('post_grid_layouts');
16
 
17
 
18
- //var_dump($_SERVER);
19
 
20
  ?>
21
  <div class="wrap">
@@ -25,14 +24,14 @@ wp_enqueue_script('post_grid_layouts');
25
 
26
  <div class="wp-filter">
27
  <ul class="filter-links">
28
- <li class=""><a href="<?php echo $_SERVER['REQUEST_URI']; ?>&tabs=latest" class="<?php if($tabs == 'latest') echo 'current'; ?>" aria-current="page"><?php _e('Latest', 'post-grid'); ?></a> </li>
29
- <li class=""><a href="<?php echo $_SERVER['REQUEST_URI']; ?>&tabs=free" class="<?php if($tabs == 'free') echo 'current'; ?>" aria-current="page"><?php _e('Free', 'post-grid'); ?></a> </li>
30
- <li class=""><a href="<?php echo $_SERVER['REQUEST_URI']; ?>&tabs=pro" class="<?php if($tabs == 'pro') echo 'current'; ?>" aria-current="page"><?php _e('Premium', 'post-grid'); ?></a> </li>
31
  </ul>
32
  <form class="block-search-form">
33
  <span class="loading"></span>
34
  <input id="block-keyword" type="search" placeholder="<?php _e('Start typing...', 'wp-block-hub'); ?>"
35
- value="<?php echo $keyword; ?>">
36
  </form>
37
  </div>
38
 
15
  wp_enqueue_script('post_grid_layouts');
16
 
17
 
 
18
 
19
  ?>
20
  <div class="wrap">
24
 
25
  <div class="wp-filter">
26
  <ul class="filter-links">
27
+ <li class=""><a href="<?php echo esc_url_raw($_SERVER['REQUEST_URI']); ?>&tabs=latest" class="<?php if($tabs == 'latest') echo 'current'; ?>" aria-current="page"><?php _e('Latest', 'post-grid'); ?></a> </li>
28
+ <li class=""><a href="<?php echo esc_url_raw($_SERVER['REQUEST_URI']); ?>&tabs=free" class="<?php if($tabs == 'free') echo 'current'; ?>" aria-current="page"><?php _e('Free', 'post-grid'); ?></a> </li>
29
+ <li class=""><a href="<?php echo esc_url_raw($_SERVER['REQUEST_URI']); ?>&tabs=pro" class="<?php if($tabs == 'pro') echo 'current'; ?>" aria-current="page"><?php _e('Premium', 'post-grid'); ?></a> </li>
30
  </ul>
31
  <form class="block-search-form">
32
  <span class="loading"></span>
33
  <input id="block-keyword" type="search" placeholder="<?php _e('Start typing...', 'wp-block-hub'); ?>"
34
+ value="<?php echo esc_attr($keyword); ?>">
35
  </form>
36
  </div>
37
 
includes/menu/settings-old.php CHANGED
@@ -97,7 +97,7 @@ array_multisort($tabs_sorted, SORT_ASC, $post_grid_settings_tabs);
97
  ?>
98
 
99
 
100
- <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
101
  <input type="hidden" name="post_grid_hidden" value="Y">
102
 
103
 
97
  ?>
98
 
99
 
100
+ <form method="post" action="<?php echo str_replace( '%7E', '~', esc_url_raw($_SERVER['REQUEST_URI'])); ?>">
101
  <input type="hidden" name="post_grid_hidden" value="Y">
102
 
103
 
includes/menu/settings.php CHANGED
@@ -57,7 +57,7 @@ $post_grid_settings = get_option('post_grid_settings');
57
  ?>
58
  <div class="wrap">
59
  <div id="icon-tools" class="icon32"><br></div><h2><?php echo sprintf(__('%s Settings', 'post-grid'), post_grid_plugin_name)?></h2>
60
- <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
61
  <input type="hidden" name="post_grid_hidden" value="Y">
62
  <input type="hidden" name="tab" value="<?php echo $current_tab; ?>">
63
  <?php
57
  ?>
58
  <div class="wrap">
59
  <div id="icon-tools" class="icon32"><br></div><h2><?php echo sprintf(__('%s Settings', 'post-grid'), post_grid_plugin_name)?></h2>
60
+ <form method="post" action="<?php echo str_replace( '%7E', '~', esc_url_raw($_SERVER['REQUEST_URI'])); ?>">
61
  <input type="hidden" name="post_grid_hidden" value="Y">
62
  <input type="hidden" name="tab" value="<?php echo $current_tab; ?>">
63
  <?php
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.1.3
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.1.3');
25
  define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
26
 
27
 
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.1.5
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.1.5');
25
  define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
26
 
27
 
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.7
7
- Stable tag: 2.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -222,6 +222,12 @@ then paste this shortcode anywhere in your page to display grid<br />
222
 
223
  == Changelog ==
224
 
 
 
 
 
 
 
225
  = 2.1.3 =
226
  * 2021-04-14 remove - unnecessary css library file removed
227
  * 2021-04-14 fix - security issue updated.
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.7
7
+ Stable tag: 2.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
222
 
223
  == Changelog ==
224
 
225
+ = 2.1.5 =
226
+ * 2021-05-05 fix - php error issue fixed for old layouts users.
227
+
228
+ = 2.1.4 =
229
+ * 2021-05-03 fix - escaping issue fixed.
230
+
231
  = 2.1.3 =
232
  * 2021-04-14 remove - unnecessary css library file removed
233
  * 2021-04-14 fix - security issue updated.