From 066f081ed5f67d28cbe23b7b9e6dbb66a13b2baa Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 19 Feb 2016 20:33:42 +0000 Subject: [PATCH] Styles: Bail if `WP_Styles::_css_href()` returns an empty value. The style `colors` gets registered with `true` as the source value which gets handled later by `wp_style_loader_src()`, a callback for the `style_loader_src` filter in `WP_Styles::_css_href()`. `wp_style_loader_src()` may return false, for example for the default color scheme. This was removed in [36550]. See #35229. git-svn-id: https://develop.svn.wordpress.org/trunk@36590 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class.wp-styles.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/class.wp-styles.php b/src/wp-includes/class.wp-styles.php index 463b9a3645..fa3f958b85 100644 --- a/src/wp-includes/class.wp-styles.php +++ b/src/wp-includes/class.wp-styles.php @@ -86,6 +86,10 @@ class WP_Styles extends WP_Dependencies { } $href = $this->_css_href( $obj->src, $ver, $handle ); + if ( ! $href ) { + return true; + } + $rel = isset($obj->extra['alt']) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet'; $title = isset($obj->extra['title']) ? "title='" . esc_attr( $obj->extra['title'] ) . "'" : '';