bernhard-reiter 2952e563aa Block Hooks: apply_block_hooks_to_content in Patterns, Templates.
In the Patterns registry, use `apply_block_hooks_to_content` (introduced in [58291])  instead of the `WP_Block_Patterns_Registry` class's private `get_content` method. (The latter is removed as part of this changeset.)

In a similar vein, use `apply_block_hooks_to_content` in the `_build_block_template_result_from_file` and `_build_block_template_result_from_post` functions, respectively.

For that to work, `apply_block_hooks_to_content` is amended to inject the `theme` attribute into Template Part blocks, even if no hooked blocks are present.

This kind of centralization is required as a preparation for .

Props bernhard-reiter, jonsurrell.
See .

git-svn-id: https://develop.svn.wordpress.org/trunk@59101 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-27 09:18:46 +00:00
..