Make WordPress Core

Ticket #27175: 27175.5.diff

File 27175.5.diff, 2.0 KB (added by SergeyBiryukov, 12 years ago)
  • src/wp-includes/default-filters.php

     
    280280add_filter( 'pre_option_gmt_offset','wp_timezone_override_offset' );
    281281
    282282// Admin Color Schemes
    283 add_action( 'admin_init', 'register_admin_color_schemes', 1);
     283add_action( 'admin_init', 'register_admin_color_schemes', 1 );
    284284add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
    285285
    286286// If the upgrade hasn't run yet, assume link manager is used.
  • src/wp-includes/general-template.php

     
    20992099 * @since 3.0.0
    21002100 */
    21012101function register_admin_color_schemes() {
    2102         $suffix = is_rtl() ? '-rtl' : '';
     2102        $suffix = ( function_exists( 'is_rtl' ) && is_rtl() ) ? '-rtl' : '';
    21032103        $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    21042104
    21052105        wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ),
  • src/wp-includes/script-loader.php

     
    578578
    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() && function_exists( 'has_action') && 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' );
    583588                if ( ! $color || ! isset( $GLOBALS['_wp_admin_css_colors'][ $color ] ) ) {