[wp-trac] [WordPress Trac] #24152: Use JSON as alternative to CSS file headers

WordPress Trac noreply at wordpress.org
Thu Mar 5 20:21:23 UTC 2026


#24152: Use JSON as alternative to CSS file headers
-----------------------------+------------------------------
 Reporter:  ryanve           |       Owner:  (none)
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Themes           |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by retlehs):

 Wrote about this in detail: https://roots.io/wordpress-file-headers-have-
 overstayed-their-welcome/

 The strongest argument now is that `theme.json` already exists. WordPress
 already parses it for colors, fonts, spacing, layout, templates, and
 patterns. Adding a metadata property for theme name, version, and author
 is a natural extension of a file that's already required for block/hybrid
 themes.

 For plugins, a `plugin.json` would follow the same pattern.

 Both are fully backwards compatible: if the JSON metadata isn't present,
 fall back to file headers. `wp_get_theme()` and `get_plugin_data()` handle
 the abstraction.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/24152#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list