[wp-trac] [WordPress Trac] #58682: wp_trim_excerpt parses and renders blocks twice
WordPress Trac
noreply at wordpress.org
Fri Jun 30 10:45:08 UTC 2023
#58682: wp_trim_excerpt parses and renders blocks twice
--------------------------+----------------------------
Reporter: spacedmonkey | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: Future Release
Component: Editor | Version: 5.0
Severity: normal | Keywords:
Focuses: performance |
--------------------------+----------------------------
The function `wp_trim_excerpt` can called when a excerpt is not saved in
the database and use the post content to fill the missing field. To do
this, it strips unsupported blocks out using `excerpt_remove_blocks`.
However, as the filter `the_content` is applied to the text, this means
that blocks and parsed again.
`wp_trim_excerpt` should be improved not to call parse block multiple
files and only call when there are blocks present.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58682>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list