[wp-trac] [WordPress Trac] #59131: Introduce filters to modify/inspect the blocks returned by `do_blocks()`

WordPress Trac noreply at wordpress.org
Wed Sep 27 09:26:53 UTC 2023


#59131: Introduce filters to modify/inspect the blocks returned by `do_blocks()`
--------------------------------------+-----------------------
 Reporter:  luisherranz               |       Owner:  gziolo
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.5
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------

Comment (by youknowriad):

 To summarize, the main use-case for us here is that we don't have any way
 in Core to hook into the top-level `do_blocks` call: the rendering of
 blocks into the frontend because this can happen in multiple places:

  - the_content hook for classic blocks.
  - the template rendering for block themes.
  - "partials" for template parts in classic themes.

 Having these hooks allow us to do this without major architecture refactor
 to the block rendering.

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


More information about the wp-trac mailing list