[wp-trac] [WordPress Trac] #59338: Themes: Inject theme attribute during block serialization
WordPress Trac
noreply at wordpress.org
Wed Sep 13 13:33:57 UTC 2023
#59338: Themes: Inject theme attribute during block serialization
-----------------------------+-----------------------------
Reporter: Bernhard Reiter | Owner: Bernhard Reiter
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.4
Component: Themes | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Rather than using `_inject_theme_attribute_in_block_template_content` to
inject the `theme` attribute into all Template Part blocks found in a
given file-based Block Template, introduce a new function tentatively
called `_inject_theme_attribute_in_template_part_block`, and use that as
second argument to `serialize_blocks()` (introduced in [56557]) in order
to inject said attribute during tree traversal for serialization.
This allows for a more modular approach that will eventually be extended
to implement automatic insertion of hooked blocks (see #59313).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59338>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list