Changeset 14485
- Timestamp:
- 05/06/2010 07:53:40 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/schema.php
r14451 r14485 652 652 if ( $template != $stylesheet ) 653 653 $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; 656 656 657 657 if ( 1 == $network_id ) { -
trunk/wp-admin/includes/upgrade.php
r14326 r14485 1624 1624 $index = implode('', file("$oldpath/$oldfile")); 1625 1625 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")) 1627 1627 return false; 1628 1628 continue; // Don't copy anything … … 1684 1684 function make_site_theme_from_default($theme_name, $template) { 1685 1685 $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; 1687 1687 1688 1688 // Copy files from the default theme to the site theme. … … 1780 1780 // Make the new site theme active. 1781 1781 $current_template = __get_option('template'); 1782 if ($current_template == WP_ FALLBACK_THEME) {1782 if ($current_template == WP_DEFAULT_THEME) { 1783 1783 update_option('template', $template); 1784 1784 update_option('stylesheet', $template); -
trunk/wp-includes/default-constants.php
r13737 r14485 287 287 * Slug of the default theme for this install. 288 288 * Used as the default theme when installing new sites. 289 * Will be used as the fallback if the current theme doesn't exist. 289 290 * @since 3.0.0 290 291 */ … … 292 293 define( 'WP_DEFAULT_THEME', 'twentyten' ); 293 294 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.0298 */299 if ( !defined('WP_FALLBACK_THEME') )300 define( 'WP_FALLBACK_THEME', WP_DEFAULT_THEME );301 295 } 302 296 -
trunk/wp-includes/theme.php
r14409 r14485 1208 1208 * Checks that current theme files 'index.php' and 'style.css' exists. 1209 1209 * 1210 * Does not check the fallback theme. The fallback themeshould always exist.1210 * Does not check the default theme, which is the fallback and should always exist. 1211 1211 * Will switch theme to the fallback theme if current theme does not validate. 1212 1212 * You can use the 'validate_current_theme' filter to return FALSE to … … 1214 1214 * 1215 1215 * @since 1.5.0 1216 * @see WP_ FALLBACK_THEME1216 * @see WP_DEFAULT_THEME 1217 1217 * 1218 1218 * @return bool … … 1223 1223 return true; 1224 1224 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 ); 1227 1227 return false; 1228 1228 } 1229 1229 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 ); 1232 1232 return false; 1233 1233 }
Note: See TracChangeset
for help on using the changeset viewer.