Bernie Reiter 6528d9840b Blocks: During traversal, allow post callback to modify block.
Both the `$pre_callback` and `$post_callback` functions that are given as arguments to `traverse_and_serialize_block(s)` receive a reference to the current block as their first argument. However, while any changes that the "pre" callback makes to the block are reflected by the serialized markup, the same wasn't true for the "post" callback: Any changes that it made were only applied ''after'' the block had already been serialized.

This commit changes the behavior such that `$post_callback`'s changes to the current block are also reflected in the serialized markup.

See #59646.
Props gziolo.
Fixes #59669.

git-svn-id: https://develop.svn.wordpress.org/trunk@56970 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-18 19:30:40 +00:00
..