Opened 14 months ago
Last modified 5 weeks ago
#62791 new enhancement
Could `pre_render_block` come later
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | has-patch |
| Focuses: | Cc: |
Description (last modified by )
In the course of some investigations, I noticed that `pre_render_block` comes before `render_block_data` and `render_block_context`
This means I am not able to conditionally use pre_render_block with conditions based on either block context or programmatically added attributes. This seems limiting. (or at least it is in my current project, where I am trying to modify an existing block when it's part of my block - using my block's context)
Could pre_render_block come before actual rendering, but after these other filters? Or could we add another filter at the beginning of `render()`?
Change History (2)
This ticket was mentioned in PR #10845 on WordPress/wordpress-develop by @niravsherasiya7707.
5 weeks ago
#2
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Core Trac Ticket: https://core.trac.wordpress.org/ticket/62791
Adds a new
pre_render_block_outputfilter that allows short-circuiting block rendering after context and data processing has been completed.pre_render_block_outputfilter afterrender_block_contextandWP_BlockinstantiationWP_Blockinstance with processed context and attributes