Version Description
- Bug fixed: Read more button is invisible (color is white and no background color)
- Update: Able to set 0 as 'Excerpt length'
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.3.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.3 to 1.3.4
- README.txt +51 -42
- admin/assets/css/admin.css +1 -1
- admin/assets/js/admin.js +1 -1
- admin/includes/options.php +3 -2
- content-views.php +2 -2
- includes/functions.php +8 -2
- includes/hooks.php +0 -8
- includes/html.php +7 -3
README.txt
CHANGED
@@ -4,79 +4,80 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: post, posts, page, pages, query, queries, search, display, show, grid, layout, author, blog, categories, category, comment, content, custom, editor, filter, Formatting, image, list, meta, plugin, responsive, shortcode, excerpt, title, tag, term, Taxonomy, thumbnail, pagination, date, scrollable, slider, collapsible
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
It is easy as 1, 2, 3 to query
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
* display posts
|
20 |
-
*
|
|
|
|
|
|
|
21 |
* replace boring Next, Prev button of WordPress theme by a beautiful pagination
|
22 |
* display thumbnail in different size than 150x150 or 300x300
|
23 |
-
?
|
24 |
-
|
25 |
-
How do you do?
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
|
33 |
-
* Step 1 :
|
34 |
-
* Step 2 : Customize
|
35 |
-
* Step 3 : Save View
|
36 |
|
37 |
= A features list of Content Views plugin: =
|
38 |
|
39 |
-
|
|
|
40 |
|
41 |
* query single/multiple post(s)
|
42 |
-
* query posts by category, tag
|
43 |
-
* query posts by author
|
44 |
* query child pages of a parent page
|
45 |
* query posts by status (publish, draft, private...)
|
46 |
* query posts which contain a specific keyword
|
47 |
-
* sort posts by Id, Title, Created date, Modified date in
|
48 |
|
49 |
-
**in Step 2
|
50 |
|
51 |
-
* Select a responsive layout to display posts: Grid, List(Collapsible/Slider).
|
52 |
* Display fields (thumbnail, title, content, meta fields) in vertical direction. Or display thumbnail in left/right side of other fields
|
53 |
* Select what fields (thumbnail, title, content, meta fields) to display
|
54 |
* Select thumbnail sizes
|
55 |
-
* Display full content, or display
|
56 |
* Select what meta fields (date, author, terms [categories, tags], comment count) to display
|
57 |
* Enable/Disable pagination
|
58 |
* Open in new tab, current tab (when click on title, thumbnail of post)
|
59 |
|
60 |
|
61 |
-
=
|
62 |
|
63 |
-
*
|
64 |
-
*
|
65 |
-
*
|
66 |
-
* Display
|
67 |
* More beautiful output & powerful settings for Grid, List layout
|
68 |
-
* Drag & drop to change display order of fields (thumbnail, title, content, meta fields)
|
69 |
-
* Customize Font, Color settings
|
70 |
-
* Custom style
|
71 |
-
* Customize style & text of
|
72 |
-
*
|
73 |
* And much more...
|
74 |
|
75 |
-
|
76 |
|
77 |
Just give a try (30 day money back guarantee), then you will know how it is awesome :)
|
78 |
|
79 |
|
|
|
80 |
== Installation ==
|
81 |
|
82 |
= Using The WordPress Dashboard =
|
@@ -97,8 +98,8 @@ Just give a try (30 day money back guarantee), then you will know how it is awes
|
|
97 |
= Using FTP =
|
98 |
|
99 |
1. Download `content-views-query-and-display-post-page.zip`
|
100 |
-
2. Extract the `
|
101 |
-
3. Upload the `
|
102 |
4. Activate the plugin in the Plugin dashboard
|
103 |
|
104 |
|
@@ -129,19 +130,24 @@ You will be forwarded to editing page of View.
|
|
129 |
You can create Unlimited Views, in Unlimited websites
|
130 |
|
131 |
|
|
|
132 |
== Screenshots ==
|
133 |
|
134 |
1. Content Views plugin overview
|
135 |
-
2. Display Setting form to customize output of queried posts at
|
136 |
3. Query and display in Grid layout (Show Title, Thumbnail)
|
137 |
-
4. Query and display in Grid layout (Show Title, Thumbnail, Content
|
138 |
-
5. Query and display in Collapsible
|
139 |
-
6. Query and display in Slider
|
140 |
|
141 |
|
142 |
|
143 |
== Changelog ==
|
144 |
|
|
|
|
|
|
|
|
|
145 |
= 1.3.3 =
|
146 |
* Bug fixed: Return 'Empty settings' message for pagination request
|
147 |
|
@@ -252,7 +258,7 @@ You can create Unlimited Views, in Unlimited websites
|
|
252 |
|
253 |
= 1.1 =
|
254 |
* Add "Parent page" option to query child pages of a parent page
|
255 |
-
* Show shortcode [pt_view id="
|
256 |
* Add link to Thumbnail
|
257 |
* Update Settings page
|
258 |
* Fix import/export bugs
|
@@ -272,6 +278,9 @@ You can create Unlimited Views, in Unlimited websites
|
|
272 |
|
273 |
== Upgrade Notice ==
|
274 |
|
|
|
|
|
|
|
275 |
= 1.3.3 =
|
276 |
Bug fixed: Return 'Empty settings' message for pagination request
|
277 |
|
@@ -354,7 +363,7 @@ Fix offset bug
|
|
354 |
Fix pagination bug
|
355 |
|
356 |
= 1.1 =
|
357 |
-
Add "Parent page" option to query child pages of a parent page. Show shortcode [pt_view id="
|
358 |
|
359 |
= 1.0.2 =
|
360 |
Add some WP filters. Add main action for Pro plugin to trigger
|
4 |
Tags: post, posts, page, pages, query, queries, search, display, show, grid, layout, author, blog, categories, category, comment, content, custom, editor, filter, Formatting, image, list, meta, plugin, responsive, shortcode, excerpt, title, tag, term, Taxonomy, thumbnail, pagination, date, scrollable, slider, collapsible
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.3.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
It is easy as 1, 2, 3 to query posts by category, tag, author... and display posts on any Page in responsive Grid layout without coding!
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Do you want to display posts by category on WordPress homepage, in responsive grid layout?
|
16 |
|
17 |
+
Or:
|
18 |
+
|
19 |
+
* display posts in grid layout in a specific page
|
20 |
+
* display posts in grid layout in a widget of sidebar
|
21 |
+
* display posts by a specific tag
|
22 |
+
* display posts by an author
|
23 |
+
* display posts in descending order of Title
|
24 |
* replace boring Next, Prev button of WordPress theme by a beautiful pagination
|
25 |
* display thumbnail in different size than 150x150 or 300x300
|
|
|
|
|
|
|
26 |
|
27 |
+
With **Content Views** plugin, you can do above things in minutes, without any line of code!
|
28 |
|
29 |
+
With [Content Views Pro](http://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Get Content Views Pro"), you can do even more than you expect!
|
30 |
|
31 |
+
**Content Views** provides an intuitive form to query posts and display posts in **responsive** layouts (grid layout, slider/scrollable list, accordion/collapsible list) quickly & easily, in very 3 simple steps:
|
32 |
|
33 |
+
* Step 1 : Customize filters (category, tag, author, order...) to query your desired posts
|
34 |
+
* Step 2 : Customize output (select a layout from 3 responsive layout, show title/content/excerpt/pagination ? ...)
|
35 |
+
* Step 3 : Save View then paste the generated shortcode **[pt_view id="VIEW_ID"]** to editor of page/Text widget where you want to display your posts. If you are a developer, you can paste `<?php echo do_shortcode('[pt_view id="VIEW_ID"]'); ?>` to file in WordPress theme
|
36 |
|
37 |
= A features list of Content Views plugin: =
|
38 |
|
39 |
+
|
40 |
+
**in Step 1:**
|
41 |
|
42 |
* query single/multiple post(s)
|
43 |
+
* query posts by category, tag, author
|
|
|
44 |
* query child pages of a parent page
|
45 |
* query posts by status (publish, draft, private...)
|
46 |
* query posts which contain a specific keyword
|
47 |
+
* sort posts by Id, Title, Created date, Modified date in Ascending, Descending order
|
48 |
|
49 |
+
**in Step 2:**
|
50 |
|
51 |
+
* Select a responsive layout to display posts: Grid, List(Collapsible/Slider).
|
52 |
* Display fields (thumbnail, title, content, meta fields) in vertical direction. Or display thumbnail in left/right side of other fields
|
53 |
* Select what fields (thumbnail, title, content, meta fields) to display
|
54 |
* Select thumbnail sizes
|
55 |
+
* Display full content, or display excerpt with specific amount of words
|
56 |
* Select what meta fields (date, author, terms [categories, tags], comment count) to display
|
57 |
* Enable/Disable pagination
|
58 |
* Open in new tab, current tab (when click on title, thumbnail of post)
|
59 |
|
60 |
|
61 |
+
= Need more awesome features? =
|
62 |
|
63 |
+
* More amazing layouts: **Pinterest, Timeline**
|
64 |
+
* Completely **replace WordPress layout** in Category page, Author page, Search page... by Grid, Pinterest, Timeline layout
|
65 |
+
* Display **WooCommerce** product in beautiful output
|
66 |
+
* Display **Portfolio** with shuffle animation
|
67 |
* More beautiful output & powerful settings for Grid, List layout
|
68 |
+
* **Drag & drop** to change display order of fields (thumbnail, title, content, meta fields)
|
69 |
+
* Customize **Font, Color** settings of Title, Content, Meta fields
|
70 |
+
* Custom **style of Thumbnail**: round, circle, border
|
71 |
+
* Customize style & text of **Read more** button
|
72 |
+
* Ajax **Load more** pagination
|
73 |
* And much more...
|
74 |
|
75 |
+
Please check [Content Views Pro](http://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Get Content Views Pro")
|
76 |
|
77 |
Just give a try (30 day money back guarantee), then you will know how it is awesome :)
|
78 |
|
79 |
|
80 |
+
|
81 |
== Installation ==
|
82 |
|
83 |
= Using The WordPress Dashboard =
|
98 |
= Using FTP =
|
99 |
|
100 |
1. Download `content-views-query-and-display-post-page.zip`
|
101 |
+
2. Extract the `content-views-query-and-display-post-page` directory to your computer
|
102 |
+
3. Upload the `content-views-query-and-display-post-page` directory to the `/wp-content/plugins/` directory
|
103 |
4. Activate the plugin in the Plugin dashboard
|
104 |
|
105 |
|
130 |
You can create Unlimited Views, in Unlimited websites
|
131 |
|
132 |
|
133 |
+
|
134 |
== Screenshots ==
|
135 |
|
136 |
1. Content Views plugin overview
|
137 |
+
2. Display Setting form to customize output of queried posts at front-end
|
138 |
3. Query and display in Grid layout (Show Title, Thumbnail)
|
139 |
+
4. Query and display in Grid layout (Show Title, Thumbnail, Content) with Pagination
|
140 |
+
5. Query and display in Collapsible layout
|
141 |
+
6. Query and display in Slider layout
|
142 |
|
143 |
|
144 |
|
145 |
== Changelog ==
|
146 |
|
147 |
+
= 1.3.4 =
|
148 |
+
* Bug fixed: Read more button is invisible (color is white and no background color)
|
149 |
+
* Update: Able to set 0 as 'Excerpt length'
|
150 |
+
|
151 |
= 1.3.3 =
|
152 |
* Bug fixed: Return 'Empty settings' message for pagination request
|
153 |
|
258 |
|
259 |
= 1.1 =
|
260 |
* Add "Parent page" option to query child pages of a parent page
|
261 |
+
* Show shortcode [pt_view id="VIEW_ID"] to able to copy in editing page of a View
|
262 |
* Add link to Thumbnail
|
263 |
* Update Settings page
|
264 |
* Fix import/export bugs
|
278 |
|
279 |
== Upgrade Notice ==
|
280 |
|
281 |
+
= 1.3.4 =
|
282 |
+
Bug fixed: Read more button is invisible (color is white and no background color). Update: Able to set 0 as 'Excerpt length'
|
283 |
+
|
284 |
= 1.3.3 =
|
285 |
Bug fixed: Return 'Empty settings' message for pagination request
|
286 |
|
363 |
Fix pagination bug
|
364 |
|
365 |
= 1.1 =
|
366 |
+
Add "Parent page" option to query child pages of a parent page. Show shortcode [pt_view id="VIEW_ID"] to able to copy in editing page of a View. Add link to Thumbnail. Update Settings page. Fix import/export bugs. Classify "Add New View" vs "Edit View"
|
367 |
|
368 |
= 1.0.2 =
|
369 |
Add some WP filters. Add main action for Pro plugin to trigger
|
admin/assets/css/admin.css
CHANGED
@@ -172,7 +172,7 @@ html {
|
|
172 |
#pt-cv-show-preview {
|
173 |
position: fixed;
|
174 |
right: 20px;
|
175 |
-
bottom:
|
176 |
z-index: 1001;
|
177 |
}
|
178 |
|
172 |
#pt-cv-show-preview {
|
173 |
position: fixed;
|
174 |
right: 20px;
|
175 |
+
bottom: 120px;
|
176 |
z-index: 1001;
|
177 |
}
|
178 |
|
admin/assets/js/admin.js
CHANGED
@@ -550,7 +550,7 @@
|
|
550 |
$self.options.can_preview = 1;
|
551 |
};
|
552 |
// Bind on change input after page load
|
553 |
-
$('
|
554 |
_fn( is_trigger );
|
555 |
});
|
556 |
|
550 |
$self.options.can_preview = 1;
|
551 |
};
|
552 |
// Bind on change input after page load
|
553 |
+
$('.pt-wrap .tab-content').on('change', 'input, select, textarea', function (evt, is_trigger) {
|
554 |
_fn( is_trigger );
|
555 |
});
|
556 |
|
admin/includes/options.php
CHANGED
@@ -173,10 +173,11 @@ if ( ! class_exists( 'PT_Options_Framework' ) ) {
|
|
173 |
* Print HTML code of field type: input, select, textarea...
|
174 |
*
|
175 |
* @param array $param Array of parameters of a setting option
|
|
|
176 |
*
|
177 |
* @return string
|
178 |
*/
|
179 |
-
public static function field_type( $param, $data ) {
|
180 |
if ( ! $param || ! isset( $param['type'] ) ) {
|
181 |
return '';
|
182 |
}
|
@@ -186,7 +187,7 @@ if ( ! class_exists( 'PT_Options_Framework' ) ) {
|
|
186 |
$type = esc_attr( $param['type'] );
|
187 |
$name = ! empty( $param['name'] ) ? PT_CV_PREFIX . esc_attr( $param['name'] ) : '';
|
188 |
$id = ! empty( $param['id'] ) ? "id='" . PT_CV_PREFIX . esc_attr( $param['id'] ) . "'" : '';
|
189 |
-
$value = self::field_value( $data, $param, $name );
|
190 |
$description = isset( $param['desc'] ) ? balanceTags( $param['desc'] ) : '';
|
191 |
|
192 |
// Add extra information of option type
|
173 |
* Print HTML code of field type: input, select, textarea...
|
174 |
*
|
175 |
* @param array $param Array of parameters of a setting option
|
176 |
+
* @param array $data Array of stored data
|
177 |
*
|
178 |
* @return string
|
179 |
*/
|
180 |
+
public static function field_type( $param, $data, $value_ = NULL ) {
|
181 |
if ( ! $param || ! isset( $param['type'] ) ) {
|
182 |
return '';
|
183 |
}
|
187 |
$type = esc_attr( $param['type'] );
|
188 |
$name = ! empty( $param['name'] ) ? PT_CV_PREFIX . esc_attr( $param['name'] ) : '';
|
189 |
$id = ! empty( $param['id'] ) ? "id='" . PT_CV_PREFIX . esc_attr( $param['id'] ) . "'" : '';
|
190 |
+
$value = isset( $value_ ) ? $value_ : self::field_value( $data, $param, $name );
|
191 |
$description = isset( $param['desc'] ) ? balanceTags( $param['desc'] ) : '';
|
192 |
|
193 |
// Add extra information of option type
|
content-views.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Content Views
|
11 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
-
* Version: 1.3.
|
14 |
* Author: PT Guy
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views
|
@@ -27,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
27 |
/*
|
28 |
* Define Constant
|
29 |
*/
|
30 |
-
define( 'PT_CV_VERSION', '1.3.
|
31 |
define( 'PT_CV_FILE', __FILE__ );
|
32 |
$pt_cv_path = plugin_dir_path( __FILE__ );
|
33 |
include_once( $pt_cv_path . 'includes/defines.php' );
|
10 |
* Plugin Name: Content Views
|
11 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
+
* Version: 1.3.4
|
14 |
* Author: PT Guy
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views
|
27 |
/*
|
28 |
* Define Constant
|
29 |
*/
|
30 |
+
define( 'PT_CV_VERSION', '1.3.4' );
|
31 |
define( 'PT_CV_FILE', __FILE__ );
|
32 |
$pt_cv_path = plugin_dir_path( __FILE__ );
|
33 |
include_once( $pt_cv_path . 'includes/defines.php' );
|
includes/functions.php
CHANGED
@@ -238,13 +238,19 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
|
|
238 |
* Get value of some setting options by prefix
|
239 |
*
|
240 |
* @param string $prefix The prefix in name of setting options
|
|
|
241 |
*/
|
242 |
-
static function settings_values_by_prefix( $prefix ) {
|
243 |
global $pt_view_settings;
|
244 |
|
|
|
|
|
|
|
|
|
|
|
245 |
$result = array();
|
246 |
|
247 |
-
foreach ( $pt_view_settings as $name => $value ) {
|
248 |
// If name of setting match with prefix string, got it name
|
249 |
if ( substr( $name, 0, strlen( $prefix ) ) === $prefix ) {
|
250 |
$result[substr( $name, strlen( $prefix ) )] = $value;
|
238 |
* Get value of some setting options by prefix
|
239 |
*
|
240 |
* @param string $prefix The prefix in name of setting options
|
241 |
+
* @param bool $backend Get settings from Backend form
|
242 |
*/
|
243 |
+
static function settings_values_by_prefix( $prefix, $backend = FALSE ) {
|
244 |
global $pt_view_settings;
|
245 |
|
246 |
+
if ( ! $pt_view_settings && $backend ) {
|
247 |
+
global $pt_cv_admin_settings;
|
248 |
+
$pt_view_settings = $pt_cv_admin_settings;
|
249 |
+
}
|
250 |
+
|
251 |
$result = array();
|
252 |
|
253 |
+
foreach ( (array) $pt_view_settings as $name => $value ) {
|
254 |
// If name of setting match with prefix string, got it name
|
255 |
if ( substr( $name, 0, strlen( $prefix ) ) === $prefix ) {
|
256 |
$result[substr( $name, strlen( $prefix ) )] = $value;
|
includes/hooks.php
CHANGED
@@ -83,14 +83,6 @@ if ( ! class_exists( 'PT_CV_Hooks' ) ) {
|
|
83 |
$errors[] = $messages['field']['select'] . $messages['tab']['display'] . ' > ' . __( 'Fields settings', PT_CV_DOMAIN ) . ' > ' . __( 'Fields display', PT_CV_DOMAIN );
|
84 |
}
|
85 |
|
86 |
-
// Excerpt length
|
87 |
-
$fargs = isset( $dargs['field-settings'] ) ? $dargs['field-settings'] : array();
|
88 |
-
if ( isset( $fargs['content'] ) && $fargs['content']['show'] === 'excerpt' ) {
|
89 |
-
if ( empty( $fargs['content']['length'] ) ) {
|
90 |
-
$errors[] = $messages['field']['text'] . $messages['tab']['display'] . ' > ' . __( 'Fields settings', PT_CV_DOMAIN ) . ' > ' . __( 'Content settings', PT_CV_DOMAIN ) . __( 'Excerpt length', PT_CV_DOMAIN );
|
91 |
-
}
|
92 |
-
}
|
93 |
-
|
94 |
// Item per page
|
95 |
if ( isset( $dargs['pagination-settings'] ) ) {
|
96 |
if ( empty( $dargs['pagination-settings']['items-per-page'] ) ) {
|
83 |
$errors[] = $messages['field']['select'] . $messages['tab']['display'] . ' > ' . __( 'Fields settings', PT_CV_DOMAIN ) . ' > ' . __( 'Fields display', PT_CV_DOMAIN );
|
84 |
}
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
// Item per page
|
87 |
if ( isset( $dargs['pagination-settings'] ) ) {
|
88 |
if ( empty( $dargs['pagination-settings']['items-per-page'] ) ) {
|
includes/html.php
CHANGED
@@ -459,14 +459,18 @@ if ( ! class_exists( 'PT_CV_Html' ) ) {
|
|
459 |
$readmore_btn = ' ...';
|
460 |
if ( apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_enable', 1, $fargs['content'] ) ) {
|
461 |
$text = apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_text', __( 'Read More', PT_CV_DOMAIN ), $fargs['content'] );
|
462 |
-
$readmore = self::_field_href( $oargs, $post, $text, PT_CV_PREFIX . 'readmore btn' );
|
463 |
$readmore_btn .= '<br />' . $readmore;
|
464 |
}
|
465 |
|
466 |
-
$content
|
467 |
|
468 |
if ( empty( $content ) ) {
|
469 |
-
|
|
|
|
|
|
|
|
|
470 |
}
|
471 |
// Force balance tags
|
472 |
$content = force_balance_tags( strip_shortcodes( $content ) );
|
459 |
$readmore_btn = ' ...';
|
460 |
if ( apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_enable', 1, $fargs['content'] ) ) {
|
461 |
$text = apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_text', __( 'Read More', PT_CV_DOMAIN ), $fargs['content'] );
|
462 |
+
$readmore = self::_field_href( $oargs, $post, $text, PT_CV_PREFIX . 'readmore' . ' btn btn-success btn-sm' );
|
463 |
$readmore_btn .= '<br />' . $readmore;
|
464 |
}
|
465 |
|
466 |
+
$content = apply_filters( PT_CV_PREFIX_ . 'field_content_result', '', $fargs, $post );
|
467 |
|
468 |
if ( empty( $content ) ) {
|
469 |
+
if ( $length ) {
|
470 |
+
$content = wp_trim_words( get_the_content(), $length, $readmore_btn );
|
471 |
+
} else {
|
472 |
+
$content = isset( $readmore ) ? $readmore : '';
|
473 |
+
}
|
474 |
}
|
475 |
// Force balance tags
|
476 |
$content = force_balance_tags( strip_shortcodes( $content ) );
|