[wp-trac] [WordPress Trac] #60111: Twenty Twenty-One: Dark mode toggle script loaded twice in frontend

WordPress Trac noreply at wordpress.org
Sun Jan 11 19:00:19 UTC 2026


#60111: Twenty Twenty-One: Dark mode toggle script loaded twice in frontend
-------------------------------------+---------------------
 Reporter:  flixos90                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  7.0
Component:  Bundled Theme            |     Version:  6.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by r1k0):

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/10714

 === Environment
 - WordPress: 7.0-alpha-20260111.052907
 - PHP: 7.4.33
 - Server: PHP.wasm
 - Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
 - Browser: Chrome 143.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-One 2.7
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.1

 === Actual Results
 1.  ✅ Issue resolved with patch.
 2.      The {{{dark-mode-toggler.js}}} file is no longer enqueued.
 3.      The {{{editor-dark-mode-support.js}}} script no longer loads on
 the frontend.
 4.      Only the inline script of the {{{dark-mode-toggler}}} is loaded.


 === Additional Notes
 - None

 === Supplemental Artifacts
 Before:

 [[Image(https://i.ibb.co/x8fncs0V/dark-mode-js-before.png)]]

 After:

 [[Image(https://i.ibb.co/Lhk8Lq3x/dark-mode-js-after.png)]]

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


More information about the wp-trac mailing list