Make WordPress Core

Changeset 27111


Ignore:
Timestamp:
02/06/2014 10:15:25 PM (11 years ago)
Author:
nacin
Message:

Fix the conditional enqueueing/printing of colors stylesheets, without breaking dependencies.

fixes #18380.
see #20729 which should properly fix this.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/user-profile.js

    r26776 r27111  
    9696            // Set color scheme
    9797            if ( user_id === current_user_id ) {
    98                 // Load the colors stylesheet
     98                // Load the colors stylesheet.
     99                // The default color scheme won't have one, so we'll need to create an element.
     100                if ( 0 === $stylesheet.length ) {
     101                    $stylesheet = $( '<link rel="stylesheet" />' ).appendTo( 'head' );
     102                }
    99103                $stylesheet.attr( 'href', $this.children( '.css_url' ).val() );
    100104
  • trunk/src/wp-includes/class.wp-styles.php

    r26107 r27111  
    6363
    6464        $href = $this->_css_href( $obj->src, $ver, $handle );
     65        if ( empty( $href ) ) {
     66            // Turns out there is nothing to print.
     67            return true;
     68        }
    6569        $rel = isset($obj->extra['alt']) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet';
    6670        $title = isset($obj->extra['title']) ? "title='" . esc_attr( $obj->extra['title'] ) . "'" : '';
  • trunk/src/wp-includes/general-template.php

    r26975 r27111  
    21042104
    21052105    wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ),
    2106         admin_url( "css/colors$suffix.css" ),
     2106        false,
    21072107        array( '#222', '#333', '#0074a2', '#2ea2cc' ),
    21082108        array( 'base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff' )
  • trunk/src/wp-includes/script-loader.php

    r27106 r27111  
    588588
    589589    // Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
     590
    590591    $styles->add( 'colors', true, array( 'wp-admin', 'buttons', 'open-sans', 'dashicons' ) );
    591592
     
    696697        $url = $color->url;
    697698
     699        if ( ! $url ) {
     700            return false;
     701        }
     702
    698703        if ( isset($parsed['query']) && $parsed['query'] ) {
    699704            wp_parse_str( $parsed['query'], $qv );
  • trunk/src/wp-includes/version.php

    r27062 r27111  
    55 * @global string $wp_version
    66 */
    7 $wp_version = '3.9-alpha-src';
     7$wp_version = '3.9-alpha-27111-src';
    88
    99/**
Note: See TracChangeset for help on using the changeset viewer.