Fix the conditional enqueueing/printing of colors stylesheets, without breaking dependencies.

fixes #18380.
see #20729 which should properly fix this.


git-svn-id: https://develop.svn.wordpress.org/trunk@27111 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2014-02-06 22:15:25 +00:00
parent 4d7d68b565
commit 1304fb3463
5 changed files with 16 additions and 3 deletions
+4
View File
@@ -62,6 +62,10 @@ class WP_Styles extends WP_Dependencies {
$media = 'all';
$href = $this->_css_href( $obj->src, $ver, $handle );
if ( empty( $href ) ) {
// Turns out there is nothing to print.
return true;
}
$rel = isset($obj->extra['alt']) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet';
$title = isset($obj->extra['title']) ? "title='" . esc_attr( $obj->extra['title'] ) . "'" : '';