Post Grid - Version 2.1.22

Version Description

  • 2022-04-07 - fix - Ajax search result filter by "Include by post ID" issue fixed.
Download this release

Release Info

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

Code changes from version 2.1.21 to 2.1.22

includes/functions.php CHANGED
@@ -1107,6 +1107,10 @@ function post_grid_ajax_search(){
1107
 
1108
  //$keyword = isset($post_grid_options['keyword']) ? $post_grid_options['keyword'] : '';
1109
  $exclude_post_id = isset($post_grid_options['exclude_post_id']) ? $post_grid_options['exclude_post_id'] : '';
 
 
 
 
1110
 
1111
  $post_status = isset($post_grid_options['post_status']) ? $post_grid_options['post_status'] : 'publish';
1112
  $query_order = isset($post_grid_options['query_order']) ? $post_grid_options['query_order'] : 'DESC';
@@ -1189,6 +1193,11 @@ function post_grid_ajax_search(){
1189
  if(!empty($exclude_post_id))
1190
  $query_args['post__not_in'] = $exclude_post_id;
1191
 
 
 
 
 
 
1192
  if(!empty($query_order))
1193
  $query_args['order'] = $query_order;
1194
 
1107
 
1108
  //$keyword = isset($post_grid_options['keyword']) ? $post_grid_options['keyword'] : '';
1109
  $exclude_post_id = isset($post_grid_options['exclude_post_id']) ? $post_grid_options['exclude_post_id'] : '';
1110
+ $exclude_post_id = !empty($exclude_post_id) ? array_map('intval',explode(',',$exclude_post_id)) : array();
1111
+
1112
+ $include_post_id = isset($post_grid_options['include_post_id']) ? $post_grid_options['include_post_id'] : '';
1113
+ $include_post_id = !empty($include_post_id) ? array_map('intval',explode(',', $include_post_id)) : array();
1114
 
1115
  $post_status = isset($post_grid_options['post_status']) ? $post_grid_options['post_status'] : 'publish';
1116
  $query_order = isset($post_grid_options['query_order']) ? $post_grid_options['query_order'] : 'DESC';
1193
  if(!empty($exclude_post_id))
1194
  $query_args['post__not_in'] = $exclude_post_id;
1195
 
1196
+
1197
+ if(!empty($include_post_id))
1198
+ $query_args['post__in'] = $include_post_id;
1199
+
1200
+
1201
  if(!empty($query_order))
1202
  $query_args['order'] = $query_order;
1203
 
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.21
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.21');
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.22
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.22');
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.9
7
- Stable tag: 2.1.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -224,6 +224,9 @@ then paste this shortcode anywhere in your page to display grid<br />
224
 
225
 
226
 
 
 
 
227
  = 2.1.21 =
228
  * 2022-04-03 - fix - CSS escape issue fixed.
229
 
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.9
7
+ Stable tag: 2.1.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
224
 
225
 
226
 
227
+ = 2.1.22 =
228
+ * 2022-04-07 - fix - Ajax search result filter by "Include by post ID" issue fixed.
229
+
230
  = 2.1.21 =
231
  * 2022-04-03 - fix - CSS escape issue fixed.
232
 
templates/post-grid-hook.php CHANGED
@@ -237,8 +237,8 @@ function post_grid_posts_loop($args){
237
  $post_types = isset($post_grid_options['post_types']) ? $post_grid_options['post_types'] : array('post');
238
  $keyword = isset($post_grid_options['keyword']) ? $post_grid_options['keyword'] : '';
239
  $exclude_post_id = isset($post_grid_options['exclude_post_id']) ? $post_grid_options['exclude_post_id'] : '';
240
-
241
  $exclude_post_id = !empty($exclude_post_id) ? array_map('intval',explode(',',$exclude_post_id)) : array();
 
242
  $include_post_id = isset($post_grid_options['include_post_id']) ? $post_grid_options['include_post_id'] : '';
243
  $include_post_id = !empty($include_post_id) ? array_map('intval',explode(',', $include_post_id)) : array();
244
 
237
  $post_types = isset($post_grid_options['post_types']) ? $post_grid_options['post_types'] : array('post');
238
  $keyword = isset($post_grid_options['keyword']) ? $post_grid_options['keyword'] : '';
239
  $exclude_post_id = isset($post_grid_options['exclude_post_id']) ? $post_grid_options['exclude_post_id'] : '';
 
240
  $exclude_post_id = !empty($exclude_post_id) ? array_map('intval',explode(',',$exclude_post_id)) : array();
241
+
242
  $include_post_id = isset($post_grid_options['include_post_id']) ? $post_grid_options['include_post_id'] : '';
243
  $include_post_id = !empty($include_post_id) ? array_map('intval',explode(',', $include_post_id)) : array();
244