Make WordPress Core

Changeset 27228


Ignore:
Timestamp:
02/21/2014 09:08:37 PM (10 years ago)
Author:
nacin
Message:

Make sure color schemes are registered when WP_Styles is initialized early.

fixes #27175. see #26669.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r27204 r27228  
    579579    // Register a stylesheet for the selected admin color scheme.
    580580    $colors_url = false;
     581    // It's possible this is run before admin_init, so we need to make sure color schemes are registered.
     582    if ( is_admin() && empty( $GLOBALS['_wp_admin_css_colors'] ) && ! did_action( 'admin_init' ) && has_action( 'admin_init', 'register_admin_color_schemes' ) ) {
     583        register_admin_color_schemes();
     584        remove_action( 'admin_init', 'register_admin_color_schemes', 1 );
     585    }
    581586    if ( ! empty( $GLOBALS['_wp_admin_css_colors'] ) ) {
    582587        $color = get_user_option( 'admin_color' );
Note: See TracChangeset for help on using the changeset viewer.