Post Grid - Version 2.0.67

Version Description

  • 2020-06-16 remove - remove request popup for reviews.
Download this release

Release Info

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

Code changes from version 2.0.65 to 2.0.67

includes/classes/class-meta-boxes.php CHANGED
@@ -545,27 +545,6 @@ class post_grid_meta_boxs{
545
  <a class="button" href="https://wordpress.org/support/plugin/post-grid/reviews/#new-post" target="_blank">Submit Reviews</a> <a class="button" href="https://wordpress.org/support/plugin/post-grid/#new-topic-0" target="_blank">Ask wordpress.org</a><p>We spent thousand+ hours to development on this plugin, please submit your reviews wisely.</p><p>If you have any issue with this plugin please submit our forums or contact our support first.</p><p class="description">Your feedback and reviews are most important things to keep our development on track. If you have time please submit us five star <a href="https://wordpress.org/support/plugin/post-grid/reviews/"><span style="color: orange"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></span></a> reviews.</p>
546
 
547
 
548
-
549
-
550
- <h3>Video Tutorials</h3>
551
- <p class="description">Some tutorial contain pro features.</p>
552
- <div class="faq">
553
- <?php
554
-
555
-
556
- ?>
557
-
558
- </div>
559
-
560
-
561
-
562
-
563
-
564
-
565
-
566
-
567
-
568
-
569
  </div>
570
  <?php
571
 
545
  <a class="button" href="https://wordpress.org/support/plugin/post-grid/reviews/#new-post" target="_blank">Submit Reviews</a> <a class="button" href="https://wordpress.org/support/plugin/post-grid/#new-topic-0" target="_blank">Ask wordpress.org</a><p>We spent thousand+ hours to development on this plugin, please submit your reviews wisely.</p><p>If you have any issue with this plugin please submit our forums or contact our support first.</p><p class="description">Your feedback and reviews are most important things to keep our development on track. If you have time please submit us five star <a href="https://wordpress.org/support/plugin/post-grid/reviews/"><span style="color: orange"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></span></a> reviews.</p>
546
 
547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  </div>
549
  <?php
550
 
includes/classes/class-post-types.php CHANGED
@@ -71,7 +71,7 @@ class class_post_grid_post_types{
71
 
72
 
73
  register_post_type( "post_grid_layout",
74
- apply_filters( "wcps_posttype_post_grid_layout", array(
75
  'labels' => array(
76
  'name' => $plural,
77
  'singular_name' => $singular,
71
 
72
 
73
  register_post_type( "post_grid_layout",
74
+ apply_filters( "post_grid_posttype_post_grid_layout", array(
75
  'labels' => array(
76
  'name' => $plural,
77
  'singular_name' => $singular,
includes/classes/class-settings-tabs-reviews.php DELETED
@@ -1,201 +0,0 @@
1
- <?php
2
- if ( ! defined('ABSPATH')) exit; // if direct access
3
-
4
- if( ! class_exists( 'settings_tabs_reviews' ) ) {
5
- class settings_tabs_reviews{
6
-
7
- public $title = 'Hope you enjoy our plugin';
8
- public $option = 'option_name';
9
- public $review_link = '';
10
- public $support_link = '';
11
- public $documentation_link = '';
12
- public $tutorials_link = '';
13
-
14
-
15
- public function __construct($args){
16
-
17
- $this->title = isset($args['title']) ? $args['title'] : '';
18
- $this->option = isset($args['option']) ? $args['option'] : '';
19
- $this->review_link = isset($args['review_link']) ? $args['review_link'] : '';
20
- $this->support_link = isset($args['support_link']) ? $args['support_link'] : '';
21
- $this->documentation_link = isset($args['documentation_link']) ? $args['documentation_link'] : '';
22
- $this->tutorials_link = isset($args['tutorials_link']) ? $args['tutorials_link'] : '';
23
-
24
-
25
-
26
-
27
- add_action('admin_footer', array($this, 'display_popup'));
28
- add_action('admin_notices', array( $this, 'review_action_notice' ));
29
-
30
- }
31
-
32
- function review_action_notice(){
33
-
34
- if(!current_user_can('manage_options')) return;
35
-
36
- $nonce = isset($_GET['_wpnonce']) ? sanitize_text_field($_GET['_wpnonce']) : '';
37
-
38
- if(wp_verify_nonce( $nonce, $this->option.'_review_notice' ) ) {
39
- $review_status = isset($_GET['review_status']) ? sanitize_text_field($_GET['review_status']) : '';
40
- $option = get_option($this->option);
41
-
42
- $gmt_offset = get_option('gmt_offset');
43
- $current_date = date('Y-m-d H:i:s', strtotime('+'.$gmt_offset.' hour'));
44
-
45
- if($review_status =='remind_later'):
46
-
47
- $option['review_status'] = 'remind_later';
48
- $option['remind_date'] = date('Y-m-d H:i:s', strtotime('+30 days'));
49
-
50
- ?>
51
- <div class="update-nag is-dismissible">We will remind you later.</div>
52
- <?php
53
- update_option($this->option, $option);
54
-
55
- elseif ($review_status =='done'):
56
-
57
- $option['review_status'] = 'done';
58
- ?>
59
- <div class="update-nag notice is-dismissible">Thanks for your time and feedback.</div>
60
- <?php
61
-
62
- update_option($this->option, $option);
63
-
64
- endif;
65
-
66
-
67
- }
68
-
69
-
70
-
71
- }
72
-
73
-
74
- function display_popup(){
75
-
76
- if(!current_user_can('manage_options')) return;
77
-
78
- wp_enqueue_style('font-awesome-5');
79
-
80
- $option = get_option($this->option);
81
- $review_status = isset($option['review_status']) ? $option['review_status'] : '';
82
- $remind_date = isset($option['remind_date']) ? $option['remind_date'] : '';
83
-
84
- $admin_url = get_admin_url();
85
- //$admin_url = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);
86
-
87
-
88
- $gmt_offset = get_option('gmt_offset');
89
- $today_date = date('Y-m-d H:i:s', strtotime('+'.$gmt_offset.' hour'));
90
-
91
-
92
- // error_log($review_status);
93
- // error_log($remind_date);
94
-
95
-
96
-
97
- if(!empty($review_status)){
98
- if($review_status == 'done'){ return;}
99
- if($review_status == 'remind_later' && (strtotime($today_date) < strtotime($remind_date)) ){ return;}
100
-
101
- }else{
102
- $option['review_status'] = 'remind_later';
103
- $option['remind_date'] = date('Y-m-d H:i:s', strtotime('+7 days'));
104
- update_option($this->option, $option);
105
-
106
- return;
107
- }
108
-
109
- ?>
110
- <div class="settings-tabs-reviews">
111
- <div class="actions">
112
- <span title="To permanently hide please click on Already did." class="hide"><i class="fas fa-times"></i></span>
113
- </div>
114
- <div class="title"> <?php echo $this->title; ?></div>
115
- <div class="content">
116
- <p class="">We wish your 2 minutes to write your feedback about our plugin. give us <span style="color: #ffae19"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></span></p>
117
-
118
- <a target="_blank" href="<?php echo $this->review_link; ?>" class="button"><i class="fab fa-wordpress"></i> Write a review</a>
119
- <a href="<?php echo wp_nonce_url($admin_url.'?review_status=done', $this->option.'_review_notice', '_wpnonce'); ?>" class="button"><i class="far fa-thumbs-up"></i> Already did</a>
120
- <a href="<?php echo wp_nonce_url($admin_url.'?review_status=remind_later', $this->option.'_review_notice', '_wpnonce'); ?>" class="button"><i class="far fa-bell"></i> Remind me later</a>
121
-
122
- <p>Do you have any issue, please contact our support team by creating a support ticket or please watch tutorials and documentation.</p>
123
- <a target="_blank" href="<?php echo $this->support_link; ?>" class="button"><i class="far fa-question-circle"></i> Create support ticket</a>
124
- <a target="_blank" href="<?php echo $this->documentation_link; ?>" class="button"><i class="far fa-file-code"></i> Documentation</a>
125
- <a target="_blank" href="<?php echo $this->tutorials_link; ?>" class="button"><i class="fab fa-youtube"></i> Tutorials</a>
126
- </div>
127
-
128
-
129
- </div>
130
-
131
- <script>
132
- jQuery(document).ready(function($){
133
- $(document).on('click', ".settings-tabs-reviews .hide", function() {
134
- $(this).parent().parent().fadeOut();
135
- })
136
- })
137
- </script>
138
-
139
- <style type="text/css">
140
- .settings-tabs-reviews{
141
- position: fixed;
142
- right: 15px;
143
- bottom: 15px;
144
- width: 500px;
145
- background: #fff;
146
- padding: 0px;
147
- box-shadow: 0 0 6px 3px rgba(183, 183, 183, 0.4);
148
- z-index: 9999;
149
- border: 1px solid #3f51b5;
150
- }
151
-
152
- .settings-tabs-reviews p{
153
- font-size: 15px;
154
- }
155
-
156
- .settings-tabs-reviews .hide{
157
- color: #fff;
158
- padding: 2px 8px;
159
- background: #e21d1d;
160
- margin: 7px 4px;
161
- display: inline-block;
162
- cursor: pointer;
163
- }
164
-
165
- .settings-tabs-reviews .title{
166
- font-size: 17px;
167
- border-bottom: 1px solid #ddd;
168
- padding: 10px;
169
- background: #3F51B5;
170
- color: #fff;
171
- }
172
-
173
- .settings-tabs-reviews .content{
174
- padding: 10px;
175
- }
176
-
177
- .settings-tabs-reviews .actions{
178
- position: absolute;
179
- top: 0;
180
- right: 0;
181
- }
182
-
183
- @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
184
- .settings-tabs-reviews{
185
- width: 100%;
186
- right: 0;
187
- bottom: 0;
188
- }
189
- }
190
-
191
-
192
- </style>
193
- <?php
194
-
195
- }
196
-
197
- }
198
-
199
-
200
- }
201
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/class-shortcodes.php CHANGED
@@ -20,15 +20,10 @@ class class_post_grid_shortcodes{
20
  $atts
21
  );
22
 
23
- $atts = apply_filters('post_grid_atts',$atts);
24
 
25
  $grid_id = $atts['id'];
26
 
27
-
28
-
29
-
30
- //wp_reset_postdata();
31
-
32
  ob_start();
33
 
34
  if(empty($grid_id)){
20
  $atts
21
  );
22
 
23
+ $atts = apply_filters('post_grid_atts', $atts);
24
 
25
  $grid_id = $atts['id'];
26
 
 
 
 
 
 
27
  ob_start();
28
 
29
  if(empty($grid_id)){
includes/functions.php CHANGED
@@ -3,6 +3,8 @@ if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
 
5
 
 
 
6
  function post_grid_get_first_post($post_type = 'post'){
7
 
8
  $args = array(
@@ -20,7 +22,6 @@ function post_grid_get_first_post($post_type = 'post'){
20
  $product_id = get_the_id();
21
  return $product_id;
22
  endwhile;
23
- else:
24
 
25
  endif;
26
  }
@@ -82,7 +83,7 @@ function post_grid_get_media($item_post_id, $media_source, $featured_img_size, $
82
  if($media_source == 'featured_image'){
83
  $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($item_post_id), $featured_img_size );
84
  $alt_text = get_post_meta(get_post_thumbnail_id($item_post_id), '_wp_attachment_image_alt', true);
85
- $thumb_url = $thumb['0'];
86
 
87
  if(!empty($thumb_url)){
88
  if($thumb_linked=='yes'){
3
 
4
 
5
 
6
+
7
+
8
  function post_grid_get_first_post($post_type = 'post'){
9
 
10
  $args = array(
22
  $product_id = get_the_id();
23
  return $product_id;
24
  endwhile;
 
25
 
26
  endif;
27
  }
83
  if($media_source == 'featured_image'){
84
  $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($item_post_id), $featured_img_size );
85
  $alt_text = get_post_meta(get_post_thumbnail_id($item_post_id), '_wp_attachment_image_alt', true);
86
+ $thumb_url = isset($thumb['0']) ? $thumb['0'] : '';
87
 
88
  if(!empty($thumb_url)){
89
  if($thumb_linked=='yes'){
includes/post-grid-layout-elements.php CHANGED
@@ -1743,7 +1743,12 @@ function post_grid_layout_element_excerpt($args){
1743
  $the_post = get_post($post_id);
1744
  $post_content = isset($the_post->post_content) ? $the_post->post_content : '';
1745
  $post_content = strip_shortcodes( $post_content );
1746
- $post_excerpt = excerpt_remove_blocks( $post_content );
 
 
 
 
 
1747
 
1748
  }elseif($excerpt_source == 'excerpt_content'){
1749
 
@@ -1753,7 +1758,10 @@ function post_grid_layout_element_excerpt($args){
1753
 
1754
  $post_excerpt = !empty($post_excerpt) ? $post_excerpt : $post_content;
1755
  $post_excerpt = strip_shortcodes( $post_excerpt );
1756
- $post_excerpt = excerpt_remove_blocks( $post_excerpt );
 
 
 
1757
 
1758
  }
1759
 
@@ -2118,7 +2126,10 @@ function post_grid_layout_element_excerpt_read_more($args){
2118
  $the_post = get_post($post_id);
2119
  $post_content = isset($the_post->post_content) ? $the_post->post_content : '';
2120
  $post_content = strip_shortcodes( $post_content );
2121
- $post_excerpt = excerpt_remove_blocks( $post_content );
 
 
 
2122
 
2123
  }elseif($excerpt_source == 'excerpt_content'){
2124
 
@@ -2128,7 +2139,10 @@ function post_grid_layout_element_excerpt_read_more($args){
2128
 
2129
  $post_excerpt = !empty($post_excerpt) ? $post_excerpt : $post_content;
2130
  $post_excerpt = strip_shortcodes( $post_excerpt );
2131
- $post_excerpt = excerpt_remove_blocks( $post_excerpt );
 
 
 
2132
 
2133
  }
2134
 
@@ -5789,7 +5803,7 @@ function post_grid_layout_element_share_button($args){
5789
  <a target="'.$link_target.'" href="https://twitter.com/intent/tweet?url='.$post_link.'&text='.$post_title.'"><i class="fab fa-twitter-square"></i></a>
5790
  </span>';
5791
 
5792
- $share_button_html = apply_filters('post_grid_filter_share_buttons', $share_button_html);
5793
 
5794
  ?>
5795
  <div class="element element_<?php echo esc_attr($elementIndex); ?> <?php echo esc_attr($custom_class); ?> share_button ">
1743
  $the_post = get_post($post_id);
1744
  $post_content = isset($the_post->post_content) ? $the_post->post_content : '';
1745
  $post_content = strip_shortcodes( $post_content );
1746
+
1747
+ if(function_exists('excerpt_remove_blocks')){
1748
+ $post_excerpt = excerpt_remove_blocks( $post_content );
1749
+ }
1750
+
1751
+
1752
 
1753
  }elseif($excerpt_source == 'excerpt_content'){
1754
 
1758
 
1759
  $post_excerpt = !empty($post_excerpt) ? $post_excerpt : $post_content;
1760
  $post_excerpt = strip_shortcodes( $post_excerpt );
1761
+ if(function_exists('excerpt_remove_blocks')){
1762
+ $post_excerpt = excerpt_remove_blocks( $post_excerpt );
1763
+ }
1764
+
1765
 
1766
  }
1767
 
2126
  $the_post = get_post($post_id);
2127
  $post_content = isset($the_post->post_content) ? $the_post->post_content : '';
2128
  $post_content = strip_shortcodes( $post_content );
2129
+ if(function_exists('excerpt_remove_blocks')){
2130
+ $post_excerpt = excerpt_remove_blocks( $post_content );
2131
+ }
2132
+
2133
 
2134
  }elseif($excerpt_source == 'excerpt_content'){
2135
 
2139
 
2140
  $post_excerpt = !empty($post_excerpt) ? $post_excerpt : $post_content;
2141
  $post_excerpt = strip_shortcodes( $post_excerpt );
2142
+ if(function_exists('excerpt_remove_blocks')){
2143
+ $post_excerpt = excerpt_remove_blocks( $post_excerpt );
2144
+ }
2145
+
2146
 
2147
  }
2148
 
5803
  <a target="'.$link_target.'" href="https://twitter.com/intent/tweet?url='.$post_link.'&text='.$post_title.'"><i class="fab fa-twitter-square"></i></a>
5804
  </span>';
5805
 
5806
+ $share_button_html = apply_filters('post_grid_share_buttons', $share_button_html);
5807
 
5808
  ?>
5809
  <div class="element element_<?php echo esc_attr($elementIndex); ?> <?php echo esc_attr($custom_class); ?> share_button ">
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.65
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.65');
25
 
26
 
27
 
@@ -31,7 +31,6 @@ if( !class_exists( 'PostGrid' )){
31
  include('includes/classes/class-shortcodes.php');
32
  include('includes/classes/class-settings.php');
33
  include('includes/classes/class-settings-tabs.php');
34
- include('includes/classes/class-settings-tabs-reviews.php');
35
 
36
 
37
  include('includes/classes/class-admin-notices.php');
@@ -70,18 +69,7 @@ if( !class_exists( 'PostGrid' )){
70
  register_activation_hook(__FILE__, array($this, '_activation'));
71
  register_deactivation_hook(__FILE__, array($this, '_deactivation'));
72
 
73
- $args = array(
74
- 'title' => 'Hope you enjoy <b>post grid</b> plugin ',
75
- 'option' => 'post_grid_info',
76
- 'review_link' => 'https://wordpress.org/support/plugin/post-grid/reviews/#new-post',
77
- 'support_link' => 'https://www.pickplugins.com/forum/',
78
- 'documentation_link' => 'https://www.pickplugins.com/documentation/post-grid/',
79
- 'tutorials_link' => 'https://www.youtube.com/playlist?list=PL0QP7T2SN94Yut5Y0MSVg1wqmqWz0UYpt',
80
- );
81
-
82
- new settings_tabs_reviews($args);
83
 
84
- //echo $settings_tabs_reviews;
85
 
86
 
87
  $args = array(
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.67
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.67');
25
 
26
 
27
 
31
  include('includes/classes/class-shortcodes.php');
32
  include('includes/classes/class-settings.php');
33
  include('includes/classes/class-settings-tabs.php');
 
34
 
35
 
36
  include('includes/classes/class-admin-notices.php');
69
  register_activation_hook(__FILE__, array($this, '_activation'));
70
  register_deactivation_hook(__FILE__, array($this, '_deactivation'));
71
 
 
 
 
 
 
 
 
 
 
 
72
 
 
73
 
74
 
75
  $args = array(
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.65
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -216,6 +216,15 @@ then paste this shortcode anywhere in your page to display grid<br />
216
 
217
  == Changelog ==
218
 
 
 
 
 
 
 
 
 
 
219
  = 2.0.65 =
220
  * 2020-06-04 add - Ignore paged/page variable from query to display same posts on paginated page.
221
 
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.67
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
216
 
217
  == Changelog ==
218
 
219
+ = 2.0.67 =
220
+ * 2020-06-16 remove - remove request popup for reviews.
221
+
222
+ = 2.0.66 =
223
+ * 2020-06-16 fix - undefined index issue fixed. functions.php line 85
224
+ * 2020-06-16 fix - undefined function excerpt_remove_blocks issue fixed.
225
+ * 2020-06-16 remove - remove popup for reviews.
226
+
227
+
228
  = 2.0.65 =
229
  * 2020-06-04 add - Ignore paged/page variable from query to display same posts on paginated page.
230