Post Grid - Version 2.0.50

Version Description

  • 2020-04-30 fix - media link issue fixed.
Download this release

Release Info

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

Code changes from version 2.0.49 to 2.0.50

includes/functions/post-grid-layout-elements.php CHANGED
@@ -180,7 +180,7 @@ function post_grid_layout_element_title($args){
180
$custom_class = isset($element['custom_class']) ? $element['custom_class'] : '';
181
$char_limit = isset($element['char_limit']) ? (int) $element['char_limit'] : 0;
182
$char_end = isset($element['char_end']) ? $element['char_end'] : '...';
183
- $link_to = isset($element['link_to']) ? $element['link_to'] : '';
184
185
186
if($char_limit > 0){
180
$custom_class = isset($element['custom_class']) ? $element['custom_class'] : '';
181
$char_limit = isset($element['char_limit']) ? (int) $element['char_limit'] : 0;
182
$char_end = isset($element['char_end']) ? $element['char_end'] : '...';
183
+ $link_to = isset($element['link_to']) ? $element['link_to'] : 'post_link';
184
185
186
if($char_limit > 0){
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.49
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.49');
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.50
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.50');
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.49
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -139,6 +139,10 @@ then paste this shortcode anywhere in your page to display grid<br />
139
140
== Changelog ==
141
142
= 2.0.49 =
143
* 2020-04-30 fix - post title 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.50
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
139
140
== Changelog ==
141
142
+ = 2.0.50 =
143
+ * 2020-04-30 fix - media link issue fixed.
144
+
145
+
146
= 2.0.49 =
147
* 2020-04-30 fix - post title link issue fixed.
148
templates/post-grid-hook.php CHANGED
@@ -1644,9 +1644,10 @@ function post_grid_main_convert_layout($args){
1644
}
1645
1646
1647
1648
1649
- $content_layout = isset($options['layout']['content']) ? $options['layout']['content'] : '';;
1650
$layout_skin = isset($options['skin']) ? $options['skin'] : '';
1651
$media_source = isset($options['media_source']) ? $options['media_source'] : '';
1652
$media_height = isset($options['media_height']) ? $options['media_height'] : '';
@@ -1655,11 +1656,18 @@ function post_grid_main_convert_layout($args){
1655
$media_fixed_height = isset($media_height['fixed_height']) ? $media_height['fixed_height'] : '';
1656
1657
1658
- $featured_img_size = !empty($post_grid_options['featured_img_size']) ? $post_grid_options['featured_img_size'] : 'full';
1659
1660
- $thumb_linked = isset($post_grid_options['thumb_linked']) ? $post_grid_options['thumb_linked'] : 'no';
1661
$thumb_linked = ($thumb_linked == 'yes') ? 'post_link' : 'none';
1662
1663
if(empty($content_layout)) return;
1664
if(empty($layout_skin)) return;
1665
@@ -1698,9 +1706,7 @@ function post_grid_main_convert_layout($args){
1698
$layout_elements_data[1]['media']['media_source'][$source_id]['link_to'] = $thumb_linked;
1699
}
1700
1701
- if($source_id == 'featured_image' ){
1702
- $layout_elements_data[1]['media']['media_source'][$source_id]['link_to'] = $featured_img_size;
1703
- }
1704
1705
1706
}
@@ -1739,7 +1745,7 @@ function post_grid_main_convert_layout($args){
1739
1740
if($key == 'title' || $key == 'title_link' || $key == 'excerpt' || $key == 'excerpt_read_more'){
1741
$layout_elements_data[$item_count][$key]['char_limit'] = $char_limit;
1742
-
1743
}
1744
1745
if($key == 'read_more' || $key == 'excerpt_read_more'){
@@ -1748,6 +1754,7 @@ function post_grid_main_convert_layout($args){
1748
}
1749
if($key == 'read_more' || $key == 'excerpt_read_more' || $key == 'title_link'){
1750
$layout_elements_data[$item_count][$key]['link_target'] = $link_target;
1751
1752
}
1753
1644
}
1645
1646
1647
+ if(!$layout_converted) return;
1648
1649
1650
+ $content_layout = isset($options['layout']['content']) ? $options['layout']['content'] : '';
1651
$layout_skin = isset($options['skin']) ? $options['skin'] : '';
1652
$media_source = isset($options['media_source']) ? $options['media_source'] : '';
1653
$media_height = isset($options['media_height']) ? $options['media_height'] : '';
1656
$media_fixed_height = isset($media_height['fixed_height']) ? $media_height['fixed_height'] : '';
1657
1658
1659
+ //var_dump($options);
1660
+
1661
+ $featured_img_size = !empty($options['featured_img_size']) ? $options['featured_img_size'] : 'full';
1662
+
1663
+ $thumb_linked = isset($options['thumb_linked']) ? $options['thumb_linked'] : 'no';
1664
+ //var_dump($options);
1665
1666
$thumb_linked = ($thumb_linked == 'yes') ? 'post_link' : 'none';
1667
1668
+
1669
+ //var_dump($thumb_linked);
1670
+
1671
if(empty($content_layout)) return;
1672
if(empty($layout_skin)) return;
1673
1706
$layout_elements_data[1]['media']['media_source'][$source_id]['link_to'] = $thumb_linked;
1707
}
1708
1709
+
1710
1711
1712
}
1745
1746
if($key == 'title' || $key == 'title_link' || $key == 'excerpt' || $key == 'excerpt_read_more'){
1747
$layout_elements_data[$item_count][$key]['char_limit'] = $char_limit;
1748
+ $layout_elements_data[$item_count][$key]['link_to'] = 'post_link';
1749
}
1750
1751
if($key == 'read_more' || $key == 'excerpt_read_more'){
1754
}
1755
if($key == 'read_more' || $key == 'excerpt_read_more' || $key == 'title_link'){
1756
$layout_elements_data[$item_count][$key]['link_target'] = $link_target;
1757
+ $layout_elements_data[$item_count][$key]['link_to'] = 'post_link';
1758
1759
}
1760