Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#62791 new enhancement

Could `pre_render_block` come later

Reported by: helgatheviking's profile helgatheviking Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description (last modified by sabernhardt)

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 (1)

#1 @sabernhardt
3 months ago

  • Component changed from General to Editor
  • Description modified (diff)
Note: See TracTickets for help on using tickets.