[wp-trac] [WordPress Trac] #63287: Unexpected output from apply_block_hooks_to_content_from_post_object
WordPress Trac
noreply at wordpress.org
Tue Apr 15 19:26:47 UTC 2025
#63287: Unexpected output from apply_block_hooks_to_content_from_post_object
--------------------------+-----------------------------
Reporter: obenland | Owner: bernhard-reiter
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When there are blocks hooked into `'core/post-content' => 'after'`, it
creates unbalanced tags for `remove_serialized_parent_block()` in
`apply_block_hooks_to_content_from_post_object()`:
{{{
<!-- wp:post-content --><!-- wp:heading {"level":1} --><h1>Hello
World!</h1><!-- /wp:heading --><!-- /wp:post-content --><!-- wp:tests
/hooked-block /-->
}}}
The result I'm seeing is the hooked block being removed and leaving the
closing `wp:post-content` tag:
{{{
<!-- wp:heading {"level":1} --><h1>Hello World!</h1><!-- /wp:heading
--><!-- /wp:post-content -->
}}}
I'll attach a diff with failing tests to work against.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63287>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list