Version Description
- 15/11/2019 fix - broken html issue when no post found
Download this release
Release Info
Developer | pickplugins |
Plugin | Post Grid |
Version | 2.0.42 |
Comparing to | |
See all releases |
Code changes from version 2.0.39 to 2.0.42
- assets/admin/js/scripts-new.js +6 -5
- includes/class-shortcodes.php +1 -1
- includes/post-meta-settings.php +4 -1
- post-grid.php +18 -14
- readme.txt +13 -2
- templates/post-grid.php +115 -153
assets/admin/js/scripts-new.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
jQuery(document).ready(function($)
|
2 |
{
|
3 |
|
|
|
4 |
$('.post-grid-meta-box .select2, #post_grid_post_settings .select2').select2({
|
5 |
width: '360px',
|
6 |
allowClear: true
|
@@ -9,21 +10,21 @@ jQuery(document).ready(function($)
|
|
9 |
|
10 |
|
11 |
$(document).on('change', '#post_grid_metabox .select-layout-content', function(){
|
12 |
-
var layout = $(this).val();
|
13 |
-
|
14 |
-
|
15 |
jQuery.ajax(
|
16 |
{
|
17 |
type: 'POST',
|
18 |
url: post_grid_ajax.post_grid_ajaxurl,
|
19 |
data: {"action": "post_grid_layout_content_ajax","layout":layout},
|
20 |
success: function(data)
|
21 |
-
{
|
22 |
//jQuery(".layout-content").html(data);
|
23 |
jQuery("#post_grid_metabox .layer-content").html(data);
|
24 |
}
|
25 |
});
|
26 |
-
|
27 |
})
|
28 |
|
29 |
|
1 |
jQuery(document).ready(function($)
|
2 |
{
|
3 |
|
4 |
+
|
5 |
$('.post-grid-meta-box .select2, #post_grid_post_settings .select2').select2({
|
6 |
width: '360px',
|
7 |
allowClear: true
|
10 |
|
11 |
|
12 |
$(document).on('change', '#post_grid_metabox .select-layout-content', function(){
|
13 |
+
var layout = $(this).val();
|
14 |
+
|
15 |
+
|
16 |
jQuery.ajax(
|
17 |
{
|
18 |
type: 'POST',
|
19 |
url: post_grid_ajax.post_grid_ajaxurl,
|
20 |
data: {"action": "post_grid_layout_content_ajax","layout":layout},
|
21 |
success: function(data)
|
22 |
+
{
|
23 |
//jQuery(".layout-content").html(data);
|
24 |
jQuery("#post_grid_metabox .layer-content").html(data);
|
25 |
}
|
26 |
});
|
27 |
+
|
28 |
})
|
29 |
|
30 |
|
includes/class-shortcodes.php
CHANGED
@@ -41,7 +41,7 @@ class class_post_grid_shortcodes{
|
|
41 |
wp_enqueue_script( 'imagesloaded.js' );
|
42 |
wp_enqueue_style( 'post-grid-style' );
|
43 |
wp_enqueue_style( 'post-grid-skin' );
|
44 |
-
wp_enqueue_style('font-awesome-5' );
|
45 |
|
46 |
return ob_get_clean();
|
47 |
|
41 |
wp_enqueue_script( 'imagesloaded.js' );
|
42 |
wp_enqueue_style( 'post-grid-style' );
|
43 |
wp_enqueue_style( 'post-grid-skin' );
|
44 |
+
//wp_enqueue_style('font-awesome-5' );
|
45 |
|
46 |
return ob_get_clean();
|
47 |
|
includes/post-meta-settings.php
CHANGED
@@ -34,7 +34,10 @@ function post_grid_post_settings_input( $post ) {
|
|
34 |
|
35 |
|
36 |
|
37 |
-
|
|
|
|
|
|
|
38 |
|
39 |
|
40 |
|
34 |
|
35 |
|
36 |
|
37 |
+
wp_enqueue_style('settings-tabs');
|
38 |
+
wp_enqueue_script('settings-tabs');
|
39 |
+
wp_enqueue_style('select2');
|
40 |
+
wp_enqueue_script('select2');
|
41 |
|
42 |
|
43 |
|
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
|
@@ -26,7 +26,7 @@ if( !class_exists( 'PostGrid' )){
|
|
26 |
define('post_grid_pro_url', 'https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/');
|
27 |
define('post_grid_qa_url', 'https://www.pickplugins.com/forum/');
|
28 |
define('post_grid_plugin_name', 'Post Grid');
|
29 |
-
define('post_grid_version', '2.0.
|
30 |
|
31 |
|
32 |
include('includes/classes/class-post-grid-support.php');
|
@@ -127,7 +127,7 @@ if( !class_exists( 'PostGrid' )){
|
|
127 |
// Register CSS & Styles
|
128 |
wp_register_style( 'post-grid-style', post_grid_plugin_url . 'assets/frontend/css/style.css');
|
129 |
wp_register_style( 'post-grid-skin', post_grid_plugin_url . 'assets/global/css/style.skins.css');
|
130 |
-
wp_register_style( 'font-awesome-5', post_grid_plugin_url . 'assets/global/css/font-awesome-5.css');
|
131 |
|
132 |
|
133 |
}
|
@@ -147,14 +147,14 @@ if( !class_exists( 'PostGrid' )){
|
|
147 |
wp_enqueue_script('post_grid_admin_js', plugins_url('assets/admin/js/scripts-new.js', __FILE__), array('jquery'));
|
148 |
wp_localize_script('post_grid_admin_js', 'post_grid_ajax', array('post_grid_ajaxurl' => admin_url('admin-ajax.php')));
|
149 |
|
150 |
-
wp_enqueue_script('post-grid-meta-box', plugins_url('assets/admin/js/post-grid-meta-box.js', __FILE__), array('jquery'));
|
151 |
-
wp_enqueue_script('select2.min', plugins_url('assets/admin/js/select2.full.js', __FILE__), array('jquery'));
|
152 |
wp_enqueue_script('post_grid_color_picker', plugins_url('/assets/admin/js/color-picker.js', __FILE__), array('wp-color-picker'), false, true);
|
153 |
-
wp_enqueue_script('settings-tabs', plugins_url('assets/admin/js/settings-tabs.js', __FILE__), array('jquery'));
|
154 |
|
|
|
|
|
155 |
|
156 |
-
wp_enqueue_style( 'wp-color-picker');
|
157 |
|
|
|
|
|
158 |
// Register Style
|
159 |
|
160 |
wp_register_style( 'select2', post_grid_plugin_url . 'assets/admin/css/select2.min.css');
|
@@ -175,6 +175,10 @@ if( !class_exists( 'PostGrid' )){
|
|
175 |
|
176 |
if ($screen->id == 'post_grid'){
|
177 |
|
|
|
|
|
|
|
|
|
178 |
wp_enqueue_script('codemirror', plugins_url('assets/admin/js/codemirror.js', __FILE__), array('jquery'));
|
179 |
wp_enqueue_script('simplescrollbars', plugins_url('assets/admin/js/simplescrollbars.js', __FILE__), array('jquery'));
|
180 |
wp_enqueue_script('css', plugins_url('assets/admin/js/css.js', __FILE__), array('jquery'));
|
@@ -190,23 +194,23 @@ if( !class_exists( 'PostGrid' )){
|
|
190 |
wp_enqueue_style('post-grid-meta-box');
|
191 |
wp_enqueue_style('codemirror');
|
192 |
wp_enqueue_style('simplescrollbars');
|
193 |
-
|
194 |
wp_enqueue_style('select2');
|
|
|
|
|
|
|
|
|
195 |
|
196 |
}
|
197 |
|
198 |
|
199 |
if ($screen->id == 'post_grid_page_layout_editor'){
|
200 |
wp_enqueue_style('font-awesome-5');
|
201 |
-
wp_enqueue_style('settings-tabs');
|
202 |
-
wp_enqueue_style('select2');
|
203 |
-
|
204 |
-
}
|
205 |
-
|
206 |
-
if ($screen->id == 'post_grid_page_post-grid-settings'){
|
207 |
|
208 |
|
209 |
|
|
|
|
|
210 |
}
|
211 |
|
212 |
|
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.42
|
7 |
Author: PickPlugins
|
8 |
Author URI: https://www.pickplugins.com/
|
9 |
License: GPLv2 or later
|
26 |
define('post_grid_pro_url', 'https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/');
|
27 |
define('post_grid_qa_url', 'https://www.pickplugins.com/forum/');
|
28 |
define('post_grid_plugin_name', 'Post Grid');
|
29 |
+
define('post_grid_version', '2.0.42');
|
30 |
|
31 |
|
32 |
include('includes/classes/class-post-grid-support.php');
|
127 |
// Register CSS & Styles
|
128 |
wp_register_style( 'post-grid-style', post_grid_plugin_url . 'assets/frontend/css/style.css');
|
129 |
wp_register_style( 'post-grid-skin', post_grid_plugin_url . 'assets/global/css/style.skins.css');
|
130 |
+
//wp_register_style( 'font-awesome-5', post_grid_plugin_url . 'assets/global/css/font-awesome-5.css');
|
131 |
|
132 |
|
133 |
}
|
147 |
wp_enqueue_script('post_grid_admin_js', plugins_url('assets/admin/js/scripts-new.js', __FILE__), array('jquery'));
|
148 |
wp_localize_script('post_grid_admin_js', 'post_grid_ajax', array('post_grid_ajaxurl' => admin_url('admin-ajax.php')));
|
149 |
|
|
|
|
|
150 |
wp_enqueue_script('post_grid_color_picker', plugins_url('/assets/admin/js/color-picker.js', __FILE__), array('wp-color-picker'), false, true);
|
|
|
151 |
|
152 |
+
wp_register_script('settings-tabs', plugins_url('assets/admin/js/settings-tabs.js', __FILE__), array('jquery'));
|
153 |
+
wp_register_script('select2', plugins_url('assets/admin/js/select2.full.js', __FILE__), array('jquery'));
|
154 |
|
|
|
155 |
|
156 |
+
wp_enqueue_style( 'wp-color-picker');
|
157 |
+
wp_enqueue_script('select2');
|
158 |
// Register Style
|
159 |
|
160 |
wp_register_style( 'select2', post_grid_plugin_url . 'assets/admin/css/select2.min.css');
|
175 |
|
176 |
if ($screen->id == 'post_grid'){
|
177 |
|
178 |
+
wp_enqueue_script('post-grid-meta-box', plugins_url('assets/admin/js/post-grid-meta-box.js', __FILE__), array('jquery'));
|
179 |
+
|
180 |
+
|
181 |
+
|
182 |
wp_enqueue_script('codemirror', plugins_url('assets/admin/js/codemirror.js', __FILE__), array('jquery'));
|
183 |
wp_enqueue_script('simplescrollbars', plugins_url('assets/admin/js/simplescrollbars.js', __FILE__), array('jquery'));
|
184 |
wp_enqueue_script('css', plugins_url('assets/admin/js/css.js', __FILE__), array('jquery'));
|
194 |
wp_enqueue_style('post-grid-meta-box');
|
195 |
wp_enqueue_style('codemirror');
|
196 |
wp_enqueue_style('simplescrollbars');
|
197 |
+
|
198 |
wp_enqueue_style('select2');
|
199 |
+
wp_enqueue_script('select2');
|
200 |
+
|
201 |
+
wp_enqueue_style('settings-tabs');
|
202 |
+
wp_enqueue_script('settings-tabs');
|
203 |
|
204 |
}
|
205 |
|
206 |
|
207 |
if ($screen->id == 'post_grid_page_layout_editor'){
|
208 |
wp_enqueue_style('font-awesome-5');
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
|
211 |
|
212 |
+
wp_enqueue_style('settings-tabs');
|
213 |
+
wp_enqueue_script('settings-tabs');
|
214 |
}
|
215 |
|
216 |
|
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.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -139,6 +139,17 @@ then paste this shortcode anywhere in your page to display grid<br />
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
= 2.0.39 =
|
143 |
* 22/08/2019 fix - Offset issue with pagination conflict issue fixed.
|
144 |
|
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.3
|
7 |
+
Stable tag: 2.0.42
|
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.42 =
|
143 |
+
* 15/11/2019 fix - broken html issue when no post found
|
144 |
+
|
145 |
+
= 2.0.41 =
|
146 |
+
* 07/10/2019 fix - select2 js issue fixed
|
147 |
+
|
148 |
+
= 2.0.40 =
|
149 |
+
* 07/10/2019 removed - removed font-awesome-5 from front-end.
|
150 |
+
* 07/10/2019 fix - post grid meta box style broken issue fixed.
|
151 |
+
|
152 |
+
|
153 |
= 2.0.39 =
|
154 |
* 22/08/2019 fix - Offset issue with pagination conflict issue fixed.
|
155 |
|
templates/post-grid.php
CHANGED
@@ -1,193 +1,155 @@
|
|
1 |
<?php
|
2 |
-
/*
|
3 |
-
* @Author pickplugins
|
4 |
-
* Copyright: 2015 pickplugins.com
|
5 |
-
*/
|
6 |
-
|
7 |
if ( ! defined('ABSPATH')) exit; // if direct access
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
if($enable_multi_skin=='yes'){
|
20 |
-
$skin_main = $skin;
|
21 |
-
}
|
22 |
-
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
<?php
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
}
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
?>
|
51 |
<div class="grid-items-wrap">
|
|
|
52 |
<?php
|
53 |
-
if($grid_type == 'timeline'){
|
54 |
-
?>
|
55 |
-
<div class="timeline-line"></div>
|
56 |
-
<?php
|
57 |
-
}
|
58 |
-
?>
|
59 |
-
<div class="grid-items <?php echo $owl_carousel_class; ?>">
|
60 |
-
<?php
|
61 |
-
$odd_even = 0;
|
62 |
-
|
63 |
-
if ( $post_grid_wp_query->have_posts() ) :
|
64 |
-
while ( $post_grid_wp_query->have_posts() ) : $post_grid_wp_query->the_post();
|
65 |
-
$item_post_id = get_the_ID();
|
66 |
-
//var_dump($item_post_id);
|
67 |
-
$post_grid_post_settings = get_post_meta( $item_post_id, 'post_grid_post_settings', true );
|
68 |
-
//var_dump($post_grid_post_settings);
|
69 |
-
if($enable_multi_skin=='yes'){
|
70 |
-
if(!empty($post_grid_post_settings['post_skin'])){
|
71 |
-
$skin = $post_grid_post_settings['post_skin'];
|
72 |
-
}
|
73 |
-
else{
|
74 |
-
$skin = $skin_main;
|
75 |
-
}
|
76 |
-
}
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
90 |
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
|
99 |
|
100 |
-
if($grid_type=='filterable' || $grid_type=='glossary'){
|
101 |
-
$item_css_class['mix'] = 'mix';
|
102 |
-
$item_css_class['post_term_slug'] = post_grid_term_slug_list($item_post_id);
|
103 |
-
}
|
104 |
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
}
|
109 |
|
110 |
|
111 |
-
$item_css_class = apply_filters('post_grid_item_classes', $item_css_class);
|
112 |
-
$item_css_class = implode(' ', $item_css_class);
|
113 |
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
|
|
116 |
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
-
|
128 |
-
?>
|
129 |
-
<span class="timeline-arrow">
|
130 |
-
<i class="timeline-bubble"></i>
|
131 |
-
</span>
|
132 |
-
<?php
|
133 |
}
|
134 |
-
?></div> <?php /* End .item*/?>
|
135 |
-
<?php
|
136 |
|
137 |
-
|
|
|
|
|
|
|
|
|
138 |
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
-
|
142 |
-
|
143 |
|
144 |
-
|
145 |
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
-
|
149 |
|
150 |
-
if( $post_grid_wp_query->current_post == $position ){
|
151 |
|
152 |
-
if(!empty($ads_positions_html[$position]))
|
153 |
-
echo apply_filters('post_grid_nth_item_html',$ads_positions_html[$position]);
|
154 |
|
155 |
-
|
156 |
-
}
|
157 |
|
158 |
-
|
|
|
159 |
|
160 |
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
?>
|
165 |
-
</div> <!-- .grid-items -->
|
166 |
-
</div> <!-- .grid-items-wrap -->
|
167 |
-
<div class="grid-nav-bottom">
|
168 |
-
<?php
|
169 |
-
include post_grid_plugin_dir.'/templates/nav-bottom.php';
|
170 |
-
?>
|
171 |
-
</div> <!-- End .grid-nav-bottom -->
|
172 |
-
<?php
|
173 |
-
|
174 |
-
wp_reset_query();
|
175 |
-
wp_reset_postdata();
|
176 |
-
|
177 |
-
else:
|
178 |
-
|
179 |
-
?>
|
180 |
-
<div class="no-post-found">
|
181 |
-
<?php echo apply_filters('post_grid_no_post_text', __('No Post found','post-grid')); ?>
|
182 |
-
</div> <!-- .no-post-found -->
|
183 |
-
<?php
|
184 |
-
endif;
|
185 |
-
|
186 |
-
|
187 |
-
include post_grid_plugin_dir.'/templates/scripts.php';
|
188 |
-
include post_grid_plugin_dir.'/templates/custom-js.php';
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
?>
|
193 |
-
</div> <!-- End .post-grid -->
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
if ( ! defined('ABSPATH')) exit; // if direct access
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
+
include post_grid_plugin_dir.'/templates/variables.php';
|
8 |
+
include post_grid_plugin_dir.'/templates/query.php';
|
9 |
+
include post_grid_plugin_dir.'/templates/custom-css.php';
|
10 |
+
include post_grid_plugin_dir.'/templates/lazy.php';
|
11 |
+
|
12 |
+
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
+
if($enable_multi_skin=='yes'){
|
15 |
+
$skin_main = $skin;
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
?>
|
20 |
|
21 |
+
<script>
|
22 |
+
post_grid_masonry_enable = "<?php echo $masonry_enable; ?>";
|
23 |
+
</script>
|
24 |
+
|
25 |
+
<div id="post-grid-<?php echo $grid_id; ?>" class="post-grid <?php echo $grid_type; ?>">
|
26 |
+
<div class="grid-nav-top">
|
27 |
+
<?php
|
28 |
+
include post_grid_plugin_dir.'templates/nav-top.php';
|
29 |
+
?>
|
30 |
+
</div>
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
<?php
|
35 |
+
$odd_even = 0;
|
36 |
+
|
37 |
+
if ( $post_grid_wp_query->have_posts() ) :
|
38 |
+
|
39 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
<div class="grid-items-wrap">
|
41 |
+
<div class="grid-items">
|
42 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
while ( $post_grid_wp_query->have_posts() ) : $post_grid_wp_query->the_post();
|
45 |
+
$item_post_id = get_the_ID();
|
46 |
+
//var_dump($item_post_id);
|
47 |
+
$post_grid_post_settings = get_post_meta( $item_post_id, 'post_grid_post_settings', true );
|
48 |
+
//var_dump($post_grid_post_settings);
|
49 |
+
if($enable_multi_skin=='yes'){
|
50 |
+
if(!empty($post_grid_post_settings['post_skin'])){
|
51 |
+
$skin = $post_grid_post_settings['post_skin'];
|
52 |
+
}
|
53 |
+
else{
|
54 |
+
$skin = $skin_main;
|
55 |
+
}
|
56 |
+
}
|
57 |
|
58 |
+
if($odd_even%2==0){
|
59 |
+
$odd_even_calss = 'even';
|
60 |
+
}
|
61 |
+
else{
|
62 |
+
$odd_even_calss = 'odd';
|
63 |
+
}
|
64 |
+
$odd_even++;
|
65 |
|
66 |
|
67 |
+
$item_css_class = array();
|
68 |
|
69 |
+
$item_css_class['item'] = 'item';
|
70 |
+
$item_css_class['item_id'] = 'item-'.$item_post_id;
|
71 |
|
72 |
+
$item_css_class['skin'] = 'skin '.$skin;
|
73 |
+
$item_css_class['odd_even'] = $odd_even_calss;
|
74 |
|
|
|
|
|
|
|
|
|
75 |
|
76 |
|
77 |
+
$item_css_class = apply_filters('post_grid_item_classes', $item_css_class);
|
78 |
+
$item_css_class = implode(' ', $item_css_class);
|
|
|
79 |
|
80 |
|
|
|
|
|
81 |
|
82 |
|
83 |
+
?><div class="<?php echo $item_css_class; ?>">
|
84 |
+
<div class="layer-wrapper">
|
85 |
+
<?php
|
86 |
+
include post_grid_plugin_dir.'/templates/layer-media.php';
|
87 |
+
include post_grid_plugin_dir.'/templates/layer-content.php';
|
88 |
+
//include post_grid_plugin_dir.'/templates/layer-hover.php';
|
89 |
+
?>
|
90 |
+
</div> <!-- .$item_css_class -->
|
91 |
+
</div> <!-- .layer-wrapper -->
|
92 |
+
<?php
|
93 |
|
94 |
+
$post_grid_ads_loop_meta_options = get_post_meta($grid_id, 'post_grid_ads_loop_meta_options', true);
|
95 |
|
96 |
+
if(!empty($post_grid_ads_loop_meta_options['ads_positions'])){
|
97 |
+
|
98 |
+
$ads_positions = $post_grid_ads_loop_meta_options['ads_positions'];
|
99 |
+
$ads_positions = explode(',',$ads_positions);
|
100 |
+
|
101 |
+
$ads_positions_html = $post_grid_ads_loop_meta_options['ads_positions_html'];
|
102 |
+
|
103 |
+
$post_grid_ads_positions = apply_filters('post_grid_filter_ads_positions', $ads_positions);
|
104 |
+
|
105 |
+
foreach($post_grid_ads_positions as $position){
|
106 |
+
|
107 |
+
if( $post_grid_wp_query->current_post == $position ){
|
108 |
+
|
109 |
+
if(!empty($ads_positions_html[$position]))
|
110 |
+
echo apply_filters('post_grid_nth_item_html',$ads_positions_html[$position]);
|
111 |
|
112 |
+
}
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
|
|
|
|
114 |
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
endwhile;
|
120 |
|
121 |
+
?>
|
122 |
+
</div><!-- .grid-items -->
|
123 |
+
</div><!-- .grid-items-wrap -->
|
124 |
+
<div class="grid-nav-bottom">
|
125 |
+
<?php
|
126 |
+
include post_grid_plugin_dir.'/templates/nav-bottom.php';
|
127 |
+
?>
|
128 |
+
</div> <!-- End .grid-nav-bottom -->
|
129 |
+
<?php
|
130 |
|
131 |
+
wp_reset_query();
|
132 |
+
wp_reset_postdata();
|
133 |
|
134 |
+
else:
|
135 |
|
136 |
+
?>
|
137 |
+
<div class="no-post-found">
|
138 |
+
<?php echo apply_filters('post_grid_no_post_text', __('No Post found','post-grid')); ?>
|
139 |
+
</div> <!-- .no-post-found -->
|
140 |
+
<?php
|
141 |
+
endif;
|
142 |
|
143 |
+
?>
|
144 |
|
|
|
145 |
|
|
|
|
|
146 |
|
147 |
+
<?php
|
|
|
148 |
|
149 |
+
include post_grid_plugin_dir.'/templates/scripts.php';
|
150 |
+
include post_grid_plugin_dir.'/templates/custom-js.php';
|
151 |
|
152 |
|
153 |
|
154 |
+
?>
|
155 |
+
</div><!-- End .post-grid -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|