[wp-trac] [WordPress Trac] #64123: Patterns: add the pattern name to pattern blocks when they are converted
WordPress Trac
noreply at wordpress.org
Wed Feb 4 05:41:10 UTC 2026
#64123: Patterns: add the pattern name to pattern blocks when they are converted
--------------------------------------+---------------------
Reporter: ramonopoly | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Changes (by huzaifaalmesbah):
* keywords: has-patch has-unit-tests needs-testing => has-patch has-unit-
tests
Comment:
=== Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/10248
=== Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.30
- Server: nginx/1.29.4
- Database: mysqli (Server: 9.5.0 / Client: mysqlnd 8.2.30)
- Browser: Chrome 144.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
* Classic Editor 1.6.7
* Hello Dolly 1.7.2
* Test Reports 1.2.1
=== Steps taken
1. Started with a clean WordPress trunk install.
2. Activated Twenty Twenty-Five (block theme).
3. Navigated to:
/wp-admin/site-editor.php
4. Opened:
Templates → Twenty Twenty-Five → Page: 404
5. Clicked the 3-dot menu → Edit → Code editor.
6. Observed the resolved pattern block markup.
7. Before applying the patch: The resulting root block contains NO
metadata.
8. Applied PR.
9. Repeated the same steps and checked Code editor again.
10. ✅ After applying the patch:
- The resolved root block now includes metadata.
- Found:
`"metadata":{"patternName":"twentytwentyfive/hidden-404","name":"404"}`
=== Expected result
- Pattern blocks converted inside templates should retain pattern metadata
- Root block should contain:
metadata.patternName and metadata.name
- Editor can distinguish patterns from normal block groups
=== Additional Notes
- Verified behavior only affects resolved blocks in the Site Editor (not
theme template files directly).
- Tested saving, refreshing, and reopening — metadata remains intact.
- No performance or UI regressions observed.
=== Screenshots/Screencast with results
Before and after behavior video: https://files.catbox.moe/d1uxje.mp4
|| Before Apply Patch || After Apply Patch ||
|| [[Image(https://i.ibb.co/Jwyb5mSF/Huzaifa-20260204112435.png)]] ||
[[Image(https://i.ibb.co/9kDKyN8W/Huzaifa-20260204112545.png)]] ||
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64123#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list