Opened 22 months ago
Last modified 9 months ago
#62791 new enhancement
Could `pre_render_block` come later
| Reported by: | helgatheviking | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
9 months ago
#2
- Keywords has-patch added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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