[wp-trac] [WordPress Trac] #65317: Removal of HTML5 script theme support affects older theme gallery layout in frontend

WordPress Trac noreply at wordpress.org
Fri May 22 16:13:05 UTC 2026


#65317: Removal of HTML5 script theme support affects older theme gallery layout in
frontend
---------------------------+------------------------------
 Reporter:  Ov3rfly        |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  7.0
 Severity:  normal         |  Resolution:
 Keywords:  close          |     Focuses:
---------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => close


Comment:

 WordPress 3.1 introduced a more reliable filter than `gallery_style` for
 removing the `style` tag completely.
 {{{
 add_filter( 'use_default_gallery_style', '__return_false' );
 }}}

 Twenty Ten has both filters, keeping `gallery_style` for backward
 compatibility with WordPress 3.0.

 Several other
 [https://veloria.dev/search/ae8e2f98-85c3-41da-b782-292a270a333b themes in
 the directory] have a `gallery_style` filter, and most of them replace
 `<style type='text/css'>(.*?)</style>`. If they do not also have the
 `use_default_gallery_style` hook, I expect that those themes already had a
 problem in WordPress 5.3, when [46164] switched the quotes from single to
 double.

 cc: @elmastudio

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


More information about the wp-trac mailing list