Make WordPress Core

Changeset 13019


Ignore:
Timestamp:
02/07/2010 10:36:37 PM (15 years ago)
Author:
westi
Message:

Switch to a constant for the fallback theme. See #9015.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-constants.php

    r12921 r13019  
    259259             */
    260260            define('STYLESHEETPATH', get_stylesheet_directory());
     261           
     262            /**
     263             * Slug of the fallback theme for this install.
     264             * Will be used as the fallback if the current theme doesn't exist.
     265             * @since 3.0.0
     266             */
     267            define( 'WP_FALLBACK_THEME', 'twentyten' );
    261268            break;
    262269
  • trunk/wp-includes/theme.php

    r13018 r13019  
    952952    $template = locate_template(array("comments-popup.php"));
    953953    if ('' == $template)
    954         $template = get_theme_root() . '/default/comments-popup.php';
     954        $template = get_theme_root() . '/' . WP_FALLBACK_THEME . '/comments-popup.php';
    955955
    956956    return apply_filters('comments_popup_template', $template);
     
    11611161        return true;
    11621162
    1163     $fallback = 'twentyten';
    1164 
    1165     if ( get_template() != $fallback && !file_exists(get_template_directory() . '/index.php') ) {
    1166         switch_theme($fallback, $fallback);
     1163    if ( get_template() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/index.php') ) {
     1164        switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME );
    11671165        return false;
    11681166    }
    11691167
    1170     if ( get_stylesheet() != $fallback && !file_exists(get_template_directory() . '/style.css') ) {
    1171         switch_theme($fallback, $fallback);
     1168    if ( get_stylesheet() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/style.css') ) {
     1169        switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME );
    11721170        return false;
    11731171    }
Note: See TracChangeset for help on using the changeset viewer.