Version Description
- Fixed Static font page pagination
- Tag change option for Title tag (h2,h3,h4)
Download this release
Release Info
Developer | techlabpro1 |
Plugin | The Post Grid |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.2.3 to 2.2.4
- README.txt +5 -1
- assets/css/thepostgrid.css +13 -5
- assets/js/admin.js +1 -1
- lib/classes/rtTPGAjaxResponse.php +142 -139
- lib/classes/rtTPGHelper.php +7 -1
- lib/classes/rtTPGInit.php +2 -0
- lib/classes/rtTPGOptions.php +18 -1
- lib/classes/rtTPGShortCode.php +11 -6
- lib/init.php +1 -0
- lib/views/layouts/isotope1.php +1 -1
- lib/views/layouts/layout1.php +1 -1
- lib/views/layouts/layout2.php +1 -1
- lib/views/layouts/layout3.php +1 -1
- the-post-grid.php +1 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
|
5 |
Requires at least: 4
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -138,6 +138,10 @@ For any bug or suggestion please mail support@radiustheme.com
|
|
138 |
|
139 |
== Changelog ==
|
140 |
|
|
|
|
|
|
|
|
|
141 |
= 2.2.2 =
|
142 |
* Remove admin banner
|
143 |
|
4 |
Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
|
5 |
Requires at least: 4
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
138 |
|
139 |
== Changelog ==
|
140 |
|
141 |
+
= 2.2.4 =
|
142 |
+
* Fixed Static font page pagination
|
143 |
+
* Tag change option for Title tag (h2,h3,h4)
|
144 |
+
|
145 |
= 2.2.2 =
|
146 |
* Remove admin banner
|
147 |
|
assets/css/thepostgrid.css
CHANGED
@@ -147,9 +147,11 @@
|
|
147 |
background: #fff;
|
148 |
padding: 15px 0;
|
149 |
}
|
150 |
-
.rt-tpg-container .layout1 .rt-holder .rt-detail h2
|
|
|
|
|
151 |
margin: 0 0 14px;
|
152 |
-
padding:
|
153 |
font-size: 24px;
|
154 |
line-height: 1.25;
|
155 |
}
|
@@ -207,7 +209,9 @@
|
|
207 |
-o-transform: scale(1.1);
|
208 |
transform: scale(1.1);
|
209 |
}
|
210 |
-
.rt-tpg-container .layout2 .rt-holder .rt-detail h2
|
|
|
|
|
211 |
font-size: 26px;
|
212 |
margin: 0 0 14px 0;
|
213 |
padding: 0px;
|
@@ -283,7 +287,9 @@
|
|
283 |
.rt-tpg-container .layout3 .rt-holder .rt-detail p {
|
284 |
line-height: 24px;
|
285 |
}
|
286 |
-
.rt-tpg-container .layout3 .rt-holder .rt-detail h2
|
|
|
|
|
287 |
font-size: 26px;
|
288 |
margin: 0 0 14px 0;
|
289 |
padding: 0px;
|
@@ -407,7 +413,9 @@
|
|
407 |
background: #fff;
|
408 |
padding: 15px 0;
|
409 |
}
|
410 |
-
.rt-tpg-container .isotope1 .rt-holder .rt-detail h2
|
|
|
|
|
411 |
font-size: 26px;
|
412 |
margin: 0 0 14px;
|
413 |
font-weight: 400;
|
147 |
background: #fff;
|
148 |
padding: 15px 0;
|
149 |
}
|
150 |
+
.rt-tpg-container .layout1 .rt-holder .rt-detail h2,
|
151 |
+
.rt-tpg-container .layout1 .rt-holder .rt-detail h3,
|
152 |
+
.rt-tpg-container .layout1 .rt-holder .rt-detail h4 {
|
153 |
margin: 0 0 14px;
|
154 |
+
padding: 0;
|
155 |
font-size: 24px;
|
156 |
line-height: 1.25;
|
157 |
}
|
209 |
-o-transform: scale(1.1);
|
210 |
transform: scale(1.1);
|
211 |
}
|
212 |
+
.rt-tpg-container .layout2 .rt-holder .rt-detail h2,
|
213 |
+
.rt-tpg-container .layout2 .rt-holder .rt-detail h3,
|
214 |
+
.rt-tpg-container .layout2 .rt-holder .rt-detail h4 {
|
215 |
font-size: 26px;
|
216 |
margin: 0 0 14px 0;
|
217 |
padding: 0px;
|
287 |
.rt-tpg-container .layout3 .rt-holder .rt-detail p {
|
288 |
line-height: 24px;
|
289 |
}
|
290 |
+
.rt-tpg-container .layout3 .rt-holder .rt-detail h2,
|
291 |
+
.rt-tpg-container .layout3 .rt-holder .rt-detail h3,
|
292 |
+
.rt-tpg-container .layout3 .rt-holder .rt-detail h4 {
|
293 |
font-size: 26px;
|
294 |
margin: 0 0 14px 0;
|
295 |
padding: 0px;
|
413 |
background: #fff;
|
414 |
padding: 15px 0;
|
415 |
}
|
416 |
+
.rt-tpg-container .isotope1 .rt-holder .rt-detail h2,
|
417 |
+
.rt-tpg-container .isotope1 .rt-holder .rt-detail h3,
|
418 |
+
.rt-tpg-container .isotope1 .rt-holder .rt-detail h4 {
|
419 |
font-size: 26px;
|
420 |
margin: 0 0 14px;
|
421 |
font-weight: 400;
|
assets/js/admin.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
if($('#sc-tabs').length) {
|
7 |
$('#sc-tabs').tabs();
|
8 |
}
|
9 |
-
if(
|
10 |
$(".rt-select2").select2({dropdownAutoWidth: true});
|
11 |
}
|
12 |
var postType = jQuery("#rc-sc-post-type").val();
|
6 |
if($('#sc-tabs').length) {
|
7 |
$('#sc-tabs').tabs();
|
8 |
}
|
9 |
+
if($.fn.select2) {
|
10 |
$(".rt-select2").select2({dropdownAutoWidth: true});
|
11 |
}
|
12 |
var postType = jQuery("#rc-sc-post-type").val();
|
lib/classes/rtTPGAjaxResponse.php
CHANGED
@@ -1,153 +1,156 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
if(!class_exists('rtTPGAjaxResponse')):
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
}
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
die();
|
37 |
-
}
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
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 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
|
151 |
-
|
152 |
|
153 |
endif;
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! class_exists( 'rtTPGAjaxResponse' ) ):
|
4 |
|
5 |
+
class rtTPGAjaxResponse {
|
6 |
+
function __construct() {
|
7 |
+
add_action( 'wp_ajax_rtTPGSettings', array( $this, 'rtTPGSaveSettings' ) );
|
8 |
+
add_action( 'wp_ajax_rtTPGShortCodeList', array( $this, 'shortCodeList' ) );
|
9 |
+
add_action( 'wp_ajax_rtTPGTaxonomyListByPostType', array( $this, 'rtTPGTaxonomyListByPostType' ) );
|
10 |
+
add_action( 'wp_ajax_rtTPGIsotopeFilter', array( $this, 'rtTPGIsotopeFilter' ) );
|
11 |
+
add_action( 'wp_ajax_rtTPGTermListByTaxonomy', array( $this, 'rtTPGTermListByTaxonomy' ) );
|
12 |
+
}
|
|
|
13 |
|
14 |
+
function rtTPGSaveSettings() {
|
15 |
+
global $rtTPG;
|
16 |
+
$rtTPG->rtTPGSettingFields();
|
17 |
+
$error = true;
|
18 |
+
$msg = null;
|
19 |
|
20 |
+
if ( $rtTPG->verifyNonce() ) {
|
21 |
+
unset( $_REQUEST['action'] );
|
22 |
+
unset( $_REQUEST[ $rtTPG->nonceId() ] );
|
23 |
+
unset( $_REQUEST['_wp_http_referer'] );
|
24 |
+
update_option( $rtTPG->options['settings'], $_REQUEST );
|
25 |
+
$error = true;
|
26 |
+
$msg = __( 'Settings successfully updated', 'the-post-grid' );
|
27 |
+
} else {
|
28 |
+
$msg = __( 'Security Error !!', 'the-post-grid' );
|
29 |
+
}
|
30 |
+
wp_send_json( array(
|
31 |
+
'error' => $error,
|
32 |
+
'msg' => $msg
|
33 |
+
) );
|
34 |
+
die();
|
35 |
+
}
|
|
|
|
|
36 |
|
37 |
+
function rtTPGTaxonomyListByPostType() {
|
38 |
+
global $rtTPG;
|
39 |
+
$error = true;
|
40 |
+
$msg = $data = null;
|
41 |
+
if ( $rtTPG->verifyNonce() ) {
|
42 |
+
$error = false;
|
43 |
+
$taxonomies = $rtTPG->rt_get_all_taxonomy_by_post_type( isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : null );
|
44 |
+
if ( is_array( $taxonomies ) && ! empty( $taxonomies ) ) {
|
45 |
+
$data .= $rtTPG->rtFieldGenerator(
|
46 |
+
array(
|
47 |
+
'type' => 'checkbox',
|
48 |
+
'name' => 'tpg_taxonomy',
|
49 |
+
'label' => 'Taxonomy',
|
50 |
+
'id' => 'post-taxonomy',
|
51 |
+
"multiple" => true,
|
52 |
+
'options' => $taxonomies
|
53 |
+
)
|
54 |
+
);
|
55 |
+
} else {
|
56 |
+
$data = __( '<div class="field-holder">No Taxonomy found</div>', 'the-post-grid' );
|
57 |
+
}
|
58 |
|
59 |
+
} else {
|
60 |
+
$msg = __( 'Security error', 'the-post-grid' );
|
61 |
+
}
|
62 |
+
wp_send_json( array( 'error' => $error, 'msg' => $msg, 'data' => $data ) );
|
63 |
+
die();
|
64 |
+
}
|
65 |
|
66 |
+
function rtTPGIsotopeFilter() {
|
67 |
+
global $rtTPG;
|
68 |
+
$error = true;
|
69 |
+
$msg = $data = null;
|
70 |
+
if ( $rtTPG->verifyNonce() ) {
|
71 |
+
$error = false;
|
72 |
+
$taxonomies = $rtTPG->rt_get_taxonomy_for_isotope_filter( isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : null );
|
73 |
+
if ( is_array( $taxonomies ) && ! empty( $taxonomies ) ) {
|
74 |
+
foreach ( $taxonomies as $tKey => $tax ) {
|
75 |
+
$data .= "<option value='{$tKey}'>{$tax}</option>";
|
76 |
+
}
|
77 |
+
}
|
78 |
+
} else {
|
79 |
+
$msg = __( 'Security error', 'the-post-grid' );
|
80 |
+
}
|
81 |
+
wp_send_json( array( 'error' => $error, 'msg' => $msg, 'data' => $data ) );
|
82 |
+
die();
|
83 |
+
}
|
84 |
|
85 |
+
function rtTPGTermListByTaxonomy() {
|
86 |
+
global $rtTPG;
|
87 |
+
$error = true;
|
88 |
+
$msg = $data = null;
|
89 |
+
if ( $rtTPG->verifyNonce() ) {
|
90 |
+
$error = false;
|
91 |
+
$taxonomy = isset( $_REQUEST['taxonomy'] ) ? $_REQUEST['taxonomy'] : null;
|
92 |
+
$data .= "<div class='term-filter-item-container {$taxonomy}'>";
|
93 |
+
$data .= $rtTPG->rtFieldGenerator(
|
94 |
+
array(
|
95 |
+
'type' => 'select',
|
96 |
+
'name' => 'term_' . $taxonomy,
|
97 |
+
'label' => ucfirst( str_replace( '_', ' ', $taxonomy ) ),
|
98 |
+
'class' => 'rt-select2 full',
|
99 |
+
'id' => 'term-' . mt_rand(),
|
100 |
+
'holderClass' => "term-filter-item {$taxonomy}",
|
101 |
+
'value' => null,
|
102 |
+
"multiple" => true,
|
103 |
+
'options' => $rtTPG->rt_get_all_term_by_taxonomy( $taxonomy )
|
104 |
+
)
|
105 |
+
);
|
106 |
+
$data .= $rtTPG->rtFieldGenerator(
|
107 |
+
array(
|
108 |
+
'type' => 'select',
|
109 |
+
'name' => 'term_operator_' . $taxonomy,
|
110 |
+
'label' => 'Operator',
|
111 |
+
'class' => 'rt-select2 full',
|
112 |
+
'holderClass' => "term-filter-item-operator {$taxonomy}",
|
113 |
+
'options' => $rtTPG->rtTermOperators()
|
114 |
+
)
|
115 |
+
);
|
116 |
+
$data .= "</div>";
|
117 |
+
} else {
|
118 |
+
$msg = __( 'Security error', 'the-post-grid' );
|
119 |
+
}
|
120 |
+
wp_send_json( array( 'error' => $error, 'msg' => $msg, 'data' => $data ) );
|
121 |
+
die();
|
122 |
+
}
|
123 |
|
124 |
+
function shortCodeList() {
|
125 |
+
global $rtTPG;
|
126 |
+
$html = null;
|
127 |
+
$scQ = new WP_Query( array( 'post_type' => $rtTPG->post_type,
|
128 |
+
'order_by' => 'title',
|
129 |
+
'order' => 'DESC',
|
130 |
+
'post_status' => 'publish',
|
131 |
+
'posts_per_page' => - 1
|
132 |
+
) );
|
133 |
+
if ( $scQ->have_posts() ) {
|
134 |
|
135 |
+
$html .= "<div class='mce-container mce-form'>";
|
136 |
+
$html .= "<div class='mce-container-body'>";
|
137 |
+
$html .= '<label class="mce-widget mce-label" style="padding: 20px;font-weight: bold;" for="scid">' . __( 'Select Short code', 'the-post-grid' ) . '</label>';
|
138 |
+
$html .= "<select name='id' id='scid' style='width: 150px;margin: 15px;'>";
|
139 |
+
$html .= "<option value=''>" . __( 'Default', 'the-post-grid' ) . "</option>";
|
140 |
+
while ( $scQ->have_posts() ) {
|
141 |
+
$scQ->the_post();
|
142 |
+
$html .= "<option value='" . get_the_ID() . "'>" . get_the_title() . "</option>";
|
143 |
+
}
|
144 |
+
$html .= "</select>";
|
145 |
+
$html .= "</div>";
|
146 |
+
$html .= "</div>";
|
147 |
+
} else {
|
148 |
+
$html .= "<div>" . __( 'No shortCode found.', 'the-post-grid' ) . "</div>";
|
149 |
+
}
|
150 |
+
echo $html;
|
151 |
+
die();
|
152 |
+
}
|
153 |
|
154 |
+
}
|
155 |
|
156 |
endif;
|
lib/classes/rtTPGHelper.php
CHANGED
@@ -237,7 +237,13 @@ if ( ! class_exists( 'rtTPGHelper' ) ):
|
|
237 |
$showitems = ( $range * 2 ) + 1;
|
238 |
global $paged;
|
239 |
if ( empty( $paged ) ) {
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
}
|
242 |
if ( $pages == '' ) {
|
243 |
global $wp_query;
|
237 |
$showitems = ( $range * 2 ) + 1;
|
238 |
global $paged;
|
239 |
if ( empty( $paged ) ) {
|
240 |
+
if ( get_query_var('paged') ) {
|
241 |
+
$paged = get_query_var('paged');
|
242 |
+
} elseif ( get_query_var('page') ) {
|
243 |
+
$paged = get_query_var('page');
|
244 |
+
} else {
|
245 |
+
$paged = 1;
|
246 |
+
}
|
247 |
}
|
248 |
if ( $pages == '' ) {
|
249 |
global $wp_query;
|
lib/classes/rtTPGInit.php
CHANGED
@@ -179,11 +179,13 @@ if ( ! class_exists( 'rtTPGInit' ) ):
|
|
179 |
'jquery',
|
180 |
'ace_code_highlighter_js',
|
181 |
'ace_mode_js',
|
|
|
182 |
'rt-tpg-admin',
|
183 |
) );
|
184 |
|
185 |
// styles
|
186 |
wp_enqueue_style( array(
|
|
|
187 |
'rt-tpg-admin',
|
188 |
) );
|
189 |
|
179 |
'jquery',
|
180 |
'ace_code_highlighter_js',
|
181 |
'ace_mode_js',
|
182 |
+
'rt-select2-js',
|
183 |
'rt-tpg-admin',
|
184 |
) );
|
185 |
|
186 |
// styles
|
187 |
wp_enqueue_style( array(
|
188 |
+
'rt-select2-css',
|
189 |
'rt-tpg-admin',
|
190 |
) );
|
191 |
|
lib/classes/rtTPGOptions.php
CHANGED
@@ -61,7 +61,7 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
61 |
'label' => 'Custom Css',
|
62 |
'id' => 'custom-css',
|
63 |
'value' => isset( $settings['custom_css'] ) ? trim( $settings['custom_css'] ) : null,
|
64 |
-
)
|
65 |
);
|
66 |
}
|
67 |
|
@@ -258,6 +258,15 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
258 |
"id" => "tpg_overlay",
|
259 |
"option" => 'Enable'
|
260 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
);
|
262 |
}
|
263 |
|
@@ -318,6 +327,14 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
318 |
|
319 |
}
|
320 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
function itemFields() {
|
322 |
return array(
|
323 |
"type" => "checkbox",
|
61 |
'label' => 'Custom Css',
|
62 |
'id' => 'custom-css',
|
63 |
'value' => isset( $settings['custom_css'] ) ? trim( $settings['custom_css'] ) : null,
|
64 |
+
)
|
65 |
);
|
66 |
}
|
67 |
|
258 |
"id" => "tpg_overlay",
|
259 |
"option" => 'Enable'
|
260 |
),
|
261 |
+
'title_tag' => array(
|
262 |
+
'type' => 'select',
|
263 |
+
'name' => 'title_tag',
|
264 |
+
'label' => 'Title tag',
|
265 |
+
'class' => 'rt-select2',
|
266 |
+
'id' => 'title-tag',
|
267 |
+
'options' => $this->getTitleTags(),
|
268 |
+
'default' => 'h2'
|
269 |
+
),
|
270 |
);
|
271 |
}
|
272 |
|
327 |
|
328 |
}
|
329 |
|
330 |
+
function getTitleTags() {
|
331 |
+
return array(
|
332 |
+
'h2' => "H2",
|
333 |
+
'h3' => "H3",
|
334 |
+
'h4' => "H4"
|
335 |
+
);
|
336 |
+
}
|
337 |
+
|
338 |
function itemFields() {
|
339 |
return array(
|
340 |
"type" => "checkbox",
|
lib/classes/rtTPGShortCode.php
CHANGED
@@ -111,9 +111,13 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
111 |
}
|
112 |
// Set 'posts_per_page' parameter
|
113 |
$args['posts_per_page'] = $posts_per_page;
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
|
|
|
|
|
|
117 |
$offset = $posts_per_page * ( (int) $paged - 1 );
|
118 |
$args['paged'] = $paged;
|
119 |
|
@@ -215,8 +219,9 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
215 |
|
216 |
$arg['overlay'] = empty( $scMeta['tpg_overlay'][0] ) ? false : true;
|
217 |
|
218 |
-
$arg['items']
|
219 |
-
$
|
|
|
220 |
// Start layout
|
221 |
$html .= "<div class='container-fluid rt-tpg-container' id='{$layoutID}'>";
|
222 |
$extClass = null;
|
@@ -328,7 +333,7 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
328 |
$this->scA[] = $scriptGenerator;
|
329 |
add_action( 'wp_footer', array( $this, 'register_sc_scripts' ) );
|
330 |
} else {
|
331 |
-
$html .= "<p>No shortCode found</p>";
|
332 |
}
|
333 |
|
334 |
return $html;
|
111 |
}
|
112 |
// Set 'posts_per_page' parameter
|
113 |
$args['posts_per_page'] = $posts_per_page;
|
114 |
+
if ( get_query_var('paged') ) {
|
115 |
+
$paged = get_query_var('paged');
|
116 |
+
} elseif ( get_query_var('page') ) {
|
117 |
+
$paged = get_query_var('page');
|
118 |
+
} else {
|
119 |
+
$paged = 1;
|
120 |
+
}
|
121 |
$offset = $posts_per_page * ( (int) $paged - 1 );
|
122 |
$args['paged'] = $paged;
|
123 |
|
219 |
|
220 |
$arg['overlay'] = empty( $scMeta['tpg_overlay'][0] ) ? false : true;
|
221 |
|
222 |
+
$arg['items'] = isset( $scMeta['item_fields'] ) ? ( $scMeta['item_fields'] ? $scMeta['item_fields'] : array() ) : array();
|
223 |
+
$arg['title_tag'] = ( ! empty( $scMeta['title_tag'][0] ) && in_array( $scMeta['title_tag'][0], array_keys( $rtTPG->getTitleTags() ) ) ) ? esc_attr( $scMeta['title_tag'][0] ) : 'h2';
|
224 |
+
$postQuery = new WP_Query( $args );
|
225 |
// Start layout
|
226 |
$html .= "<div class='container-fluid rt-tpg-container' id='{$layoutID}'>";
|
227 |
$extClass = null;
|
333 |
$this->scA[] = $scriptGenerator;
|
334 |
add_action( 'wp_footer', array( $this, 'register_sc_scripts' ) );
|
335 |
} else {
|
336 |
+
$html .= "<p>" . __( "No shortCode found", 'the-post-grid' ) . "</p>";
|
337 |
}
|
338 |
|
339 |
return $html;
|
lib/init.php
CHANGED
@@ -15,6 +15,7 @@ if ( ! class_exists( 'rtTPG' ) ) {
|
|
15 |
'installed_version' => 'rt_the_post_grid_current_version'
|
16 |
);
|
17 |
$this->defaultSettings = array(
|
|
|
18 |
'custom_css' => null
|
19 |
);
|
20 |
|
15 |
'installed_version' => 'rt_the_post_grid_current_version'
|
16 |
);
|
17 |
$this->defaultSettings = array(
|
18 |
+
'title_tag' => 'h2',
|
19 |
'custom_css' => null
|
20 |
);
|
21 |
|
lib/views/layouts/isotope1.php
CHANGED
@@ -18,7 +18,7 @@ $html .= "<div class='{$grid} {$class} {$isoFilter}'>";
|
|
18 |
}
|
19 |
$html .= '<div class="rt-detail">';
|
20 |
if(in_array('title', $items)){
|
21 |
-
$html .=
|
22 |
}
|
23 |
$postMetaTop = $postMetaMid = null;
|
24 |
|
18 |
}
|
19 |
$html .= '<div class="rt-detail">';
|
20 |
if(in_array('title', $items)){
|
21 |
+
$html .= sprintf('<%1$s class="entry-title"><a href="%2$s">%3$s</a></%1$s>', $title_tag, $pLink, $title);
|
22 |
}
|
23 |
$postMetaTop = $postMetaMid = null;
|
24 |
|
lib/views/layouts/layout1.php
CHANGED
@@ -17,7 +17,7 @@ $html .= "<div class='{$grid} {$class}'>";
|
|
17 |
}
|
18 |
$html .= '<div class="rt-detail">';
|
19 |
if(in_array('title', $items)){
|
20 |
-
$html .=
|
21 |
}
|
22 |
$postMetaTop = $postMetaMid =null;
|
23 |
|
17 |
}
|
18 |
$html .= '<div class="rt-detail">';
|
19 |
if(in_array('title', $items)){
|
20 |
+
$html .= sprintf('<%1$s class="entry-title"><a href="%2$s">%3$s</a></%1$s>', $title_tag, $pLink, $title);
|
21 |
}
|
22 |
$postMetaTop = $postMetaMid =null;
|
23 |
|
lib/views/layouts/layout2.php
CHANGED
@@ -22,7 +22,7 @@ $html .= "<div class='{$grid} {$class}'>";
|
|
22 |
$html .= "<div class='{$content_area}'>";
|
23 |
$html .= '<div class="rt-detail">';
|
24 |
if(in_array('title', $items)){
|
25 |
-
|
26 |
}
|
27 |
|
28 |
$metaHtml = null;
|
22 |
$html .= "<div class='{$content_area}'>";
|
23 |
$html .= '<div class="rt-detail">';
|
24 |
if(in_array('title', $items)){
|
25 |
+
$html .= sprintf('<%1$s class="entry-title"><a href="%2$s">%3$s</a></%1$s>', $title_tag, $pLink, $title);
|
26 |
}
|
27 |
|
28 |
$metaHtml = null;
|
lib/views/layouts/layout3.php
CHANGED
@@ -24,7 +24,7 @@ $html .= "<div class='{$grid} {$class}'>";
|
|
24 |
$html .= "<div class='{$content_area}'>";
|
25 |
$html .= '<div class="rt-detail">';
|
26 |
if(in_array('title', $items)){
|
27 |
-
|
28 |
}
|
29 |
$metaHtml = null;
|
30 |
if(in_array('post_date', $items) && $date){
|
24 |
$html .= "<div class='{$content_area}'>";
|
25 |
$html .= '<div class="rt-detail">';
|
26 |
if(in_array('title', $items)){
|
27 |
+
$html .= sprintf('<%1$s class="entry-title"><a href="%2$s">%3$s</a></%1$s>', $title_tag, $pLink, $title);
|
28 |
}
|
29 |
$metaHtml = null;
|
30 |
if(in_array('post_date', $items) && $date){
|
the-post-grid.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://demo.radiustheme.com/wordpress/plugins/the-post-grid/
|
5 |
* Description: Fast & Easy way to display WordPress post in Grid, List & Isotope view ( filter by category, tag, author..) without a single line of coding.
|
6 |
* Author: RadiusTheme
|
7 |
-
* Version: 2.2.
|
8 |
* Text Domain: the-post-grid
|
9 |
* Domain Path: /languages
|
10 |
* Author URI: https://radiustheme.com/
|
4 |
* Plugin URI: http://demo.radiustheme.com/wordpress/plugins/the-post-grid/
|
5 |
* Description: Fast & Easy way to display WordPress post in Grid, List & Isotope view ( filter by category, tag, author..) without a single line of coding.
|
6 |
* Author: RadiusTheme
|
7 |
+
* Version: 2.2.4
|
8 |
* Text Domain: the-post-grid
|
9 |
* Domain Path: /languages
|
10 |
* Author URI: https://radiustheme.com/
|