Changeset 16424
- Timestamp:
- 11/17/2010 04:11:44 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r16340 r16424 267 267 if ( isset($wp_themes) ) 268 268 return $wp_themes; 269 270 /* Register the default root as a theme directory */271 register_theme_directory( get_theme_root() );272 269 273 270 if ( !$theme_files = search_theme_directories() ) … … 476 473 global $wp_theme_directories; 477 474 478 if ( count($wp_theme_directories <= 1))475 if ( count($wp_theme_directories) <= 1 ) 479 476 return '/themes'; 480 477 … … 704 701 * @return string Theme root 705 702 */ 706 function get_raw_theme_root( $stylesheet_or_template ) {703 function get_raw_theme_root( $stylesheet_or_template, $no_cache = false ) { 707 704 global $wp_theme_directories; 708 705 709 if ( count($wp_theme_directories <= 1))706 if ( count($wp_theme_directories) <= 1 ) 710 707 return '/themes'; 711 708 … … 713 710 714 711 // If requesting the root for the current theme, consult options to avoid calling get_theme_roots() 715 if ( get_option('stylesheet') == $stylesheet_or_template ) 716 $theme_root = get_option('stylesheet_root'); 717 elseif ( get_option('template') == $stylesheet_or_template ) 718 $theme_root = get_option('template_root'); 712 if ( !$no_cache ) { 713 if ( get_option('stylesheet') == $stylesheet_or_template ) 714 $theme_root = get_option('stylesheet_root'); 715 elseif ( get_option('template') == $stylesheet_or_template ) 716 $theme_root = get_option('template_root'); 717 } 719 718 720 719 if ( empty($theme_root) ) { … … 1249 1248 update_option('stylesheet', $stylesheet); 1250 1249 if ( count($wp_theme_directories) > 1 ) { 1251 update_option('template_root', get_raw_theme_root($template ));1252 update_option('stylesheet_root', get_raw_theme_root($stylesheet ));1250 update_option('template_root', get_raw_theme_root($template, true)); 1251 update_option('stylesheet_root', get_raw_theme_root($stylesheet, true)); 1253 1252 } 1254 1253 delete_option('current_theme'); -
trunk/wp-settings.php
r16353 r16424 175 175 create_initial_post_types(); 176 176 177 // Register the default theme directory root 178 register_theme_directory( get_theme_root() ); 179 177 180 // Load active plugins. 178 181 foreach ( wp_get_active_and_valid_plugins() as $plugin )
Note: See TracChangeset
for help on using the changeset viewer.