[wp-trac] [WordPress Trac] #59669: Block: Give `traverse_and_serialize_block(s)`' post-callback access to block instance

WordPress Trac noreply at wordpress.org
Wed Oct 18 13:02:44 UTC 2023


#59669: Block: Give `traverse_and_serialize_block(s)`' post-callback access to
block instance
-----------------------------+-----------------------------
 Reporter:  Bernhard Reiter  |      Owner:  Bernhard Reiter
     Type:  enhancement      |     Status:  assigned
 Priority:  normal           |  Milestone:  6.5
Component:  General          |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Both the `$pre_` and `$post_callback` functions that are given as
 arguments to `traverse_and_serialize_block(s)` receive a reference to the
 current block as its first argument. However, while any changes that the
 "pre" callback makes to the block are actually respected during
 serialization, the same isn't true for the "post" callback: Any changes
 that it makes are only applied after the block has already been
 serialized. For applications like #59412, we probably want to change that.

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


More information about the wp-trac mailing list