WordPress.org

Make WordPress Core

Changeset 15720


Ignore:
Timestamp:
10/04/2010 07:50:13 PM (9 years ago)
Author:
nacin
Message:

Account for Twenty Ten in theme name collisions and properly fall back to TT in get_current_theme(). fixes #15719, props tonyf12.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r15641 r15720  
    400400        // a new theme directory and the theme header is not updated.  Whichever
    401401        // theme is first keeps the name.  Subsequent themes get a suffix applied.
    402         // The Default and Classic themes always trump their pretenders.
     402        // The Twenty Ten, Default and Classic themes always trump their pretenders.
    403403        if ( isset($wp_themes[$name]) ) {
    404             if ( ('WordPress Default' == $name || 'WordPress Classic' == $name) &&
    405                      ('default' == $stylesheet || 'classic' == $stylesheet) ) {
     404            $trump_cards = array(
     405                'classic'   => 'WordPress Classic',
     406                'default'   => 'WordPress Default',
     407                'twentyten' => 'Twenty Ten',
     408            );
     409            if ( isset( $trump_cards[ $stylesheet ] ) && $name == $trump_cards[ $stylesheet ] ) {
    406410                // If another theme has claimed to be one of our default themes, move
    407411                // them aside.
     
    519523    $current_template = get_option('template');
    520524    $current_stylesheet = get_option('stylesheet');
    521     $current_theme = 'WordPress Default';
     525    $current_theme = 'Twenty Ten';
    522526
    523527    if ( $themes ) {
Note: See TracChangeset for help on using the changeset viewer.