[wp-trac] [WordPress Trac] #62629: Begin HTML markup before Customizer script hooks
WordPress Trac
noreply at wordpress.org
Mon Dec 2 13:37:16 UTC 2024
#62629: Begin HTML markup before Customizer script hooks
-------------------------+-----------------------------
Reporter: sabernhardt | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Related: #62491
Styles and scripts that plugins might output in the
`admin_enqueue_scripts` hook is added before the `<!DOCTYPE>` in the
Customizer. The resulting //potential// for invalid HTML has existed at
least as early as 5.0 (and likely back to [27907]).
Steps:
1. Activate a classic theme, such as Twenty Twenty.
2. Output a style or script tag in the `admin_enqueue_scripts` hook
([https://core.trac.wordpress.org/ticket/62491#comment:12 sample code
snippet]) inside a (custom) plugin.
3. Go to the Customizer.
4. If your browser lets you view the full page source, check it to find
your special tag before `<!DOCTYPE>`. If you can only use the inspect
element tool, you will likely find your tag in the `<head>` (before the
`http-equiv` meta).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62629>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list