Post Grid - Version 1.3

Version Description

  • 05/03/2015 fix- pagination at home page issue fixed.
Download this release

Release Info

Developer paratheme
Plugin Icon 128x128 Post Grid
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

includes/post-grid-functions.php CHANGED
@@ -127,9 +127,21 @@ function post_grid_dark_color($input_color)
127
{
128
129
?>
130
- <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwoocommerce-products-slider%2F&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80&amp;appId=652982311485932" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:80px;" allowTransparency="true"></iframe>
131
132
- <br />
133
<!-- Place this tag in your head or just before your close body tag. -->
134
<script src="https://apis.google.com/js/platform.js" async defer></script>
135
127
{
128
129
?>
130
131
+
132
+ <div id="fb-root"></div>
133
+ <script>(function(d, s, id) {
134
+ var js, fjs = d.getElementsByTagName(s)[0];
135
+ if (d.getElementById(id)) return;
136
+ js = d.createElement(s); js.id = id;
137
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=652982311485932";
138
+ fjs.parentNode.insertBefore(js, fjs);
139
+ }(document, 'script', 'facebook-jssdk'));</script>
140
+
141
+
142
+ <div class="fb-like" data-href="https://wordpress.org/plugins/post-grid/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
143
+
144
+ <br /><br />
145
<!-- Place this tag in your head or just before your close body tag. -->
146
<script src="https://apis.google.com/js/platform.js" async defer></script>
147
post-grid-help.php CHANGED
@@ -117,7 +117,12 @@
117
?>
118
</div>
119
120
-
121
122
</li>
123
117
?>
118
</div>
119
120
+
121
+ <div class="option-box">
122
+ <p class="option-title">Video Tutorial</p>
123
+ <p class="option-info">Please watch this video tutorial.</p>
124
+ <iframe width="640" height="480" src="<?php echo post_grid_tutorial_video_url; ?>" frameborder="0" allowfullscreen></iframe>
125
+ </div>
126
127
</li>
128
post-grid.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Post Grid
4
Plugin URI: http://paratheme.com
5
Description: Awesome post grid for query post from any post-type and display on grid.
6
- Version: 1.2
7
Author: paratheme
8
Author URI: http://paratheme.com
9
License: GPLv2 or later
@@ -20,7 +20,7 @@ define('post_grid_conatct_url', 'http://paratheme.com/contact/' );
20
define('post_grid_qa_url', 'http://paratheme.com/qa/' );
21
define('post_grid_plugin_name', 'Post Grid' );
22
define('post_grid_share_url', 'https://wordpress.org/plugins/post-grid/' );
23
- define('post_grid_tutorial_video_url', '//www.youtube.com/embed/B0sOggSp3h9fE?rel=0' );
24
25
26
@@ -97,7 +97,7 @@ register_activation_hook(__FILE__, 'post_grid_activation');
97
98
function post_grid_activation()
99
{
100
- $post_grid_version= "1.2";
101
update_option('post_grid_version', $post_grid_version); //update plugin version.
102
103
$post_grid_customer_type= "free"; //customer_type "free"
3
Plugin Name: Post Grid
4
Plugin URI: http://paratheme.com
5
Description: Awesome post grid for query post from any post-type and display on grid.
6
+ Version: 1.3
7
Author: paratheme
8
Author URI: http://paratheme.com
9
License: GPLv2 or later
20
define('post_grid_qa_url', 'http://paratheme.com/qa/' );
21
define('post_grid_plugin_name', 'Post Grid' );
22
define('post_grid_share_url', 'https://wordpress.org/plugins/post-grid/' );
23
+ define('post_grid_tutorial_video_url', '//www.youtube.com/embed/JsDfu6LXtj4?rel=0' );
24
25
26
97
98
function post_grid_activation()
99
{
100
+ $post_grid_version= "1.3";
101
update_option('post_grid_version', $post_grid_version); //update plugin version.
102
103
$post_grid_customer_type= "free"; //customer_type "free"
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
Donate link: http://paratheme.com
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: 4.1.1
7
- Stable tag: 1.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -85,6 +85,10 @@ then paste this shortcode anywhere in your page to display grid<br />
85
== Changelog ==
86
87
88
= 1.2 =
89
* 05/03/2015 remove- removed some options.
90
* 05/03/2015 add- grid layout builder.
3
Donate link: http://paratheme.com
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: 4.2
7
+ Stable tag: 1.3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
85
== Changelog ==
86
87
88
+ = 1.3 =
89
+ * 05/03/2015 fix- pagination at home page issue fixed.
90
+
91
+
92
= 1.2 =
93
* 05/03/2015 remove- removed some options.
94
* 05/03/2015 add- grid layout builder.
themes/flat/index.php CHANGED
@@ -85,6 +85,24 @@ function post_grid_themes_flat($post_id)
85
$html .= '<div class="post-grid-container post-grid-container-'.$post_id.' '.$post_grid_themes.' " >';
86
$html .= '<div class="post-grid-items" >';
87
88
if(!empty($post_grid_taxonomy))
89
{
90
$wp_query = new WP_Query(
@@ -102,7 +120,7 @@ function post_grid_themes_flat($post_id)
102
'orderby' => $post_grid_query_orderby,
103
'order' => $post_grid_query_order,
104
'posts_per_page' => $post_grid_post_per_page,
105
- 'paged' => get_query_var( 'paged' )
106
) );
107
}
108
else
@@ -114,7 +132,7 @@ function post_grid_themes_flat($post_id)
114
'orderby' => $post_grid_query_orderby,
115
'order' => $post_grid_query_order,
116
'posts_per_page' => $post_grid_post_per_page,
117
- 'paged' => get_query_var( 'paged' )
118
) );
119
}
120
@@ -429,7 +447,7 @@ function post_grid_themes_flat($post_id)
429
$html .= paginate_links( array(
430
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
431
'format' => '?paged=%#%',
432
- 'current' => max( 1, get_query_var('paged') ),
433
'total' => $wp_query->max_num_pages
434
) );
435
85
$html .= '<div class="post-grid-container post-grid-container-'.$post_id.' '.$post_grid_themes.' " >';
86
$html .= '<div class="post-grid-items" >';
87
88
+
89
+
90
+ if ( get_query_var('paged') ) {
91
+
92
+ $paged = get_query_var('paged');
93
+
94
+ } elseif ( get_query_var('page') ) {
95
+
96
+ $paged = get_query_var('page');
97
+
98
+ } else {
99
+
100
+ $paged = 1;
101
+
102
+ }
103
+
104
+
105
+
106
if(!empty($post_grid_taxonomy))
107
{
108
$wp_query = new WP_Query(
120
'orderby' => $post_grid_query_orderby,
121
'order' => $post_grid_query_order,
122
'posts_per_page' => $post_grid_post_per_page,
123
+ 'paged' => $paged
124
) );
125
}
126
else
132
'orderby' => $post_grid_query_orderby,
133
'order' => $post_grid_query_order,
134
'posts_per_page' => $post_grid_post_per_page,
135
+ 'paged' => $paged
136
) );
137
}
138
447
$html .= paginate_links( array(
448
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
449
'format' => '?paged=%#%',
450
+ 'current' => max( 1, $paged ),
451
'total' => $wp_query->max_num_pages
452
) );
453
themes/rounded/index.php CHANGED
@@ -84,6 +84,25 @@ function post_grid_themes_rounded($post_id)
84
$html .= '<div class="post-grid-container post-grid-container-'.$post_id.' '.$post_grid_themes.' " >';
85
$html .= '<div class="post-grid-items" >';
86
87
if(!empty($post_grid_taxonomy))
88
{
89
$wp_query = new WP_Query(
@@ -101,7 +120,7 @@ function post_grid_themes_rounded($post_id)
101
'orderby' => $post_grid_query_orderby,
102
'order' => $post_grid_query_order,
103
'posts_per_page' => $post_grid_post_per_page,
104
- 'paged' => get_query_var( 'paged' )
105
) );
106
}
107
else
@@ -113,7 +132,7 @@ function post_grid_themes_rounded($post_id)
113
'orderby' => $post_grid_query_orderby,
114
'order' => $post_grid_query_order,
115
'posts_per_page' => $post_grid_post_per_page,
116
- 'paged' => get_query_var( 'paged' )
117
) );
118
}
119
@@ -428,7 +447,7 @@ function post_grid_themes_rounded($post_id)
428
$html .= paginate_links( array(
429
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
430
'format' => '?paged=%#%',
431
- 'current' => max( 1, get_query_var('paged') ),
432
'total' => $wp_query->max_num_pages
433
) );
434
84
$html .= '<div class="post-grid-container post-grid-container-'.$post_id.' '.$post_grid_themes.' " >';
85
$html .= '<div class="post-grid-items" >';
86
87
+
88
+
89
+ if ( get_query_var('paged') ) {
90
+
91
+ $paged = get_query_var('paged');
92
+
93
+ } elseif ( get_query_var('page') ) {
94
+
95
+ $paged = get_query_var('page');
96
+
97
+ } else {
98
+
99
+ $paged = 1;
100
+
101
+ }
102
+
103
+
104
+
105
+
106
if(!empty($post_grid_taxonomy))
107
{
108
$wp_query = new WP_Query(
120
'orderby' => $post_grid_query_orderby,
121
'order' => $post_grid_query_order,
122
'posts_per_page' => $post_grid_post_per_page,
123
+ 'paged' => $paged
124
) );
125
}
126
else
132
'orderby' => $post_grid_query_orderby,
133
'order' => $post_grid_query_order,
134
'posts_per_page' => $post_grid_post_per_page,
135
+ 'paged' => $paged
136
) );
137
}
138
447
$html .= paginate_links( array(
448
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
449
'format' => '?paged=%#%',
450
+ 'current' => max( 1, $paged ),
451
'total' => $wp_query->max_num_pages
452
) );
453