-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Package] Server Side Render/packages/server-side-render/packages/server-side-render[Status] Needs More InfoFollow-up required in order to be actionable.Follow-up required in order to be actionable.
Description
When using PHP to render blocks, it is useful to know in which context the rendering happens. A common scenario for this is to have slightly different output in the editor and the front end.
Currently there is no good way to determine in the PHP layer whether the render happens in the editor or on the front end.
I propose to pass an additional context
argument to the callback function for rendering dynamic blocks.
It is possible to differentiate the two by other means, but these are rather inelegant.
mikeselander and amir2mi
Metadata
Metadata
Assignees
Labels
[Package] Server Side Render/packages/server-side-render/packages/server-side-render[Status] Needs More InfoFollow-up required in order to be actionable.Follow-up required in order to be actionable.