[wp-trac] [WordPress Trac] #47637: Enhance excerpt_remove_blocks to handle more types of group blocks (was: Enhance excerpt_remove_blocks: add group Blocks and give Block Developers the ability to define excerpts for their Blocks)
WordPress Trac
noreply at wordpress.org
Thu Aug 1 06:56:47 UTC 2019
#47637: Enhance excerpt_remove_blocks to handle more types of group blocks
-------------------------------+-----------------------------
Reporter: kuchenundkakao | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Posts, Post Types | Version: 5.2.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------------+-----------------------------
Changes (by noisysocks):
* keywords: 2nd-opinion => needs-patch
* milestone: Awaiting Review => Future Release
Comment:
See #46133 for necessary context here. @azaozz wrote a patch that has an
exception for columns blocks, but this solution needs to be expanded to
cover all core and non-core group blocks. This is especially important now
that Gutenberg is adding different kinds of group blocks e.g. Group,
Cover, Media & Text.
> Yeah, thinking we will need to keep enhancing the way we auto-generate
excerpts for posts and include all blocks that may have relevant text.
>
> The challenge is that we only want "static text" and need to exclude
dynamic blocks as they may cause infinite loop if trying to generate an
excerpt, and in most cases they are not particularly relevant to the rest
of the post.
>
> Ideally we should parse all "text containing blocks" regardless if they
are wrapped in "container" blocks. The current patch only looks one level
deep in all whitelisted blocks, and has an exception for core/columns
where it looks inside each column. This can be enhanced and perhaps can be
done better. Planning to look at it again for 5.3.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47637#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list