mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user