Version Description
- 2021-02-22 add - lazy load issue fixed.
- 2021-02-22 add - lazy load image alt text added
Download this release
Release Info
Developer | pickplugins |
Plugin | Post Grid |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- includes/metabox-post-grid-hook.php +16 -0
- post-grid.php +2 -3
- readme.txt +6 -2
- templates/post-grid-hook.php +18 -14
includes/metabox-post-grid-hook.php
CHANGED
@@ -97,6 +97,8 @@ function post_grid_metabox_tabs_content_general($tab, $post_id){
|
|
97 |
|
98 |
$lazy_load_enable = !empty($post_grid_meta_options['lazy_load_enable']) ? $post_grid_meta_options['lazy_load_enable'] : 'yes';
|
99 |
$lazy_load_image_src = !empty($post_grid_meta_options['lazy_load_image_src']) ? $post_grid_meta_options['lazy_load_image_src'] : '';
|
|
|
|
|
100 |
$load_fontawesome = !empty($post_grid_meta_options['load_fontawesome']) ? $post_grid_meta_options['load_fontawesome'] : '';
|
101 |
|
102 |
$container_padding = !empty($post_grid_meta_options['container']['padding']) ? $post_grid_meta_options['container']['padding'] : '10px';
|
@@ -145,6 +147,20 @@ function post_grid_metabox_tabs_content_general($tab, $post_id){
|
|
145 |
|
146 |
$settings_tabs_field->generate_field($args, $post_id);
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
$args = array(
|
150 |
'id' => 'load_fontawesome',
|
97 |
|
98 |
$lazy_load_enable = !empty($post_grid_meta_options['lazy_load_enable']) ? $post_grid_meta_options['lazy_load_enable'] : 'yes';
|
99 |
$lazy_load_image_src = !empty($post_grid_meta_options['lazy_load_image_src']) ? $post_grid_meta_options['lazy_load_image_src'] : '';
|
100 |
+
$lazy_load_alt_text = !empty($post_grid_meta_options['lazy_load_alt_text']) ? $post_grid_meta_options['lazy_load_alt_text'] : '';
|
101 |
+
|
102 |
$load_fontawesome = !empty($post_grid_meta_options['load_fontawesome']) ? $post_grid_meta_options['load_fontawesome'] : '';
|
103 |
|
104 |
$container_padding = !empty($post_grid_meta_options['container']['padding']) ? $post_grid_meta_options['container']['padding'] : '10px';
|
147 |
|
148 |
$settings_tabs_field->generate_field($args, $post_id);
|
149 |
|
150 |
+
$args = array(
|
151 |
+
'id' => 'lazy_load_alt_text',
|
152 |
+
'parent' => 'post_grid_meta_options',
|
153 |
+
'title' => __('Lazy load image alt text','post-grid'),
|
154 |
+
'details' => __('Set custom lazy load image alt text.','post-grid'),
|
155 |
+
'type' => 'text',
|
156 |
+
'value' => $lazy_load_alt_text,
|
157 |
+
'placeholder' => 'Post Grid lazy load',
|
158 |
+
'default' => '',
|
159 |
+
);
|
160 |
+
|
161 |
+
$settings_tabs_field->generate_field($args, $post_id);
|
162 |
+
|
163 |
+
|
164 |
|
165 |
$args = array(
|
166 |
'id' => 'load_fontawesome',
|
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.
|
7 |
Author: PickPlugins
|
8 |
Author URI: https://www.pickplugins.com/
|
9 |
License: GPLv2 or later
|
@@ -21,8 +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.
|
25 |
-
//define('post_grid_server_url', 'http://localhost/wp/');
|
26 |
define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
|
27 |
|
28 |
|
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.1
|
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.1');
|
|
|
25 |
define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
|
26 |
|
27 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Donate link: https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/?ref=wordpress.org
|
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 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -222,6 +222,10 @@ then paste this shortcode anywhere in your page to display grid<br />
|
|
222 |
|
223 |
== Changelog ==
|
224 |
|
|
|
|
|
|
|
|
|
225 |
= 2.1.0 =
|
226 |
* 2021-02-19 remove - remove old layout editor
|
227 |
|
3 |
Donate link: https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/?ref=wordpress.org
|
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.1
|
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.1 =
|
226 |
+
* 2021-02-22 add - lazy load issue fixed.
|
227 |
+
* 2021-02-22 add - lazy load image alt text added
|
228 |
+
|
229 |
= 2.1.0 =
|
230 |
* 2021-02-19 remove - remove old layout editor
|
231 |
|
templates/post-grid-hook.php
CHANGED
@@ -14,25 +14,29 @@ function post_grid_main_lazy($atts){
|
|
14 |
|
15 |
$lazy_load_enable = isset($post_grid_options['lazy_load_enable']) ? $post_grid_options['lazy_load_enable'] : 'grid';
|
16 |
$lazy_load_image_src = isset($post_grid_options['lazy_load_image_src']) ? $post_grid_options['lazy_load_image_src'] : '';
|
|
|
17 |
|
18 |
|
19 |
|
20 |
?>
|
21 |
-
<div id="post-grid-lazy-<?php echo $grid_id; ?>" class="post-grid-lazy"><img alt="<?php echo __('Post Grid lazy load', 'post-grid');?>" src="<?php echo $lazy_load_image_src; ?>"/></div>
|
22 |
-
<script>
|
23 |
-
jQuery('#post-grid-lazy-<?php echo $grid_id; ?>').ready(function($){
|
24 |
-
jQuery('#post-grid-lazy-<?php echo $grid_id; ?>').fadeOut();
|
25 |
-
jQuery('#post-grid-<?php echo $grid_id; ?>').fadeIn();
|
26 |
-
})
|
27 |
-
</script>
|
28 |
-
<style type="text/css">
|
29 |
-
#post-grid-<?php echo $grid_id; ?>{display: none;}
|
30 |
-
.post-grid-lazy{
|
31 |
-
text-align: center;
|
32 |
-
}
|
33 |
-
</style>
|
34 |
<?php
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
|
38 |
}
|
14 |
|
15 |
$lazy_load_enable = isset($post_grid_options['lazy_load_enable']) ? $post_grid_options['lazy_load_enable'] : 'grid';
|
16 |
$lazy_load_image_src = isset($post_grid_options['lazy_load_image_src']) ? $post_grid_options['lazy_load_image_src'] : '';
|
17 |
+
$lazy_load_alt_text = isset($post_grid_options['lazy_load_alt_text']) ? $post_grid_options['lazy_load_alt_text'] : '';
|
18 |
|
19 |
|
20 |
|
21 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<?php
|
23 |
+
if($lazy_load_enable == 'yes'):
|
24 |
+
?>
|
25 |
+
<div id="post-grid-lazy-<?php echo $grid_id; ?>" class="post-grid-lazy"><img alt="<?php echo $lazy_load_alt_text; ?>" src="<?php echo $lazy_load_image_src; ?>"/></div>
|
26 |
+
<script>
|
27 |
+
jQuery('#post-grid-lazy-<?php echo $grid_id; ?>').ready(function($){
|
28 |
+
$('#post-grid-lazy-<?php echo $grid_id; ?>').fadeOut();
|
29 |
+
$('#post-grid-<?php echo $grid_id; ?>').fadeIn();
|
30 |
+
})
|
31 |
+
</script>
|
32 |
+
<style type="text/css">
|
33 |
+
#post-grid-<?php echo $grid_id; ?>{display: none;}
|
34 |
+
.post-grid-lazy{
|
35 |
+
text-align: center;
|
36 |
+
}
|
37 |
+
</style>
|
38 |
+
<?php
|
39 |
+
endif;
|
40 |
|
41 |
|
42 |
}
|