Post Grid - Version 2.1.7

Version Description

  • 2021-06-20 fix - column width % value issue fixed.
Download this release

Release Info

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

Code changes from version 2.1.6 to 2.1.7

Files changed (3) hide show
  1. post-grid.php +2 -2
  2. readme.txt +4 -1
  3. templates/post-grid-hook.php +4 -3
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.6
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.6');
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.7
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.7');
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.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -222,6 +222,9 @@ then paste this shortcode anywhere in your page to display grid<br />
222
 
223
  == Changelog ==
224
 
 
 
 
225
  = 2.1.6 =
226
  * 2021-06-19 add - column number added for grid
227
 
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.7
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.7 =
226
+ * 2021-06-20 fix - column width % value issue fixed.
227
+
228
  = 2.1.6 =
229
  * 2021-06-19 add - column number added for grid
230
 
templates/post-grid-hook.php CHANGED
@@ -798,11 +798,12 @@ function post_grid_view_type_css_grid($args){
798
  $items_width_tablet = isset($post_grid_options['width']['tablet']) ? $post_grid_options['width']['tablet'] : 2;
799
  $items_width_mobile = isset($post_grid_options['width']['mobile']) ? $post_grid_options['width']['mobile'] : 1;
800
 
801
- $items_width_desktop = (strpos($items_width_desktop, 'px') === false) ? (int)$items_width_desktop : $items_width_desktop;
802
- $items_width_tablet = (strpos($items_width_tablet, 'px') === false) ? (int)$items_width_tablet : $items_width_tablet;
803
- $items_width_mobile = (strpos($items_width_mobile, 'px') === false) ? (int)$items_width_mobile : $items_width_mobile;
804
 
805
 
 
806
 
807
  $items_height_style = !empty($post_grid_options['item_height']['style']) ? $post_grid_options['item_height']['style'] : 'auto_height';
808
  $items_height_style_tablet = !empty($post_grid_options['item_height']['style_tablet']) ? $post_grid_options['item_height']['style_tablet'] : 'auto_height';
798
  $items_width_tablet = isset($post_grid_options['width']['tablet']) ? $post_grid_options['width']['tablet'] : 2;
799
  $items_width_mobile = isset($post_grid_options['width']['mobile']) ? $post_grid_options['width']['mobile'] : 1;
800
 
801
+ $items_width_desktop = (strpos($items_width_desktop, 'px') === false && strpos($items_width_desktop, '%') === false ) ? (int)$items_width_desktop : $items_width_desktop;
802
+ $items_width_tablet = (strpos($items_width_tablet, 'px') === false && strpos($items_width_tablet, '%') === false ) ? (int)$items_width_tablet : $items_width_tablet;
803
+ $items_width_mobile = (strpos($items_width_mobile, 'px') === false && strpos($items_width_mobile, '%') === false) ? (int)$items_width_mobile : $items_width_mobile;
804
 
805
 
806
+ //var_dump($items_width_desktop);
807
 
808
  $items_height_style = !empty($post_grid_options['item_height']['style']) ? $post_grid_options['item_height']['style'] : 'auto_height';
809
  $items_height_style_tablet = !empty($post_grid_options['item_height']['style_tablet']) ? $post_grid_options['item_height']['style_tablet'] : 'auto_height';