Version Description
- 2021-01-23 add - taxonomy parameter for archive page for pro version integration.
Download this release
Release Info
Developer | pickplugins |
Plugin | Post Grid |
Version | 2.0.75 |
Comparing to | |
See all releases |
Code changes from version 2.0.74 to 2.0.75
- post-grid.php +2 -2
- readme.txt +4 -1
- templates/post-grid-hook.php +24 -7
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.
|
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.
|
25 |
//define('post_grid_server_url', 'http://localhost/wp/');
|
26 |
define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
|
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.0.75
|
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.75');
|
25 |
//define('post_grid_server_url', 'http://localhost/wp/');
|
26 |
define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
|
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.6
|
7 |
-
Stable tag: 2.0.
|
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.0.74 =
|
226 |
* 2020-11-19 add - filter hook post_grid_link_to_args added
|
227 |
* 2020-11-19 add - filter hook post_grid_author_link_to_args added
|
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.6
|
7 |
+
Stable tag: 2.0.75
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
222 |
|
223 |
== Changelog ==
|
224 |
|
225 |
+
= 2.0.75 =
|
226 |
+
* 2021-01-23 add - taxonomy parameter for archive page for pro version integration.
|
227 |
+
|
228 |
= 2.0.74 =
|
229 |
* 2020-11-19 add - filter hook post_grid_link_to_args added
|
230 |
* 2020-11-19 add - filter hook post_grid_author_link_to_args added
|
templates/post-grid-hook.php
CHANGED
@@ -59,12 +59,29 @@ function post_grid_main_container($atts){
|
|
59 |
$masonry_enable = !empty($post_grid_options['masonry_enable']) ? $post_grid_options['masonry_enable'] : 'no';
|
60 |
$grid_type = isset($post_grid_options['grid_type']) ? $post_grid_options['grid_type'] : 'grid';
|
61 |
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
$post_grid_js_args = apply_filters('post_grid_js_args', $post_grid_js_args, $args);
|
70 |
|
@@ -138,7 +155,7 @@ add_action('post_grid_container', 'post_grid_posts_loop', 10);
|
|
138 |
|
139 |
function post_grid_posts_loop($args){
|
140 |
|
141 |
-
|
142 |
|
143 |
$post_grid_options = $args['options'];
|
144 |
$grid_id = $args['grid_id'];
|
59 |
$masonry_enable = !empty($post_grid_options['masonry_enable']) ? $post_grid_options['masonry_enable'] : 'no';
|
60 |
$grid_type = isset($post_grid_options['grid_type']) ? $post_grid_options['grid_type'] : 'grid';
|
61 |
|
62 |
+
$page_type = '';
|
63 |
+
|
64 |
+
$post_grid_js_args = array();
|
65 |
+
|
66 |
+
if(is_category() || is_tag() || is_tax()){
|
67 |
+
$term = get_queried_object();
|
68 |
+
$taxonomy = $term->taxonomy;
|
69 |
+
$term_id = $term->term_id;
|
70 |
+
|
71 |
+
$post_grid_js_args['page_type'] = 'taxonomy';
|
72 |
+
$post_grid_js_args['page_taxonomy'] = $taxonomy;
|
73 |
+
$post_grid_js_args['page_tax_term'] = $term_id;
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
$post_grid_js_args['id'] = $grid_id;
|
79 |
+
$post_grid_js_args['lazy_load'] = $lazy_load_enable;
|
80 |
+
$post_grid_js_args['masonry_enable'] = $masonry_enable;
|
81 |
+
$post_grid_js_args['view_type'] = $grid_type;
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
|
86 |
$post_grid_js_args = apply_filters('post_grid_js_args', $post_grid_js_args, $args);
|
87 |
|
155 |
|
156 |
function post_grid_posts_loop($args){
|
157 |
|
158 |
+
global $wp_query;
|
159 |
|
160 |
$post_grid_options = $args['options'];
|
161 |
$grid_id = $args['grid_id'];
|