Version Description
- Fix: Undefined index errors when using the
the_advanced_excerpt()
function - Fix: Not excluding tags when using the
exclude_tags
argument in thethe_advanced_excerpt()
function
Download this release
Release Info
Developer | aprea |
Plugin | Advanced Excerpt |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 4.2 to 4.2.1
- advanced-excerpt.php +2 -2
- class/advanced-excerpt.php +2 -2
- functions/functions.php +9 -1
- readme.txt +5 -1
advanced-excerpt.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
Plugin Name: Advanced Excerpt
|
4 |
Plugin URI: http://wordpress.org/plugins/advanced-excerpt/
|
5 |
Description: Control the appearance of WordPress post excerpts
|
6 |
-
Version: 4.2
|
7 |
Author: Delicious Brains
|
8 |
Author URI: http://deliciousbrains.com/
|
9 |
*/
|
10 |
|
11 |
-
$GLOBALS['advanced_excerpt_version'] = '4.2';
|
12 |
|
13 |
function advanced_excerpt_load_textdomain() {
|
14 |
load_plugin_textdomain( 'advanced-excerpt', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
3 |
Plugin Name: Advanced Excerpt
|
4 |
Plugin URI: http://wordpress.org/plugins/advanced-excerpt/
|
5 |
Description: Control the appearance of WordPress post excerpts
|
6 |
+
Version: 4.2.1
|
7 |
Author: Delicious Brains
|
8 |
Author URI: http://deliciousbrains.com/
|
9 |
*/
|
10 |
|
11 |
+
$GLOBALS['advanced_excerpt_version'] = '4.2.1';
|
12 |
|
13 |
function advanced_excerpt_load_textdomain() {
|
14 |
load_plugin_textdomain( 'advanced-excerpt', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
class/advanced-excerpt.php
CHANGED
@@ -237,11 +237,11 @@ class Advanced_Excerpt {
|
|
237 |
$original_post_content = $text;
|
238 |
|
239 |
// Determine allowed tags
|
240 |
-
if (
|
241 |
$allowed_tags = $this->options_all_tags;
|
242 |
}
|
243 |
|
244 |
-
if (
|
245 |
$allowed_tags = array_diff( $allowed_tags, $exclude_tags );
|
246 |
}
|
247 |
|
237 |
$original_post_content = $text;
|
238 |
|
239 |
// Determine allowed tags
|
240 |
+
if ( empty( $allowed_tags ) ) {
|
241 |
$allowed_tags = $this->options_all_tags;
|
242 |
}
|
243 |
|
244 |
+
if ( ! empty( $exclude_tags ) ) {
|
245 |
$allowed_tags = array_diff( $allowed_tags, $exclude_tags );
|
246 |
}
|
247 |
|
functions/functions.php
CHANGED
@@ -50,8 +50,16 @@ function the_advanced_excerpt( $args = '', $get = false ) {
|
|
50 |
unset( $args['finish_sentence'] );
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
// Set temporary options
|
54 |
-
$advanced_excerpt->options = $args;
|
55 |
|
56 |
if ( $get ) {
|
57 |
return get_the_excerpt();
|
50 |
unset( $args['finish_sentence'] );
|
51 |
}
|
52 |
|
53 |
+
if ( ! empty( $args['allowed_tags'] ) || ! empty( $args['exclude_tags'] ) ) {
|
54 |
+
if ( isset( $args['allowed_tags'] ) && ! in_array( '_all', (array) $args['allowed_tags'] ) ) {
|
55 |
+
$args['allowed_tags_option'] = 'remove_all_tags_except';
|
56 |
+
} else if ( ! isset( $args['allowed_tags'] ) ) {
|
57 |
+
$args['allowed_tags_option'] = 'remove_all_tags_except';
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
// Set temporary options
|
62 |
+
$advanced_excerpt->options = wp_parse_args( $args, $advanced_excerpt->default_options );
|
63 |
|
64 |
if ( $get ) {
|
65 |
return get_the_excerpt();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: excerpt, post, content, formatting
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.9
|
7 |
-
Stable tag: 4.2
|
8 |
License: GPLv3
|
9 |
|
10 |
Control the appearance of WordPress post excerpts
|
@@ -96,6 +96,10 @@ However, you can [start The Loop manually](http://codex.wordpress.org/The_Loop#M
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
|
|
|
|
|
|
|
|
99 |
= 4.2 =
|
100 |
* Feature: Toggle excerpt filtering when there's no break (<!--more-->) tag in the post content
|
101 |
* Feature: Toggle excerpt filtering for the `the_excerpt()` and `the_content()` functions
|
4 |
Tags: excerpt, post, content, formatting
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.9
|
7 |
+
Stable tag: 4.2.1
|
8 |
License: GPLv3
|
9 |
|
10 |
Control the appearance of WordPress post excerpts
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 4.2.1 =
|
100 |
+
* Fix: Undefined index errors when using the `the_advanced_excerpt()` function
|
101 |
+
* Fix: Not excluding tags when using the `exclude_tags` argument in the `the_advanced_excerpt()` function
|
102 |
+
|
103 |
= 4.2 =
|
104 |
* Feature: Toggle excerpt filtering when there's no break (<!--more-->) tag in the post content
|
105 |
* Feature: Toggle excerpt filtering for the `the_excerpt()` and `the_content()` functions
|