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

View File

@@ -587,6 +587,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" );
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
$styles->add( 'colors', true, array( 'wp-admin', 'buttons', 'open-sans', 'dashicons' ) );
// do not refer to this directly, the right one is queued by the above "meta" colors handle
@@ -695,6 +696,10 @@ function wp_style_loader_src( $src, $handle ) {
$parsed = parse_url( $src );
$url = $color->url;
if ( ! $url ) {
return false;
}
if ( isset($parsed['query']) && $parsed['query'] ) {
wp_parse_str( $parsed['query'], $qv );
$url = add_query_arg( $qv, $url );