Admin color schemes: Manually handle RTL and minified versions of the CSS files on registration.

This bypasses WP_Styles entirely, which is much simpler for the moment, given that color schemes bypass WP_Styles for plenty already. The script loader is told to stop thinking of colors.css as an RTL-ified file. The colors-fresh handle, used directly on the login screen, needed to be (even before this commit).

fixes #26316.


git-svn-id: https://develop.svn.wordpress.org/trunk@26780 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-12-07 09:04:02 +00:00
parent 06747b5101
commit 6e1d73c39d
2 changed files with 14 additions and 14 deletions

View File

@@ -551,7 +551,7 @@ function wp_default_styles( &$styles ) {
$suffix = SCRIPT_DEBUG ? '' : '.min';
$rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'customize-controls', 'media-views', 'wp-color-picker', 'wp-pointer', 'editor-buttons', 'farbtastic', 'wp-auth-check', 'wp-jquery-ui-dialog', 'media-views', 'buttons', 'install', 'colors' );
$rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'customize-controls', 'media-views', 'wp-color-picker', 'wp-pointer', 'editor-buttons', 'farbtastic', 'wp-auth-check', 'wp-jquery-ui-dialog', 'media-views', 'buttons', 'install' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array( 'open-sans', 'dashicons' ) );
@@ -699,9 +699,6 @@ function wp_style_loader_src( $src, $handle ) {
$parsed = parse_url( $src );
$url = $color->url;
if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG )
$url = preg_replace( '/.min.css$|.min.css(?=\?)/', '.css', $url );
if ( isset($parsed['query']) && $parsed['query'] ) {
wp_parse_str( $parsed['query'], $qv );
$url = add_query_arg( $qv, $url );