[wp-trac] [WordPress Trac] #55996: the get_the_block_template_html call all the same functions as the the_conent filter so they are run twice
WordPress Trac
noreply at wordpress.org
Thu Jul 28 07:13:53 UTC 2022
#55996: the get_the_block_template_html call all the same functions as the
the_conent filter so they are run twice
------------------------------------------+------------------------------
Reporter: pbearne | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: performance
------------------------------------------+------------------------------
Comment (by ocean90):
Replying to [comment:5 ocean90]:
> Removing both `wp_filter_content_tags()` calls still adds the loading
attribute so there's indeed something that still runs the `the_content`
filter on the output.
That's actually because of the post content block which
[https://core.trac.wordpress.org/browser/tags/6.0.1/src/wp-includes/blocks
/post-content.php?marks=55#L54 calls the filter in the render callback].
At this point the loading attribute may not be added but due to the
following `wp_filter_content_tags()` calls for rendering the template
parts the attribute is added.
Related: #56295
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55996#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list