Opened 2 days ago
Last modified 2 days ago
#66003 new enhancement
Editor: Reuse the common block style schema during theme.json sanitization
| Reported by: | mreishus | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | performance |
Description
WP_Theme_JSON::sanitize() currently builds the same base and responsive style schemas separately for each block. For the most part, they are the exact same. Only blocks with psuedo states or custom states need extra data.
The related Gutenberg change builds the schema once before looping over all blocks, then assigns this to each block, while keeping the same block specific overrides as before. This avoids PHP copying data structures in memory while keeping the same output.
This tracks the backport of the Gutenberg PR to WP Core.
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/82203
Change History (2)
This ticket was mentioned in PR #13337 on WordPress/wordpress-develop by @mreishus.
2 days ago
#2
- Keywords has-patch has-unit-tests added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/66003
Backport for: https://github.com/WordPress/gutenberg/pull/82203
## Use of AI Tools
AI assistance: Yes
Tool(s): ChatGPT
Model(s): GPT-5.6 Sol Pro
Used for: Brainstorming regression causes and test creation