Make WordPress Core

Changeset 14485


Ignore:
Timestamp:
05/06/2010 07:53:40 PM (15 years ago)
Author:
nacin
Message:

Remove WP_FALLBACK_THEME, use WP_DEFAULT_THEME instead. We now only fall back to the default theme if the theme is broken. Incomplete themes that need to inherit templates will inherit them from wp-includes/theme-compat -- this behavior is deprecated. fixes #12846.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r14451 r14485  
    652652    if ( $template != $stylesheet )
    653653        $allowed_themes[ $template ] = true;
    654     if ( WP_FALLBACK_THEME != $stylesheet && WP_FALLBACK_THEME != $template )
    655         $allowed_themes[ WP_FALLBACK_THEME ] = true;
     654    if ( WP_DEFAULT_THEME != $stylesheet && WP_DEFAULT_THEME != $template )
     655        $allowed_themes[ WP_DEFAULT_THEME ] = true;
    656656
    657657    if ( 1 == $network_id ) {
  • trunk/wp-admin/includes/upgrade.php

    r14326 r14485  
    16241624            $index = implode('', file("$oldpath/$oldfile"));
    16251625            if (strpos($index, 'WP_USE_THEMES') !== false) {
    1626                 if (! @copy(WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME.'/index.php', "$site_dir/$newfile"))
     1626                if (! @copy(WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile"))
    16271627                    return false;
    16281628                continue; // Don't copy anything
     
    16841684function make_site_theme_from_default($theme_name, $template) {
    16851685    $site_dir = WP_CONTENT_DIR . "/themes/$template";
    1686     $default_dir = WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME;
     1686    $default_dir = WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME;
    16871687
    16881688    // Copy files from the default theme to the site theme.
     
    17801780    // Make the new site theme active.
    17811781    $current_template = __get_option('template');
    1782     if ($current_template == WP_FALLBACK_THEME) {
     1782    if ($current_template == WP_DEFAULT_THEME) {
    17831783        update_option('template', $template);
    17841784        update_option('stylesheet', $template);
  • trunk/wp-includes/default-constants.php

    r13737 r14485  
    287287     * Slug of the default theme for this install.
    288288     * Used as the default theme when installing new sites.
     289     * Will be used as the fallback if the current theme doesn't exist.
    289290     * @since 3.0.0
    290291     */
     
    292293        define( 'WP_DEFAULT_THEME', 'twentyten' );
    293294
    294     /**
    295      * Slug of the fallback theme for this install.
    296      * Will be used as the fallback if the current theme doesn't exist.
    297      * @since 3.0.0
    298      */
    299     if ( !defined('WP_FALLBACK_THEME') )
    300         define( 'WP_FALLBACK_THEME', WP_DEFAULT_THEME );
    301295}
    302296
  • trunk/wp-includes/theme.php

    r14409 r14485  
    12081208 * Checks that current theme files 'index.php' and 'style.css' exists.
    12091209 *
    1210  * Does not check the fallback theme. The fallback theme should always exist.
     1210 * Does not check the default theme, which is the fallback and should always exist.
    12111211 * Will switch theme to the fallback theme if current theme does not validate.
    12121212 * You can use the 'validate_current_theme' filter to return FALSE to
     
    12141214 *
    12151215 * @since 1.5.0
    1216  * @see WP_FALLBACK_THEME
     1216 * @see WP_DEFAULT_THEME
    12171217 *
    12181218 * @return bool
     
    12231223        return true;
    12241224
    1225     if ( get_template() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/index.php') ) {
    1226         switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME );
     1225    if ( get_template() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/index.php') ) {
     1226        switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
    12271227        return false;
    12281228    }
    12291229
    1230     if ( get_stylesheet() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/style.css') ) {
    1231         switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME );
     1230    if ( get_stylesheet() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/style.css') ) {
     1231        switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
    12321232        return false;
    12331233    }
Note: See TracChangeset for help on using the changeset viewer.