]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/user-profile.js
WordPress 3.9
[autoinstalls/wordpress.git] / wp-admin / js / user-profile.js
index 95847310bf1cb00cff5f5898a24a5be6dd3d1804..b107d9877962e2b833610f625bb6d4af881cb503 100644 (file)
 
                        // 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