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
+5 -1
View File
@@ -95,7 +95,11 @@
// Set color scheme
if ( user_id === current_user_id ) {
// Load the colors stylesheet
// Load the colors stylesheet.
// The default color scheme won't have one, so we'll need to create an element.
if ( 0 === $stylesheet.length ) {
$stylesheet = $( '<link rel="stylesheet" />' ).appendTo( 'head' );
}
$stylesheet.attr( 'href', $this.children( '.css_url' ).val() );
// repaint icons