[wp-trac] [WordPress Trac] #39270: Use a higher priority on wp_head for inline custom CSS
WordPress Trac
noreply at wordpress.org
Tue Dec 13 22:38:49 UTC 2016
#39270: Use a higher priority on wp_head for inline custom CSS
--------------------------+-----------------------------
Reporter: jeremyfelt | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
As of [38829], via #35395, custom CSS is output inline on `wp_head` with a
priority of 11.
Other themes, well
[https://github.com/thethemefoundry/make/blob/c673f1b4427cfe32cb18184820cd3ce0632c5c31/src/inc/style/manager.php#L97
at least one], may also use priority 11 to output inline CSS for the same
reasoning as our commit message - "so that it overrides any enqueued
stylesheets". Because of the order in which these are added, the
"overriding" custom CSS from WordPress it output before the additional
theme styles.
The Jetpack solution, before WP 4.7, was to use
[https://github.com/Automattic/jetpack/blob/master/modules/custom-css
/custom-css.php#L97 priority 101] so that the styles were more likely to
output last.
Because of the priority shifting/confusion, the upgrade to WordPress 4.7
caused visual regressions on the front end for at least 2 sites that I'm
aware of.
If it's not too late, I'd like to suggest bumping this priority to
something that fires even later, say 99.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39270>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list