[wp-trac] [WordPress Trac] #59646: Block Hooks: Enable for user-modified templates/parts/patterns

WordPress Trac noreply at wordpress.org
Wed Oct 18 11:59:33 UTC 2023


#59646: Block Hooks: Enable for user-modified templates/parts/patterns
-----------------------------+------------------------------
 Reporter:  Bernhard Reiter  |       Owner:  Bernhard Reiter
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  6.5
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------

Comment (by gziolo):

 More notes from the aforementioned pairing session. We tried to figure out
 the necessary changes on the server to enable Block Hooks in the modified
 templates and content. We discussed a few ideas, and it all looks
 promising to use block attributes as the place to remember which blocks
 were hooked in the past. The next steps could look as follows:
 - Finish refactoring the server implementation to always mark anchor
 blocks with the list of block types hooked to it at any given time in the
 history.
 - Rethink the implementation for the Plugins panel in the block sidebar,
 to use the list of hooked blocks stored in the block attribute to present
 toggles for hooked blocks.
 - Enable the same functionality for modified templates and content, taking
 into account that the list of hooked blocks stored for the anchor block
 needs to support additions (for unmodified templates and patterns, we
 always inject the attribute from scratch).
 - The only identified challenge would be deciding what should happen when
 you insert a new block that is also an anchor block for other block types.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59646#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list