diff --git wp-includes/class.wp-styles.php wp-includes/class.wp-styles.php
index 46cb913..d75a35a 100644
|
|
class WP_Styles extends WP_Dependencies { |
89 | 89 | * @param string $handle The style's registered handle. |
90 | 90 | */ |
91 | 91 | $tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle ); |
| 92 | |
| 93 | // Add stylesheet outside the <head>, HTML4 and HTML5 have different specs. |
| 94 | if ( isset($obj->extra['in_footer']) ) { |
| 95 | if ( current_theme_supports('html5') ) { |
| 96 | $tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' property='$handle-css-$rel' type='text/css' media='$media' />\n", $handle ); |
| 97 | } else { |
| 98 | $tag = "<style id='$handle-css' type='text/css' media='$media'>@import url('$href')</style>\n"; |
| 99 | } |
| 100 | } |
| 101 | |
92 | 102 | if ( 'rtl' === $this->text_direction && isset($obj->extra['rtl']) && $obj->extra['rtl'] ) { |
93 | 103 | if ( is_bool( $obj->extra['rtl'] ) || 'replace' === $obj->extra['rtl'] ) { |
94 | 104 | $suffix = isset( $obj->extra['suffix'] ) ? $obj->extra['suffix'] : ''; |
… |
… |
class WP_Styles extends WP_Dependencies { |
234 | 244 | return false; |
235 | 245 | } |
236 | 246 | |
237 | | public function do_footer_items() { // HTML 5 allows styles in the body, grab late enqueued items and output them in the footer. |
| 247 | public function do_footer_items() { |
| 248 | $footer_items = array_diff($this->queue, $this->done); |
| 249 | if ( ! empty( $footer_items ) ) { |
| 250 | foreach ( $footer_items as $footer_item ) { |
| 251 | $this->registered[$footer_item]->extra['in_footer'] = true; |
| 252 | } |
| 253 | } |
| 254 | |
238 | 255 | $this->do_items(false, 1); |
239 | 256 | return $this->done; |
240 | 257 | } |