[wp-trac] [WordPress Trac] #53604: Excerpts don't handle `innerBlocks` for groups and nested columns properly
WordPress Trac
noreply at wordpress.org
Thu Jul 8 17:27:43 UTC 2021
#53604: Excerpts don't handle `innerBlocks` for groups and nested columns properly
-------------------------------------------------+-------------------------
Reporter: aristath | Owner: desrosj
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.8
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
fixed-major dev-reviewed |
-------------------------------------------------+-------------------------
Changes (by jorbin):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"51382" 51382]:
{{{
#!CommitTicketReference repository="" revision="51382"
Posts: Prevent an empty excerpt when groups and nested column blocks are
present.
This improves the logic within excerpt_remove_blocks() to better handle
innerBlocks. This prevents an empty excerpt from being returned when
core/columns, core/column, and core/group blocks are present.
This issue has been surfaced in the Query Loop block, where excerpts can
be set to display.
This introduces the excerpt_allowed_wrapper_blocks filter for controlling
which blocks should be considered wrapper blocks.
Wrapper blocks and their nested contents are not stripped by
excerpt_remove_blocks(), allowing their contents to appear in generated
excerpts.
Backports [51348], [51375], [51378], and [51379] to the 5.8 branch.
Fixes #53604.
Props aristath, jorbin, SergeyBiryukov, desrosj.
Unprops jorbin.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53604#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list