Skip to content

Commit

Permalink
Added the advanced_excerpt_skip_excerpt_filtering filter allowing u…
Browse files Browse the repository at this point in the history
…sers to skip excerpt filtering on a per excerpt basis
  • Loading branch information
aprea committed Jun 6, 2014
1 parent 0f2dc4e commit b79b23d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions class/advanced-excerpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ function filter_excerpt( $content ) {
function filter( $content ) {
extract( wp_parse_args( $this->options, $this->default_options ), EXTR_SKIP );

if ( true === apply_filters( 'advanced_excerpt_skip_excerpt_filtering', false ) ) {
return $content;
}

global $post;
if ( $the_content_no_break && false !== strpos( $post->post_content, '<!--more-->' ) && 'content' == $this->filter_type ) {
return $content;
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ However, you can [start The Loop manually](http://codex.wordpress.org/The_Loop#M
* Fix: Call `remove_all_filter()` on the `the_excerpt` hook to improve excerpt rendering
* Fix: Only honor the "Only filter `the_content()` when there's no break (<!--more-->) tag in the post content" setting when hooking into `the_content` filter
* Improvement: Improve backwards compatibility by reverting back to using `get_the_content()` for the base excerpt text
* Improvement: Added the `advanced_excerpt_skip_excerpt_filtering` filter allowing users to skip excerpt filtering on a per excerpt basis

= 4.2.2 =
* Fix: The `the_advanced_excerpt()` function was not working on singular page types (pages / posts)
Expand Down

0 comments on commit b79b23d

Please sign in to comment.