Version Description
- Add container/ parent class
- Add read more with isotope layout
Download this release
Release Info
Developer | techlabpro1 |
Plugin | The Post Grid |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- README.txt +5 -1
- assets/css/thepostgrid.css +4 -1
- index.html +0 -0
- lib/classes/rtTPGInit.php +25 -15
- lib/classes/rtTPGOptions.php +46 -20
- lib/classes/rtTPGShortCode.php +15 -11
- lib/views/layouts/isotope1.php +3 -0
- 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.4 =
|
142 |
* Fixed Static font page pagination
|
143 |
* Tag change option for Title tag (h2,h3,h4)
|
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.5
|
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.5 =
|
142 |
+
* Add container/ parent class
|
143 |
+
* Add read more with isotope layout
|
144 |
+
|
145 |
= 2.2.4 =
|
146 |
* Fixed Static font page pagination
|
147 |
* Tag change option for Title tag (h2,h3,h4)
|
assets/css/thepostgrid.css
CHANGED
@@ -441,7 +441,9 @@
|
|
441 |
|
442 |
/* isotope read more button Buttons */
|
443 |
.rt-tpg-container .isotope1 .rt-holder .rt-detail .read-more {
|
444 |
-
|
|
|
|
|
445 |
}
|
446 |
.rt-tpg-container .isotope1 .rt-holder .rt-detail .read-more a{
|
447 |
padding: 6px 12px;
|
@@ -449,6 +451,7 @@
|
|
449 |
-moz-border-radius: 5px;
|
450 |
-webkit-border-radius: 5px;
|
451 |
font-size: 15px;
|
|
|
452 |
}
|
453 |
|
454 |
/* isotope Buttons */
|
441 |
|
442 |
/* isotope read more button Buttons */
|
443 |
.rt-tpg-container .isotope1 .rt-holder .rt-detail .read-more {
|
444 |
+
display: block;
|
445 |
+
text-align: right;
|
446 |
+
margin-top: 15px;
|
447 |
}
|
448 |
.rt-tpg-container .isotope1 .rt-holder .rt-detail .read-more a{
|
449 |
padding: 6px 12px;
|
451 |
-moz-border-radius: 5px;
|
452 |
-webkit-border-radius: 5px;
|
453 |
font-size: 15px;
|
454 |
+
display: inline-block;
|
455 |
}
|
456 |
|
457 |
/* isotope Buttons */
|
index.html
ADDED
File without changes
|
lib/classes/rtTPGInit.php
CHANGED
@@ -3,7 +3,8 @@
|
|
3 |
if ( ! class_exists( 'rtTPGInit' ) ):
|
4 |
class rtTPGInit {
|
5 |
|
6 |
-
function __construct()
|
|
|
7 |
add_action( 'init', array( $this, 'init' ), 1 );
|
8 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
9 |
add_action( 'plugins_loaded', array( $this, 'the_post_grid_load_text_domain' ) );
|
@@ -14,7 +15,8 @@ if ( ! class_exists( 'rtTPGInit' ) ):
|
|
14 |
add_action( 'admin_enqueue_scripts', array( $this, 'settings_admin_enqueue_scripts' ) );
|
15 |
}
|
16 |
|
17 |
-
function init()
|
|
|
18 |
|
19 |
// Create the post grid post type
|
20 |
$labels = array(
|
@@ -112,42 +114,48 @@ if ( ! class_exists( 'rtTPGInit' ) ):
|
|
112 |
$styles['rt-tpg-admin'] = $rtTPG->assetsUrl . 'css/admin.css';
|
113 |
}
|
114 |
|
115 |
-
|
116 |
foreach ( $scripts as $script ) {
|
117 |
-
wp_register_script( $script['handle'], $script['src'], $script['deps'], $
|
118 |
$script['footer'] );
|
119 |
}
|
120 |
|
121 |
|
122 |
foreach ( $styles as $k => $v ) {
|
123 |
-
wp_register_style( $k, $v, false, $
|
124 |
}
|
125 |
}
|
126 |
|
127 |
-
function admin_menu()
|
|
|
128 |
global $rtTPG;
|
129 |
-
add_submenu_page( 'edit.php?post_type=' . $rtTPG->post_type, __( 'Settings' ), __( 'Settings' ),
|
130 |
'administrator', 'rttpg_settings', array( $this, 'rttpg_settings' ) );
|
131 |
}
|
132 |
|
133 |
-
function rttpg_settings()
|
|
|
134 |
global $rtTPG;
|
135 |
$rtTPG->render( 'settings.settings' );
|
136 |
}
|
137 |
|
138 |
-
public function the_post_grid_load_text_domain()
|
|
|
139 |
load_plugin_textdomain( 'the-post-grid', false, RT_THE_POST_GRID_LANGUAGE_PATH );
|
140 |
}
|
141 |
|
142 |
-
function activate()
|
|
|
143 |
$this->insertDefaultData();
|
144 |
}
|
145 |
|
146 |
-
function deactivate()
|
|
|
147 |
|
148 |
}
|
149 |
|
150 |
-
private function insertDefaultData()
|
|
|
151 |
global $rtTPG;
|
152 |
update_option( $rtTPG->options['installed_version'], $rtTPG->options['version'] );
|
153 |
if ( ! get_option( $rtTPG->options['settings'] ) ) {
|
@@ -155,16 +163,18 @@ if ( ! class_exists( 'rtTPGInit' ) ):
|
|
155 |
}
|
156 |
}
|
157 |
|
158 |
-
function rt_post_grid_marketing( $links )
|
|
|
159 |
$links[] = '<a target="_blank" href="' . esc_url( 'http://demo.radiustheme.com/wordpress/plugins/the-post-grid/' ) . '">Demo</a>';
|
160 |
$links[] = '<a target="_blank" href="' . esc_url( 'https://www.radiustheme.com/how-to-setup-configure-the-post-grid-free-version-for-wordpress/' ) . '">Documentation</a>';
|
161 |
-
$links[] = '<a target="_blank" href="' . esc_url( 'https://www.radiustheme.com/the-post-grid-pro-for-wordpress/' ) . '">Get Pro</a>';
|
162 |
|
163 |
return $links;
|
164 |
}
|
165 |
|
166 |
|
167 |
-
function settings_admin_enqueue_scripts()
|
|
|
168 |
global $pagenow, $typenow, $rtTPG;
|
169 |
|
170 |
// validate page
|
3 |
if ( ! class_exists( 'rtTPGInit' ) ):
|
4 |
class rtTPGInit {
|
5 |
|
6 |
+
function __construct()
|
7 |
+
{
|
8 |
add_action( 'init', array( $this, 'init' ), 1 );
|
9 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
10 |
add_action( 'plugins_loaded', array( $this, 'the_post_grid_load_text_domain' ) );
|
15 |
add_action( 'admin_enqueue_scripts', array( $this, 'settings_admin_enqueue_scripts' ) );
|
16 |
}
|
17 |
|
18 |
+
function init()
|
19 |
+
{
|
20 |
|
21 |
// Create the post grid post type
|
22 |
$labels = array(
|
114 |
$styles['rt-tpg-admin'] = $rtTPG->assetsUrl . 'css/admin.css';
|
115 |
}
|
116 |
|
117 |
+
$version = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? time() : $rtTPG->options['version'];
|
118 |
foreach ( $scripts as $script ) {
|
119 |
+
wp_register_script( $script['handle'], $script['src'], $script['deps'], $version,
|
120 |
$script['footer'] );
|
121 |
}
|
122 |
|
123 |
|
124 |
foreach ( $styles as $k => $v ) {
|
125 |
+
wp_register_style( $k, $v, false, $version );
|
126 |
}
|
127 |
}
|
128 |
|
129 |
+
function admin_menu()
|
130 |
+
{
|
131 |
global $rtTPG;
|
132 |
+
add_submenu_page( 'edit.php?post_type=' . $rtTPG->post_type, __( 'Settings', "the-post-grid" ), __( 'Settings', "the-post-grid" ),
|
133 |
'administrator', 'rttpg_settings', array( $this, 'rttpg_settings' ) );
|
134 |
}
|
135 |
|
136 |
+
function rttpg_settings()
|
137 |
+
{
|
138 |
global $rtTPG;
|
139 |
$rtTPG->render( 'settings.settings' );
|
140 |
}
|
141 |
|
142 |
+
public function the_post_grid_load_text_domain()
|
143 |
+
{
|
144 |
load_plugin_textdomain( 'the-post-grid', false, RT_THE_POST_GRID_LANGUAGE_PATH );
|
145 |
}
|
146 |
|
147 |
+
function activate()
|
148 |
+
{
|
149 |
$this->insertDefaultData();
|
150 |
}
|
151 |
|
152 |
+
function deactivate()
|
153 |
+
{
|
154 |
|
155 |
}
|
156 |
|
157 |
+
private function insertDefaultData()
|
158 |
+
{
|
159 |
global $rtTPG;
|
160 |
update_option( $rtTPG->options['installed_version'], $rtTPG->options['version'] );
|
161 |
if ( ! get_option( $rtTPG->options['settings'] ) ) {
|
163 |
}
|
164 |
}
|
165 |
|
166 |
+
function rt_post_grid_marketing( $links )
|
167 |
+
{
|
168 |
$links[] = '<a target="_blank" href="' . esc_url( 'http://demo.radiustheme.com/wordpress/plugins/the-post-grid/' ) . '">Demo</a>';
|
169 |
$links[] = '<a target="_blank" href="' . esc_url( 'https://www.radiustheme.com/how-to-setup-configure-the-post-grid-free-version-for-wordpress/' ) . '">Documentation</a>';
|
170 |
+
$links[] = '<a target="_blank" style="color: #39b54a;font-weight: 700;" href="' . esc_url( 'https://www.radiustheme.com/the-post-grid-pro-for-wordpress/' ) . '">Get Pro</a>';
|
171 |
|
172 |
return $links;
|
173 |
}
|
174 |
|
175 |
|
176 |
+
function settings_admin_enqueue_scripts()
|
177 |
+
{
|
178 |
global $pagenow, $typenow, $rtTPG;
|
179 |
|
180 |
// validate page
|
lib/classes/rtTPGOptions.php
CHANGED
@@ -4,7 +4,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
4 |
|
5 |
class rtTPGOptions {
|
6 |
|
7 |
-
function rtPostTypes()
|
|
|
8 |
$post_types = get_post_types(
|
9 |
array(
|
10 |
'_builtin' => true
|
@@ -18,14 +19,16 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
18 |
return $post_types;
|
19 |
}
|
20 |
|
21 |
-
function rtPostOrders()
|
|
|
22 |
return array(
|
23 |
"ASC" => "Ascending",
|
24 |
"DESC" => "Descending",
|
25 |
);
|
26 |
}
|
27 |
|
28 |
-
function rtTermOperators()
|
|
|
29 |
return array(
|
30 |
'IN' => "IN — show posts which associate with one or more of selected terms",
|
31 |
'NOT IN' => "NOT IN — show posts which do not associate with any of selected terms",
|
@@ -33,14 +36,16 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
33 |
);
|
34 |
}
|
35 |
|
36 |
-
function rtTermRelations()
|
|
|
37 |
return array(
|
38 |
'AND' => "AND — show posts which match all settings",
|
39 |
'OR' => "OR — show posts which match one or more settings",
|
40 |
);
|
41 |
}
|
42 |
|
43 |
-
function rtPostOrderBy()
|
|
|
44 |
return array(
|
45 |
"ID" => "ID",
|
46 |
"title" => "Title",
|
@@ -50,7 +55,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
50 |
);
|
51 |
}
|
52 |
|
53 |
-
function rtTPGSettingFields()
|
|
|
54 |
global $rtTPG;
|
55 |
$settings = get_option( $rtTPG->options['settings'] );
|
56 |
|
@@ -65,7 +71,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
65 |
);
|
66 |
}
|
67 |
|
68 |
-
function rtTPGCommonFilterFields()
|
|
|
69 |
return array(
|
70 |
'post__in' => array(
|
71 |
"name" => "post__in",
|
@@ -94,7 +101,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
94 |
);
|
95 |
}
|
96 |
|
97 |
-
function rtTPGPostType()
|
|
|
98 |
return array(
|
99 |
"name" => "tpg_post_type",
|
100 |
"label" => "Post Type",
|
@@ -105,7 +113,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
105 |
);
|
106 |
}
|
107 |
|
108 |
-
function rtTPAdvanceFilters()
|
|
|
109 |
return array(
|
110 |
'type' => "checkbox",
|
111 |
'name' => "post_filter",
|
@@ -123,7 +132,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
123 |
);
|
124 |
}
|
125 |
|
126 |
-
function rtTPGPostStatus()
|
|
|
127 |
return array(
|
128 |
'publish' => 'Publish',
|
129 |
'pending' => 'Pending',
|
@@ -136,7 +146,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
136 |
);
|
137 |
}
|
138 |
|
139 |
-
function rtTPGLayoutSettingFields()
|
|
|
140 |
global $rtTPG;
|
141 |
|
142 |
return array(
|
@@ -258,7 +269,7 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
258 |
"id" => "tpg_overlay",
|
259 |
"option" => 'Enable'
|
260 |
),
|
261 |
-
'title_tag'
|
262 |
'type' => 'select',
|
263 |
'name' => 'title_tag',
|
264 |
'label' => 'Title tag',
|
@@ -270,16 +281,25 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
270 |
);
|
271 |
}
|
272 |
|
273 |
-
function get_excerpt_type()
|
|
|
274 |
return array(
|
275 |
'character' => "Character",
|
276 |
'word' => "Word"
|
277 |
);
|
278 |
}
|
279 |
|
280 |
-
function rtTPGStyleFields()
|
|
|
281 |
|
282 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
'primary_color' => array(
|
284 |
"type" => "text",
|
285 |
"name" => "primary_color",
|
@@ -327,7 +347,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
327 |
|
328 |
}
|
329 |
|
330 |
-
function getTitleTags()
|
|
|
331 |
return array(
|
332 |
'h2' => "H2",
|
333 |
'h3' => "H3",
|
@@ -335,7 +356,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
335 |
);
|
336 |
}
|
337 |
|
338 |
-
function itemFields()
|
|
|
339 |
return array(
|
340 |
"type" => "checkbox",
|
341 |
"name" => "item_fields",
|
@@ -348,14 +370,16 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
348 |
);
|
349 |
}
|
350 |
|
351 |
-
function rtMediaSource()
|
|
|
352 |
return array(
|
353 |
"feature_image" => __( "Feature Image", 'the-post-grid' ),
|
354 |
"first_image" => __( "First Image from content", 'the-post-grid' )
|
355 |
);
|
356 |
}
|
357 |
|
358 |
-
function rtTPGColumns()
|
|
|
359 |
return array(
|
360 |
1 => "Column 1",
|
361 |
2 => "Column 2",
|
@@ -366,7 +390,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
366 |
);
|
367 |
}
|
368 |
|
369 |
-
function rtTPGLayouts()
|
|
|
370 |
return array(
|
371 |
'layout1' => "Layout 1",
|
372 |
'layout2' => "Layout 2",
|
@@ -375,7 +400,8 @@ if ( ! class_exists( 'rtTPGOptions' ) ):
|
|
375 |
);
|
376 |
}
|
377 |
|
378 |
-
function rtTPGItemFields()
|
|
|
379 |
return array(
|
380 |
'title' => __( "Title", 'the-post-grid' ),
|
381 |
'excerpt' => __( "Excerpt", 'the-post-grid' ),
|
4 |
|
5 |
class rtTPGOptions {
|
6 |
|
7 |
+
function rtPostTypes()
|
8 |
+
{
|
9 |
$post_types = get_post_types(
|
10 |
array(
|
11 |
'_builtin' => true
|
19 |
return $post_types;
|
20 |
}
|
21 |
|
22 |
+
function rtPostOrders()
|
23 |
+
{
|
24 |
return array(
|
25 |
"ASC" => "Ascending",
|
26 |
"DESC" => "Descending",
|
27 |
);
|
28 |
}
|
29 |
|
30 |
+
function rtTermOperators()
|
31 |
+
{
|
32 |
return array(
|
33 |
'IN' => "IN — show posts which associate with one or more of selected terms",
|
34 |
'NOT IN' => "NOT IN — show posts which do not associate with any of selected terms",
|
36 |
);
|
37 |
}
|
38 |
|
39 |
+
function rtTermRelations()
|
40 |
+
{
|
41 |
return array(
|
42 |
'AND' => "AND — show posts which match all settings",
|
43 |
'OR' => "OR — show posts which match one or more settings",
|
44 |
);
|
45 |
}
|
46 |
|
47 |
+
function rtPostOrderBy()
|
48 |
+
{
|
49 |
return array(
|
50 |
"ID" => "ID",
|
51 |
"title" => "Title",
|
55 |
);
|
56 |
}
|
57 |
|
58 |
+
function rtTPGSettingFields()
|
59 |
+
{
|
60 |
global $rtTPG;
|
61 |
$settings = get_option( $rtTPG->options['settings'] );
|
62 |
|
71 |
);
|
72 |
}
|
73 |
|
74 |
+
function rtTPGCommonFilterFields()
|
75 |
+
{
|
76 |
return array(
|
77 |
'post__in' => array(
|
78 |
"name" => "post__in",
|
101 |
);
|
102 |
}
|
103 |
|
104 |
+
function rtTPGPostType()
|
105 |
+
{
|
106 |
return array(
|
107 |
"name" => "tpg_post_type",
|
108 |
"label" => "Post Type",
|
113 |
);
|
114 |
}
|
115 |
|
116 |
+
function rtTPAdvanceFilters()
|
117 |
+
{
|
118 |
return array(
|
119 |
'type' => "checkbox",
|
120 |
'name' => "post_filter",
|
132 |
);
|
133 |
}
|
134 |
|
135 |
+
function rtTPGPostStatus()
|
136 |
+
{
|
137 |
return array(
|
138 |
'publish' => 'Publish',
|
139 |
'pending' => 'Pending',
|
146 |
);
|
147 |
}
|
148 |
|
149 |
+
function rtTPGLayoutSettingFields()
|
150 |
+
{
|
151 |
global $rtTPG;
|
152 |
|
153 |
return array(
|
269 |
"id" => "tpg_overlay",
|
270 |
"option" => 'Enable'
|
271 |
),
|
272 |
+
'title_tag' => array(
|
273 |
'type' => 'select',
|
274 |
'name' => 'title_tag',
|
275 |
'label' => 'Title tag',
|
281 |
);
|
282 |
}
|
283 |
|
284 |
+
function get_excerpt_type()
|
285 |
+
{
|
286 |
return array(
|
287 |
'character' => "Character",
|
288 |
'word' => "Word"
|
289 |
);
|
290 |
}
|
291 |
|
292 |
+
function rtTPGStyleFields()
|
293 |
+
{
|
294 |
|
295 |
return array(
|
296 |
+
'parent_class' => array(
|
297 |
+
"name" => "parent_class",
|
298 |
+
"type" => "text",
|
299 |
+
"label" => "Parent class",
|
300 |
+
"class" => "medium-text",
|
301 |
+
"description" => "Parent class for adding custom css"
|
302 |
+
),
|
303 |
'primary_color' => array(
|
304 |
"type" => "text",
|
305 |
"name" => "primary_color",
|
347 |
|
348 |
}
|
349 |
|
350 |
+
function getTitleTags()
|
351 |
+
{
|
352 |
return array(
|
353 |
'h2' => "H2",
|
354 |
'h3' => "H3",
|
356 |
);
|
357 |
}
|
358 |
|
359 |
+
function itemFields()
|
360 |
+
{
|
361 |
return array(
|
362 |
"type" => "checkbox",
|
363 |
"name" => "item_fields",
|
370 |
);
|
371 |
}
|
372 |
|
373 |
+
function rtMediaSource()
|
374 |
+
{
|
375 |
return array(
|
376 |
"feature_image" => __( "Feature Image", 'the-post-grid' ),
|
377 |
"first_image" => __( "First Image from content", 'the-post-grid' )
|
378 |
);
|
379 |
}
|
380 |
|
381 |
+
function rtTPGColumns()
|
382 |
+
{
|
383 |
return array(
|
384 |
1 => "Column 1",
|
385 |
2 => "Column 2",
|
390 |
);
|
391 |
}
|
392 |
|
393 |
+
function rtTPGLayouts()
|
394 |
+
{
|
395 |
return array(
|
396 |
'layout1' => "Layout 1",
|
397 |
'layout2' => "Layout 2",
|
400 |
);
|
401 |
}
|
402 |
|
403 |
+
function rtTPGItemFields()
|
404 |
+
{
|
405 |
return array(
|
406 |
'title' => __( "Title", 'the-post-grid' ),
|
407 |
'excerpt' => __( "Excerpt", 'the-post-grid' ),
|
lib/classes/rtTPGShortCode.php
CHANGED
@@ -6,11 +6,13 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
6 |
|
7 |
private $scA = array();
|
8 |
|
9 |
-
function __construct()
|
|
|
10 |
add_shortcode( 'the-post-grid', array( $this, 'the_post_grid_short_code' ) );
|
11 |
}
|
12 |
|
13 |
-
function register_sc_scripts()
|
|
|
14 |
global $rtTPG;
|
15 |
$iso = false;
|
16 |
|
@@ -39,7 +41,8 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
39 |
}
|
40 |
}
|
41 |
|
42 |
-
function the_post_grid_short_code( $atts, $content = null )
|
|
|
43 |
$rand = mt_rand();
|
44 |
$layoutID = "rt-tpg-container-" . $rand;
|
45 |
global $rtTPG;
|
@@ -111,10 +114,10 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
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 |
}
|
@@ -217,13 +220,13 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
217 |
$arg['class'] .= ' isotope-item';
|
218 |
}
|
219 |
|
220 |
-
$arg['overlay']
|
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;
|
228 |
if ( $isIsotope ) {
|
229 |
$extClass = ' tpg-isotope';
|
@@ -339,7 +342,8 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
|
|
339 |
return $html;
|
340 |
}
|
341 |
|
342 |
-
private function layoutStyle( $layout, $scMeta )
|
|
|
343 |
$css = null;
|
344 |
$css .= "<style type='text/css' media='all'>";
|
345 |
// Variable
|
6 |
|
7 |
private $scA = array();
|
8 |
|
9 |
+
function __construct()
|
10 |
+
{
|
11 |
add_shortcode( 'the-post-grid', array( $this, 'the_post_grid_short_code' ) );
|
12 |
}
|
13 |
|
14 |
+
function register_sc_scripts()
|
15 |
+
{
|
16 |
global $rtTPG;
|
17 |
$iso = false;
|
18 |
|
41 |
}
|
42 |
}
|
43 |
|
44 |
+
function the_post_grid_short_code( $atts, $content = null )
|
45 |
+
{
|
46 |
$rand = mt_rand();
|
47 |
$layoutID = "rt-tpg-container-" . $rand;
|
48 |
global $rtTPG;
|
114 |
}
|
115 |
// Set 'posts_per_page' parameter
|
116 |
$args['posts_per_page'] = $posts_per_page;
|
117 |
+
if ( get_query_var( 'paged' ) ) {
|
118 |
+
$paged = get_query_var( 'paged' );
|
119 |
+
} elseif ( get_query_var( 'page' ) ) {
|
120 |
+
$paged = get_query_var( 'page' );
|
121 |
} else {
|
122 |
$paged = 1;
|
123 |
}
|
220 |
$arg['class'] .= ' isotope-item';
|
221 |
}
|
222 |
|
223 |
+
$arg['overlay'] = empty( $scMeta['tpg_overlay'][0] ) ? false : true;
|
224 |
+
$parentClass = ( ! empty( $scMeta['parent_class'][0] ) ? trim( $scMeta['parent_class'][0] ) : null );
|
225 |
$arg['items'] = isset( $scMeta['item_fields'] ) ? ( $scMeta['item_fields'] ? $scMeta['item_fields'] : array() ) : array();
|
226 |
$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';
|
227 |
$postQuery = new WP_Query( $args );
|
228 |
// Start layout
|
229 |
+
$html .= "<div class='container-fluid rt-tpg-container {$parentClass}' id='{$layoutID}'>";
|
230 |
$extClass = null;
|
231 |
if ( $isIsotope ) {
|
232 |
$extClass = ' tpg-isotope';
|
342 |
return $html;
|
343 |
}
|
344 |
|
345 |
+
private function layoutStyle( $layout, $scMeta )
|
346 |
+
{
|
347 |
$css = null;
|
348 |
$css .= "<style type='text/css' media='all'>";
|
349 |
// Variable
|
lib/views/layouts/isotope1.php
CHANGED
@@ -48,6 +48,9 @@ $html .= "<div class='{$grid} {$class} {$isoFilter}'>";
|
|
48 |
if(in_array('excerpt', $items) && $excerpt){
|
49 |
$html .= "<div class='entry-content'><p>{$excerpt}</p></div>";
|
50 |
}
|
|
|
|
|
|
|
51 |
$html .= '</div>';
|
52 |
$html .= '</div>';
|
53 |
$html .='</div>';
|
48 |
if(in_array('excerpt', $items) && $excerpt){
|
49 |
$html .= "<div class='entry-content'><p>{$excerpt}</p></div>";
|
50 |
}
|
51 |
+
if(in_array('read_more', $items)){
|
52 |
+
$html .= "<div class='read-more'><a href='{$pLink}'>{$read_more_text}</a></div>";
|
53 |
+
}
|
54 |
$html .= '</div>';
|
55 |
$html .= '</div>';
|
56 |
$html .='</div>';
|
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.5
|
8 |
* Text Domain: the-post-grid
|
9 |
* Domain Path: /languages
|
10 |
* Author URI: https://radiustheme.com/
|