[wp-trac] [WordPress Trac] #52820: Possible logic error in wp_trim_excerpt()
WordPress Trac
noreply at wordpress.org
Fri Mar 26 14:09:07 UTC 2021
#52820: Possible logic error in wp_trim_excerpt()
--------------------------------------+------------------------------
Reporter: theMikeD | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by donmhico):
Hello @theMikeD. Thanks for the ticket. Yes, I believe you're correct.
`$raw_excerpt` passed to `wp_trim_excerpt` filter is empty if `$text` is
empty. In my PR above, I placed `$raw_excerpt = $text;` below the
`apply_filter( 'the_content' )` because I still believe that
`$raw_excerpt` should be processed by that filter. Others can chime in
their thoughts regarding this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52820#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list