Script/Style Dependencies: Make sure that inline styles for handles without a source are printed.

This prevents breaking plugins which are adding inline styles to the `wp-admin` handle after [36341].

Props dd32, ocean90.
Fixes #35229.

git-svn-id: https://develop.svn.wordpress.org/trunk@36550 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-02-17 17:10:53 +00:00
parent 149686b424
commit 59747aa6b9
5 changed files with 56 additions and 19 deletions

View File

@@ -177,6 +177,11 @@ class WP_Scripts extends WP_Dependencies {
echo $cond_after;
}
// A single item may alias a set of items, by having dependencies, but no source.
if ( ! $obj->src ) {
return true;
}
if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) {
$src = $this->base_url . $src;
}