Opened 24 hours ago
Last modified 22 hours ago
#65628 new enhancement
PHP-only blocks: in-canvas editing
| Reported by: | priethor | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | trunk |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
WordPress 7.0 introduced PHP-only block registration through supports.autoRegister. These blocks currently use a render_callback, so the editor displays a server-rendered preview rather than editable blocks, and can't be editable in-canvas.
This ticket tracks the WordPress Core changes for the in-canvas editing of PHP-only blocks, in particular the pattern-based approach explored in Gutenberg PR #80182:
- It lets a PHP-only block provide a pattern instead of a render callback, so its content can be edited directly in the canvas.
- Patterns stay synced by default, and block authors choose which fields can be edited on each instance through pattern overrides.
- A PHP-only block can provide either a
render_callbackor a pattern. If both are registered, WordPress reports incorrect usage and uses the pattern.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)