Theme root transient caching is now in search_theme_directories(), not get_themes(). see #20103.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-02-28 20:08:08 +00:00
parent c77de588d4
commit 0cb8aed823
1 changed files with 2 additions and 8 deletions

View File

@ -417,7 +417,6 @@ function get_themes() {
}
}
$theme_roots[$stylesheet] = str_replace( WP_CONTENT_DIR, '', $theme_root );
$wp_themes[$name] = array(
'Name' => $name,
'Title' => $title,
@ -442,11 +441,6 @@ function get_themes() {
unset($theme_files);
/* Store theme roots in the DB */
if ( get_site_transient( 'theme_roots' ) != $theme_roots )
set_site_transient( 'theme_roots', $theme_roots, 7200 ); // cache for two hours
unset($theme_roots);
/* Resolve theme dependencies. */
$theme_names = array_keys( $wp_themes );
foreach ( (array) $theme_names as $theme_name ) {
@ -479,8 +473,8 @@ function get_theme_roots() {
$theme_roots = get_site_transient( 'theme_roots' );
if ( false === $theme_roots ) {
get_themes();
$theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme()
search_theme_directories(); // Regenerate the transient.
$theme_roots = get_site_transient( 'theme_roots' );
}
return $theme_roots;
}