mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 04:20:01 +01:00
Introduce a new function, `apply_block_hooks_to_content_from_post_object`, to colocate the logic used to temporarily wrap content in a parent block (with `ignoredHookedBlocks` information fetched from post meta) alongside the call to `apply_block_hooks_to_content`. Fetching that information from post meta is required for all block types that get their content from post objects, i.e. Post Content, Synced Pattern, and Navigation blocks. Additionally, the newly introduced function contains logic to ensure that insertion of a hooked block into the `first_child` or `last_child` position of a given Post Content block works, even if that block only contains "classic" markup (i.e. no blocks). Props bernhard-reiter, gziolo, mamaduka. Fixes #61074, #62716. git-svn-id: https://develop.svn.wordpress.org/trunk@59838 602fd350-edb4-49c9-b593-d223f7449a82