Script Loader: Don't parse $src if the current color scheme isn't registered.

Avoids a `parse_url()` call on each request if the default colors scheme is in use.

Fixes #35882.
Built from https://develop.svn.wordpress.org/trunk@36591


git-svn-id: http://core.svn.wordpress.org/trunk@36558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-02-19 20:44:26 +00:00
parent 9d8204467c
commit 0285fd946d
2 changed files with 2 additions and 2 deletions

View File

@ -871,13 +871,13 @@ function wp_style_loader_src( $src, $handle ) {
$color = 'fresh';
$color = $_wp_admin_css_colors[$color];
$parsed = parse_url( $src );
$url = $color->url;
if ( ! $url ) {
return false;
}
$parsed = parse_url( $src );
if ( isset($parsed['query']) && $parsed['query'] ) {
wp_parse_str( $parsed['query'], $qv );
$url = add_query_arg( $qv, $url );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36590';
$wp_version = '4.5-alpha-36591';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.