Opened 4 months ago
Last modified 10 days ago
#61446 assigned enhancement
Move content processing in get_the_block_template_html() to filters.
Reported by: | joemcgill | Owned by: | joemcgill |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
When get_the_block_template_html()
was added in [51003] it hard coded all of the content processing that is applied in classic themes to post content via default filters like the_content
, the_excerpt
, etc. This includes, but is not limited, to the following processing functions:
wp_embed->run_shortcode
wp_embed->autoembed
shortcode_unautop
do_shortcode
do_blocks
wptexturize
convert_smilies
wp_filter_content_tags
This has resulted in bugs like #55996 and also makes it impossible to run post processing on the full contents of a block template before it is rendered to the template canvas (example use case).
To address this we can introduce a new filter, the_block_template_html
, and move all of the processing to that filter instead. See this PR for an initial proof of concept. Sidenote: this was originally proposed as a way to address #55996 but is really an enhancement with broader implications, so a separate ticket seems warranted.
With 6.7 Beta 1 releasing in a few hours, this is being moved to
Future Release
given no implementation or patch exist just yet.If any committer feels the remaining work can be resolved in time for Beta 1 or any other specific milestone and wishes to assume ownership during that cycle, feel free to update the milestone accordingly.