[wp-trac] [WordPress Trac] #64442: Deprecate and remove HTML5 script theme support

WordPress Trac noreply at wordpress.org
Thu Mar 5 09:13:43 UTC 2026


#64442: Deprecate and remove HTML5 script theme support
-------------------------------------------------+-------------------------
 Reporter:  jonsurrell                           |       Owner:  jonsurrell
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  7.0
Component:  Script Loader                        |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-unit-tests needs-dev-note has-   |     Focuses:  javascript
  patch                                          |
-------------------------------------------------+-------------------------

Comment (by jonsurrell):

 Replying to [comment:35 poena]:
 > What about function _add_default_theme_supports() which enables HTML5
 script for block themes by default?

 Good question. There are a few places `script` and `style` are still used
 with `html5` theme support. [https://github.com/WordPress/wordpress-
 develop/blob/a479b0a42c06dfe14f377fe4579206a1650ccc8f/src/wp-
 includes/theme.php#L4399 _add_default_theme_supports() is one], and
 [https://github.com/WordPress/wordpress-
 develop/blob/a479b0a42c06dfe14f377fe4579206a1650ccc8f/src/wp-
 includes/theme.php#L4261-L4283 the REST API is another].

 Effectively, theme support for `html5` `script` and `style` is always
 enabled. [https://github.com/WordPress/wordpress-
 develop/pull/10919#issuecomment-3896349183 Actually implementing changes
 to reflect that seems to be more trouble than its worth.]

 I considered removing these from the REST API and default theme supports,
 but it's harmless to leave them. Removing them is potentially disruptive
 for extenders. I don't think there was ever much reason for themes or
 plugins to ''check'' for this theme support, but it's possible.

 I plan to publish a dev note for 7.0. The remaining `script` and `style`
 can be considered for removal in a future version.

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


More information about the wp-trac mailing list