[wp-trac] [WordPress Trac] #30579: wp_enqueue_style in footer

WordPress Trac noreply at wordpress.org
Tue Dec 2 20:57:19 UTC 2014


#30579: wp_enqueue_style in footer
-----------------------------------+-----------------------------
 Reporter:  spacedmonkey           |      Owner:
     Type:  enhancement            |     Status:  new
 Priority:  normal                 |  Milestone:  Awaiting Review
Component:  Script Loader          |    Version:  4.0.1
 Severity:  normal                 |   Keywords:
  Focuses:  template, performance  |
-----------------------------------+-----------------------------
 If you call the wp_enqueue_style function after wp_head ( in a shortcode
 for example ) has been called, it puts the css in the footer. This is
 means a link tag is outputted out the buttom of the body tag. This is
 invalid html, as link tag can only be used in the head tag. To make it
 valid html, a style tag should be used.

 Something like this
 {{{
 <style id='$handle-inline-css' type='text/css' media="$media">
      @import url('$src');
 </style>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30579>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list