[wp-trac] [WordPress Trac] #63840: Block Bindings: Support generic block attributes

WordPress Trac noreply at wordpress.org
Tue Aug 19 09:02:45 UTC 2025


#63840: Block Bindings: Support generic block attributes
-----------------------------+--------------------
 Reporter:  Bernhard Reiter  |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  6.9
Component:  General          |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+--------------------
 Currently, Block Bindings support for block attributes such as
 `core/paragraph`'s `content` or `core/button`'s `text` depends on hard-
 coded logic to locate and replace the respective attributes. Since that
 logic is not filterable, it means that extending support for additional
 Core or third-party blocks requires hand-writing similar code in the
 block's PHP. This is limiting the scalability of Block Bindings.

 Thus, the existing block-specific custom logic should be replaced by more
 generic code that is able to locate and replace an attribute based on the
 `selector` definition in its `block.json`.

 Ultimately, this will require a `set_inner_html()` method from the HTML
 API (which doesn't exist yet); but we can already provide a decent
 solution based on what's currently available from the HTML API.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63840>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list