Append "-css" to the IDs for <link rel="stylesheet"> tags in the head, props Denis-de-Bernardy, fixes #9486
git-svn-id: http://svn.automattic.com/wordpress/trunk@10899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2faeef333
commit
1f9f97058e
|
@ -62,14 +62,14 @@ class WP_Styles extends WP_Dependencies {
|
||||||
$end_cond = "<![endif]-->\n";
|
$end_cond = "<![endif]-->\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle' $title href='$href' type='text/css' media='$media' />\n", $handle );
|
$tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );
|
||||||
if ( 'rtl' === $this->text_direction && isset($this->registered[$handle]->extra['rtl']) && $this->registered[$handle]->extra['rtl'] ) {
|
if ( 'rtl' === $this->text_direction && isset($this->registered[$handle]->extra['rtl']) && $this->registered[$handle]->extra['rtl'] ) {
|
||||||
if ( is_bool( $this->registered[$handle]->extra['rtl'] ) )
|
if ( is_bool( $this->registered[$handle]->extra['rtl'] ) )
|
||||||
$rtl_href = str_replace( '.css', '-rtl.css', $href );
|
$rtl_href = str_replace( '.css', '-rtl.css', $href );
|
||||||
else
|
else
|
||||||
$rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" );
|
$rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" );
|
||||||
|
|
||||||
$tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle );
|
$tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-rtl-css' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag .= $end_cond;
|
$tag .= $end_cond;
|
||||||
|
|
Loading…
Reference in New Issue