The Post Grid - Version 2.2.73

Version Description

  • Fix Excerpt issue
Download this release

Release Info

Developer techlabpro1
Plugin Icon 128x128 The Post Grid
Version 2.2.73
Comparing to
See all releases

Code changes from version 2.2.72 to 2.2.73

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: techlabpro1
3
  Donate link:
4
  Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
5
  Requires at least: 4.5
6
- Tested up to: 5.1
7
- Stable tag: 2.2.72
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -138,6 +138,9 @@ For any bug or suggestion please mail support@radiustheme.com
138
 
139
  == Changelog ==
140
 
 
 
 
141
  = 2.2.72 =
142
  * Fix php error
143
 
3
  Donate link:
4
  Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
5
  Requires at least: 4.5
6
+ Tested up to: 5.2
7
+ Stable tag: 2.2.73
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
138
 
139
  == Changelog ==
140
 
141
+ = 2.2.73 =
142
+ * Fix Excerpt issue
143
+
144
  = 2.2.72 =
145
  * Fix php error
146
 
assets/css/thepostgrid.css CHANGED
@@ -65,6 +65,9 @@
65
  /**********************************************************************/
66
  /********************************* End Grid *************************/
67
  /**********************************************************************/
 
 
 
68
 
69
  .rt-detail .post-meta:after {
70
  clear: both;
65
  /**********************************************************************/
66
  /********************************* End Grid *************************/
67
  /**********************************************************************/
68
+ .rt-tpg-container .rt-detail .entry-title a {
69
+ text-decoration: none;
70
+ }
71
 
72
  .rt-detail .post-meta:after {
73
  clear: both;
languages/the-post-grid.pot CHANGED
@@ -1,278 +1,222 @@
1
- #, fuzzy
 
2
  msgid ""
3
  msgstr ""
4
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: The Post Grid\n"
6
- "POT-Creation-Date: 2017-01-05 16:56+0600\n"
7
- "PO-Revision-Date: 2017-01-05 16:55+0600\n"
8
- "Last-Translator: \n"
9
- "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.5\n"
14
  "X-Poedit-Basepath: ..\n"
15
- "X-Poedit-WPHeader: the-post-grid.php\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
- "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
 
 
22
 
23
- #: lib/classes/rtTPGAjaxResponse.php:27
24
  msgid "Settings successfully updated"
25
  msgstr ""
26
 
27
- #: lib/classes/rtTPGAjaxResponse.php:32
28
  msgid "Security Error !!"
29
  msgstr ""
30
 
31
- #: lib/classes/rtTPGAjaxResponse.php:58
32
  msgid "<div class=\"field-holder\">No Taxonomy found</div>"
33
  msgstr ""
34
 
35
- #: lib/classes/rtTPGAjaxResponse.php:62 lib/classes/rtTPGAjaxResponse.php:81
36
- #: lib/classes/rtTPGAjaxResponse.php:120
37
  msgid "Security error"
38
  msgstr ""
39
 
40
- #: lib/classes/rtTPGAjaxResponse.php:134
41
  msgid "Select Short code"
42
  msgstr ""
43
 
44
- #: lib/classes/rtTPGAjaxResponse.php:136
45
  msgid "Default"
46
  msgstr ""
47
 
48
- #: lib/classes/rtTPGAjaxResponse.php:145
49
  msgid "No shortCode found."
50
  msgstr ""
51
 
52
- #. Plugin Name of the plugin/theme
53
- #: lib/classes/rtTPGInit.php:21 lib/classes/rtTPGInit.php:22
54
  msgid "The Post Grid"
55
  msgstr ""
56
 
57
- #: lib/classes/rtTPGInit.php:23
58
  msgid "Add New Grid"
59
  msgstr ""
60
 
61
- #: lib/classes/rtTPGInit.php:24
62
  msgid "All Grids"
63
  msgstr ""
64
 
65
- #: lib/classes/rtTPGInit.php:25
66
  msgid "Add New Post Grid"
67
  msgstr ""
68
 
69
- #: lib/classes/rtTPGInit.php:26
70
  msgid "Edit Post Grid"
71
  msgstr ""
72
 
73
- #: lib/classes/rtTPGInit.php:27
74
  msgid "New Post Grid"
75
  msgstr ""
76
 
77
- #: lib/classes/rtTPGInit.php:28
78
  msgid "View Post Grid"
79
  msgstr ""
80
 
81
- #: lib/classes/rtTPGInit.php:29
82
  msgid "Search Post Grids"
83
  msgstr ""
84
 
85
- #: lib/classes/rtTPGInit.php:30
86
  msgid "No Post Grids found"
87
  msgstr ""
88
 
89
- #: lib/classes/rtTPGInit.php:31
90
  msgid "No Post Grids found in Trash"
91
  msgstr ""
92
 
93
- #: lib/classes/rtTPGInit.php:143
94
  msgid "Settings"
95
  msgstr ""
96
 
97
- #: lib/classes/rtTPGInit.php:156 lib/classes/rtTPGInit.php:159
98
- msgid "Field group updated."
99
- msgstr ""
100
-
101
- #: lib/classes/rtTPGInit.php:157
102
- msgid "Custom field updated."
103
- msgstr ""
104
-
105
- #: lib/classes/rtTPGInit.php:158
106
- msgid "Custom field deleted."
107
- msgstr ""
108
-
109
- #: lib/classes/rtTPGInit.php:161
110
- #, php-format
111
- msgid "Field group restored to revision from %s"
112
- msgstr ""
113
-
114
- #: lib/classes/rtTPGInit.php:162
115
- msgid "Field group published."
116
- msgstr ""
117
-
118
- #: lib/classes/rtTPGInit.php:163
119
- msgid "Field group saved."
120
- msgstr ""
121
-
122
- #: lib/classes/rtTPGInit.php:164
123
- msgid "Field group submitted."
124
  msgstr ""
125
 
126
- #: lib/classes/rtTPGInit.php:165
127
- msgid "Field group scheduled for."
128
  msgstr ""
129
 
130
- #: lib/classes/rtTPGInit.php:166
131
- msgid "Field group draft updated."
132
  msgstr ""
133
 
134
- #: lib/classes/rtTPGMeta.php:26
135
- msgid "Shortcode"
136
  msgstr ""
137
 
138
- #: lib/classes/rtTPGMeta.php:76
139
- msgid "Short Code Generator"
140
  msgstr ""
141
 
142
- #: lib/classes/rtTPGMeta.php:108
143
- msgid "Post Source"
144
  msgstr ""
145
 
146
- #: lib/classes/rtTPGMeta.php:109
147
- msgid "Layout Settings"
148
  msgstr ""
149
 
150
- #: lib/classes/rtTPGMeta.php:110
151
- msgid "Field Selection"
152
  msgstr ""
153
 
154
- #: lib/classes/rtTPGMeta.php:111
155
- msgid "Style"
156
- msgstr ""
157
-
158
- #: lib/classes/rtTPGOptions.php:73
159
  msgid "List of post IDs to show (comma-separated values, for example: 1,2,3)"
160
  msgstr ""
161
 
162
- #: lib/classes/rtTPGOptions.php:80
163
  msgid "List of post IDs to hide (comma-separated values, for example: 1,2,3)"
164
  msgstr ""
165
 
166
- #: lib/classes/rtTPGOptions.php:87
167
  msgid "The number of posts to show. Set empty to show all found posts."
168
  msgstr ""
169
 
170
- #: lib/classes/rtTPGOptions.php:178
171
- msgid ""
172
- "If value of Limit setting is not blank (empty), this value should be smaller "
173
- "than Limit value."
174
  msgstr ""
175
 
176
- #: lib/classes/rtTPGOptions.php:202
177
- msgid ""
178
- "Excerpt limit only integer number is allowed, Leave it blank for full "
179
- "excerpt. Note: This will remove all html tag"
180
  msgstr ""
181
 
182
- #: lib/classes/rtTPGOptions.php:265
 
 
 
 
183
  msgid "Feature Image"
184
  msgstr ""
185
 
186
- #: lib/classes/rtTPGOptions.php:266
187
  msgid "First Image from content"
188
  msgstr ""
189
 
190
- #: lib/classes/rtTPGOptions.php:289
191
  msgid "Title"
192
  msgstr ""
193
 
194
- #: lib/classes/rtTPGOptions.php:290
195
  msgid "Excerpt"
196
  msgstr ""
197
 
198
- #: lib/classes/rtTPGOptions.php:291 lib/views/layouts/layout1.php:53
199
  msgid "Read More"
200
  msgstr ""
201
 
202
- #: lib/classes/rtTPGOptions.php:292
203
  msgid "Post Date"
204
  msgstr ""
205
 
206
- #: lib/classes/rtTPGOptions.php:293
207
  msgid "Author"
208
  msgstr ""
209
 
210
- #: lib/classes/rtTPGOptions.php:294
211
  msgid "Categories"
212
  msgstr ""
213
 
214
- #: lib/classes/rtTPGOptions.php:295
215
  msgid "Tags"
216
  msgstr ""
217
 
218
- #: lib/classes/rtTPGOptions.php:296
219
  msgid "Comment Count"
220
  msgstr ""
221
 
222
- #: lib/classes/rtTPGShortCode.php:242
223
  msgid "Show all"
224
  msgstr ""
225
 
226
- #: lib/classes/rtTPGShortCode.php:305
227
  msgid "No post found"
228
  msgstr ""
229
 
230
- #: lib/views/layouts/layout2.php:48 lib/views/layouts/layout3.php:44
231
- msgid "Read More .."
232
- msgstr ""
233
-
234
- #: lib/views/settings/settings.php:8
235
- msgid "The Post Grid Settings"
236
- msgstr ""
237
-
238
- #: lib/views/settings/settings.php:9
239
- msgid "General settings"
240
- msgstr ""
241
-
242
- #: lib/views/settings/settings.php:10 lib/views/settings/settings.php:56
243
- msgid "Documentation"
244
  msgstr ""
245
 
246
- #: lib/views/settings/settings.php:52
247
- msgid "Short Code"
248
  msgstr ""
249
 
250
- #: lib/views/settings/settings.php:54
251
- msgid "id = short code id (1,2,3,4)"
252
  msgstr ""
253
 
254
- #: lib/views/settings/settings.php:55
255
- msgid "title = Shot code title (Not recommended)"
256
  msgstr ""
257
 
258
- #: lib/views/settings/settings.php:56
259
- msgid "Demo"
260
  msgstr ""
261
 
262
- #. Plugin URI of the plugin/theme
263
- msgid "http://demo.radiustheme.com/wordpress/plugins/the-post-grid/"
264
- msgstr ""
265
-
266
- #. Description of the plugin/theme
267
- msgid ""
268
- "Fast & Easy way to display WordPress post in Grid, List & Isotope view "
269
- "( filter by category, tag, author..) without a single line of coding."
270
  msgstr ""
271
 
272
- #. Author of the plugin/theme
273
- msgid "RadiusTheme"
274
  msgstr ""
275
 
276
- #. Author URI of the plugin/theme
277
- msgid "https://radiustheme.com/"
278
  msgstr ""
1
+ # Copyright (C) 2019 The Post Grid
2
+ # This file is distributed under the same license as the The Post Grid package.
3
  msgid ""
4
  msgstr ""
 
5
  "Project-Id-Version: The Post Grid\n"
 
 
 
 
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
 
9
  "X-Poedit-Basepath: ..\n"
10
+ "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
 
 
 
 
11
  "X-Poedit-SearchPath-0: .\n"
12
  "X-Poedit-SearchPathExcluded-0: *.js\n"
13
+ "X-Poedit-SourceCharset: UTF-8\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
 
16
+ #: ../lib/classes/rtTPGAjaxResponse.php:26
17
  msgid "Settings successfully updated"
18
  msgstr ""
19
 
20
+ #: ../lib/classes/rtTPGAjaxResponse.php:28
21
  msgid "Security Error !!"
22
  msgstr ""
23
 
24
+ #: ../lib/classes/rtTPGAjaxResponse.php:56
25
  msgid "<div class=\"field-holder\">No Taxonomy found</div>"
26
  msgstr ""
27
 
28
+ #: ../lib/classes/rtTPGAjaxResponse.php:60, ../lib/classes/rtTPGAjaxResponse.php:79, ../lib/classes/rtTPGAjaxResponse.php:118
 
29
  msgid "Security error"
30
  msgstr ""
31
 
32
+ #: ../lib/classes/rtTPGAjaxResponse.php:137
33
  msgid "Select Short code"
34
  msgstr ""
35
 
36
+ #: ../lib/classes/rtTPGAjaxResponse.php:139
37
  msgid "Default"
38
  msgstr ""
39
 
40
+ #: ../lib/classes/rtTPGAjaxResponse.php:148
41
  msgid "No shortCode found."
42
  msgstr ""
43
 
44
+ #: ../lib/classes/rtTPGInit.php:23, ../lib/classes/rtTPGInit.php:24, ../lib/vendor/RtElementorWidget.php:10, ../lib/vendor/RtElementorWidget.php:26, ../lib/widgets/RT_TPGWidget.php:15
 
45
  msgid "The Post Grid"
46
  msgstr ""
47
 
48
+ #: ../lib/classes/rtTPGInit.php:25
49
  msgid "Add New Grid"
50
  msgstr ""
51
 
52
+ #: ../lib/classes/rtTPGInit.php:26
53
  msgid "All Grids"
54
  msgstr ""
55
 
56
+ #: ../lib/classes/rtTPGInit.php:27
57
  msgid "Add New Post Grid"
58
  msgstr ""
59
 
60
+ #: ../lib/classes/rtTPGInit.php:28
61
  msgid "Edit Post Grid"
62
  msgstr ""
63
 
64
+ #: ../lib/classes/rtTPGInit.php:29
65
  msgid "New Post Grid"
66
  msgstr ""
67
 
68
+ #: ../lib/classes/rtTPGInit.php:30
69
  msgid "View Post Grid"
70
  msgstr ""
71
 
72
+ #: ../lib/classes/rtTPGInit.php:31
73
  msgid "Search Post Grids"
74
  msgstr ""
75
 
76
+ #: ../lib/classes/rtTPGInit.php:32
77
  msgid "No Post Grids found"
78
  msgstr ""
79
 
80
+ #: ../lib/classes/rtTPGInit.php:33
81
  msgid "No Post Grids found in Trash"
82
  msgstr ""
83
 
84
+ #: ../lib/classes/rtTPGInit.php:120, ../lib/classes/rtTPGInit.php:120
85
  msgid "Settings"
86
  msgstr ""
87
 
88
+ #: ../lib/classes/rtTPGMeta.php:27
89
+ msgid "Shortcode"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  msgstr ""
91
 
92
+ #: ../lib/classes/rtTPGMeta.php:115
93
+ msgid "Post Source"
94
  msgstr ""
95
 
96
+ #: ../lib/classes/rtTPGMeta.php:116
97
+ msgid "Layout Settings"
98
  msgstr ""
99
 
100
+ #: ../lib/classes/rtTPGMeta.php:117
101
+ msgid "Field Selection"
102
  msgstr ""
103
 
104
+ #: ../lib/classes/rtTPGMeta.php:118
105
+ msgid "Style"
106
  msgstr ""
107
 
108
+ #: ../lib/classes/rtTPGOptions.php:68
109
+ msgid "Script before item load"
110
  msgstr ""
111
 
112
+ #: ../lib/classes/rtTPGOptions.php:76
113
+ msgid "Script After item load"
114
  msgstr ""
115
 
116
+ #: ../lib/classes/rtTPGOptions.php:84
117
+ msgid "After Loaded Script"
118
  msgstr ""
119
 
120
+ #: ../lib/classes/rtTPGOptions.php:100
 
 
 
 
121
  msgid "List of post IDs to show (comma-separated values, for example: 1,2,3)"
122
  msgstr ""
123
 
124
+ #: ../lib/classes/rtTPGOptions.php:108
125
  msgid "List of post IDs to hide (comma-separated values, for example: 1,2,3)"
126
  msgstr ""
127
 
128
+ #: ../lib/classes/rtTPGOptions.php:116
129
  msgid "The number of posts to show. Set empty to show all found posts."
130
  msgstr ""
131
 
132
+ #: ../lib/classes/rtTPGOptions.php:189
133
+ msgid "Image column"
 
 
134
  msgstr ""
135
 
136
+ #: ../lib/classes/rtTPGOptions.php:220
137
+ msgid "If value of Limit setting is not blank (empty), this value should be smaller than Limit value."
 
 
138
  msgstr ""
139
 
140
+ #: ../lib/classes/rtTPGOptions.php:263
141
+ msgid "Excerpt limit only integer number is allowed, Leave it blank for full excerpt. Note: This will remove all html tag"
142
+ msgstr ""
143
+
144
+ #: ../lib/classes/rtTPGOptions.php:385
145
  msgid "Feature Image"
146
  msgstr ""
147
 
148
+ #: ../lib/classes/rtTPGOptions.php:386
149
  msgid "First Image from content"
150
  msgstr ""
151
 
152
+ #: ../lib/classes/rtTPGOptions.php:414
153
  msgid "Title"
154
  msgstr ""
155
 
156
+ #: ../lib/classes/rtTPGOptions.php:415
157
  msgid "Excerpt"
158
  msgstr ""
159
 
160
+ #: ../lib/classes/rtTPGOptions.php:416, ../lib/classes/rtTPGShortCode.php:69
161
  msgid "Read More"
162
  msgstr ""
163
 
164
+ #: ../lib/classes/rtTPGOptions.php:417
165
  msgid "Post Date"
166
  msgstr ""
167
 
168
+ #: ../lib/classes/rtTPGOptions.php:418
169
  msgid "Author"
170
  msgstr ""
171
 
172
+ #: ../lib/classes/rtTPGOptions.php:419
173
  msgid "Categories"
174
  msgstr ""
175
 
176
+ #: ../lib/classes/rtTPGOptions.php:420
177
  msgid "Tags"
178
  msgstr ""
179
 
180
+ #: ../lib/classes/rtTPGOptions.php:421
181
  msgid "Comment Count"
182
  msgstr ""
183
 
184
+ #: ../lib/classes/rtTPGShortCode.php:245
185
  msgid "Show all"
186
  msgstr ""
187
 
188
+ #: ../lib/classes/rtTPGShortCode.php:304
189
  msgid "No post found"
190
  msgstr ""
191
 
192
+ #: ../lib/classes/rtTPGShortCode.php:329
193
+ msgid "No shortCode found"
 
 
 
 
 
 
 
 
 
 
 
 
194
  msgstr ""
195
 
196
+ #: ../lib/vendor/RtElementorWidget.php:36
197
+ msgid "Post Grid"
198
  msgstr ""
199
 
200
+ #: ../lib/widgets/RT_TPGWidget.php:14
201
+ msgid "Display the post grid."
202
  msgstr ""
203
 
204
+ #: ../lib/widgets/RT_TPGWidget.php:46
205
+ msgid "Title:"
206
  msgstr ""
207
 
208
+ #: ../lib/widgets/RT_TPGWidget.php:52
209
+ msgid "Select post grid"
210
  msgstr ""
211
 
212
+ #: ../lib/views/settings/settings.php:8
213
+ msgid "The Post Grid Settings"
 
 
 
 
 
 
214
  msgstr ""
215
 
216
+ #: ../lib/views/settings/settings.php:9
217
+ msgid "General settings"
218
  msgstr ""
219
 
220
+ #: ../lib/views/settings/settings.php:12
221
+ msgid "Documentation"
222
  msgstr ""
lib/classes/rtTPGHelper.php CHANGED
@@ -84,7 +84,7 @@ if ( ! class_exists( 'rtTPGHelper' ) ):
84
 
85
  function rt_get_users() {
86
  $users = array();
87
- $u = get_users(apply_filters( 'tpg_author_arg', array() ));
88
  if ( ! empty( $u ) ) {
89
  foreach ( $u as $user ) {
90
  $users[ $user->ID ] = $user->display_name;
@@ -200,34 +200,49 @@ if ( ! class_exists( 'rtTPGHelper' ) ):
200
  return $imgSrc;
201
  }
202
 
203
- function strip_tags_content( $excerpt, $type = "character", $limit = 0, $more = null ) {
204
- $type = ( $type == "character" || $type == "word" ? $type : "character" );
205
- /* $excerpt = preg_replace( '@<(\w+)\b.*?>.*?</\1>@si', '', $excerpt );*/
206
- $excerpt = preg_replace( '`\[[^\]]*\]`', '', $excerpt );
207
- $excerpt = strip_shortcodes( $excerpt );
208
- $excerpt = preg_replace( '`[[^]]*]`', '', $excerpt );
209
- $excerpt = str_replace( '…', '', $excerpt );
210
- // $excerpt = preg_replace( " ([.*?])", '', $excerpt );
211
- $oldExcerpt = $excerpt;
212
- if ( $type == "word" ) {
213
- $limit = $limit + 1;
214
- $excerpt = explode( ' ', $excerpt, $limit );
215
- if ( count( $excerpt ) >= $limit ) {
216
- array_pop( $excerpt );
217
- $excerpt = implode( " ", $excerpt );
218
- $excerpt = ( $more ? $excerpt . " " . $more : $excerpt );
 
 
 
 
 
219
  } else {
220
- $excerpt = $oldExcerpt;
 
 
 
221
  }
222
  } else {
223
- if ( $limit > 0 && strlen( $excerpt ) > $limit ) {
224
- $excerpt = substr( $excerpt, 0, $limit );
225
- $excerpt = substr( $excerpt, 0, strripos( $excerpt, " " ) );
226
- $excerpt = ( $more ? $excerpt . " " . $more : $excerpt );
227
- }
 
 
 
 
 
228
  }
 
 
229
 
230
- return $excerpt;
231
  }
232
 
233
 
@@ -237,10 +252,10 @@ if ( ! class_exists( 'rtTPGHelper' ) ):
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
  }
84
 
85
  function rt_get_users() {
86
  $users = array();
87
+ $u = get_users( apply_filters( 'tpg_author_arg', array() ) );
88
  if ( ! empty( $u ) ) {
89
  foreach ( $u as $user ) {
90
  $users[ $user->ID ] = $user->display_name;
200
  return $imgSrc;
201
  }
202
 
203
+ function get_the_excerpt( $post_id, $data = array() ) {
204
+ $limit = isset( $data['excerpt_limit'] ) ? abs( $data['excerpt_limit'] ) : 0;
205
+ $defaultExcerpt = get_the_excerpt( $post_id );
206
+ $type = $data['excerpt_type'];
207
+ $more = $data['excerpt_more_text'];
208
+ $excerpt = preg_replace( '`\[[^\]]*\]`', '', $defaultExcerpt );
209
+ $excerpt = strip_shortcodes( $excerpt );
210
+ $excerpt = preg_replace( '`[[^]]*]`', '', $excerpt );
211
+ $excerpt = str_replace( '…', '', $excerpt );
212
+ if ( $limit ) {
213
+ $excerpt = wp_filter_nohtml_kses( $excerpt );
214
+ if ( $type == "word" ) {
215
+ $limit = $limit + 1;
216
+ $rawExcerpt = $excerpt;
217
+ $excerpt = explode( ' ', $excerpt, $limit );
218
+ if ( count( $excerpt ) >= $limit ) {
219
+ array_pop( $excerpt );
220
+ $excerpt = implode( " ", $excerpt );
221
+ } else {
222
+ $excerpt = $rawExcerpt;
223
+ }
224
  } else {
225
+ if ( $limit > 0 && strlen( $excerpt ) > $limit ) {
226
+ $excerpt = mb_substr( $excerpt, 0, $limit , "utf-8");
227
+ $excerpt = preg_replace( '/\W\w+\s*(\W*)$/', '$1', $excerpt );
228
+ }
229
  }
230
  } else {
231
+ $allowed_html = array(
232
+ 'a' => array(
233
+ 'href' => array(),
234
+ 'title' => array()
235
+ ),
236
+ 'strong' => array(),
237
+ 'b' => array(),
238
+ 'br' => array( array() ),
239
+ );
240
+ $excerpt = nl2br( wp_kses( $excerpt, $allowed_html ) );
241
  }
242
+ $excerpt = ($more ? $excerpt . " " . $more : $excerpt);
243
+
244
 
245
+ return apply_filters( 'tpg_get_the_excerpt', $excerpt, $post_id, $data, $defaultExcerpt );
246
  }
247
 
248
 
252
  $showitems = ( $range * 2 ) + 1;
253
  global $paged;
254
  if ( empty( $paged ) ) {
255
+ if ( get_query_var( 'paged' ) ) {
256
+ $paged = get_query_var( 'paged' );
257
+ } elseif ( get_query_var( 'page' ) ) {
258
+ $paged = get_query_var( 'page' );
259
  } else {
260
  $paged = 1;
261
  }
lib/classes/rtTPGShortCode.php CHANGED
@@ -6,13 +6,11 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
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,8 +39,7 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
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;
@@ -63,15 +60,14 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
63
  if ( ! in_array( $col, array_keys( $rtTPG->rtTPGColumns() ) ) ) {
64
  $col = 4;
65
  }
66
- $fImg = ( isset( $scMeta['featured_image'][0] ) ? true : false );
67
- $fImgSize = ( isset( $scMeta['featured_image_size'][0] ) ? $scMeta['featured_image_size'][0] : "medium" );
68
- $mediaSource = ( isset( $scMeta['media_source'][0] ) ? $scMeta['media_source'][0] : "feature_image" );
69
- $excerpt_type = ( isset( $scMeta['tgp_excerpt_type'][0] ) ? $scMeta['tgp_excerpt_type'][0] : 'character' );
70
- $excerpt_limit = ( isset( $scMeta['excerpt_limit'][0] ) ? absint( $scMeta['excerpt_limit'][0] ) : 0 );
71
- $excerpt_more_text = ( isset( $scMeta['tgp_excerpt_more_text'][0] ) ? $scMeta['tgp_excerpt_more_text'][0] : null );
72
- $read_more_text = ( ! empty( $scMeta['tgp_read_more_text'][0] ) ? $scMeta['tgp_read_more_text'][0] : __( 'Read More',
73
  'the-post-grid' ) );
74
- $arg['read_more_text'] = $read_more_text;
75
 
76
 
77
  $isIsotope = preg_match( '/isotope/', $layout );
@@ -267,13 +263,7 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
267
  $arg['author'] = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author() . '</a>';
268
  $cc = wp_count_comments( $pID );
269
  $arg['date'] = get_the_date();
270
- $arg['excerpt'] = get_the_excerpt();
271
- if ( $excerpt_limit ) {
272
- $arg['excerpt'] = $rtTPG->strip_tags_content( $arg['excerpt'], $excerpt_type,
273
- $excerpt_limit,
274
- $excerpt_more_text );
275
- }
276
-
277
  $arg['categories'] = get_the_term_list( $pID, 'category', null, ', ' );
278
  $arg['tags'] = get_the_term_list( $pID, 'post_tag', null, ', ' );
279
  if ( $isIsotope ) {
@@ -342,8 +332,7 @@ if ( ! class_exists( 'rtTPGShortCode' ) ):
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
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
  }
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;
60
  if ( ! in_array( $col, array_keys( $rtTPG->rtTPGColumns() ) ) ) {
61
  $col = 4;
62
  }
63
+ $fImg = ( isset( $scMeta['featured_image'][0] ) ? true : false );
64
+ $fImgSize = ( isset( $scMeta['featured_image_size'][0] ) ? $scMeta['featured_image_size'][0] : "medium" );
65
+ $mediaSource = ( isset( $scMeta['media_source'][0] ) ? $scMeta['media_source'][0] : "feature_image" );
66
+ $arg['excerpt_type'] = ( isset( $scMeta['tgp_excerpt_type'][0] ) ? $scMeta['tgp_excerpt_type'][0] : 'character' );
67
+ $arg['excerpt_limit'] = ( isset( $scMeta['excerpt_limit'][0] ) ? absint( $scMeta['excerpt_limit'][0] ) : 0 );
68
+ $arg['excerpt_more_text'] = ( isset( $scMeta['tgp_excerpt_more_text'][0] ) ? $scMeta['tgp_excerpt_more_text'][0] : null );
69
+ $arg['read_more_text'] = ( ! empty( $scMeta['tgp_read_more_text'][0] ) ? $scMeta['tgp_read_more_text'][0] : __( 'Read More',
70
  'the-post-grid' ) );
 
71
 
72
 
73
  $isIsotope = preg_match( '/isotope/', $layout );
263
  $arg['author'] = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author() . '</a>';
264
  $cc = wp_count_comments( $pID );
265
  $arg['date'] = get_the_date();
266
+ $arg['excerpt'] = $rtTPG->get_the_excerpt($pID, $arg);
 
 
 
 
 
 
267
  $arg['categories'] = get_the_term_list( $pID, 'category', null, ', ' );
268
  $arg['tags'] = get_the_term_list( $pID, 'post_tag', null, ', ' );
269
  if ( $isIsotope ) {
332
  return $html;
333
  }
334
 
335
+ private function layoutStyle( $layout, $scMeta ) {
 
336
  $css = null;
337
  $css .= "<style type='text/css' media='all'>";
338
  // Variable
lib/views/layouts/layout1.php CHANGED
@@ -6,11 +6,7 @@ $html .= "<div class='{$grid} {$class}'>";
6
  if(!empty($imgSrc)) {
7
  $html .= '<div class="rt-img-holder">';
8
  if($overlay) {
9
- $html .= '<div class="overlay">';
10
- $html .= "<a class='view-details' href='{$pLink}'>
11
- <i class='fa fa-info'></i>
12
- </a>";
13
- $html .= '</div>';
14
  }
15
  $html .= "<a href='{$pLink}'><img class='img-responsive' src='{$imgSrc}' alt='{$title}'></a>";
16
  $html .= '</div> ';
@@ -44,7 +40,6 @@ $html .= "<div class='{$grid} {$class}'>";
44
  if(!empty($postMetaMid)){
45
  $html .= "<div class='post-meta-tags'>{$postMetaMid}</div>";
46
  }
47
- //$html .= "</hr>";
48
  if(in_array('excerpt', $items)){
49
  $html .= "<div class='post-content'>{$excerpt}</div>";
50
  }
@@ -57,7 +52,7 @@ $html .= "<div class='{$grid} {$class}'>";
57
  if(!empty($postMetaBottom)){
58
  $html .= "<div class='post-meta'>$postMetaBottom</div>";
59
  }
60
- $html .= '</div>';
61
  $html .= '</div>';
62
  $html .='</div>';
63
 
6
  if(!empty($imgSrc)) {
7
  $html .= '<div class="rt-img-holder">';
8
  if($overlay) {
9
+ $html .= sprintf('<div class="overlay"><a class="view-details" href="%s"><i class="fa fa-info"></i></a></div>', $pLink);
 
 
 
 
10
  }
11
  $html .= "<a href='{$pLink}'><img class='img-responsive' src='{$imgSrc}' alt='{$title}'></a>";
12
  $html .= '</div> ';
40
  if(!empty($postMetaMid)){
41
  $html .= "<div class='post-meta-tags'>{$postMetaMid}</div>";
42
  }
 
43
  if(in_array('excerpt', $items)){
44
  $html .= "<div class='post-content'>{$excerpt}</div>";
45
  }
52
  if(!empty($postMetaBottom)){
53
  $html .= "<div class='post-meta'>$postMetaBottom</div>";
54
  }
55
+ $html .= '</div>';
56
  $html .= '</div>';
57
  $html .='</div>';
58
 
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.72
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.73
8
  * Text Domain: the-post-grid
9
  * Domain Path: /languages
10
  * Author URI: https://radiustheme.com/