From 696f52729ee28e26962ffc52562a5dba6fbbbb28 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 28 Feb 2012 20:08:08 +0000 Subject: [PATCH] Theme root transient caching is now in search_theme_directories(), not get_themes(). see #20103. git-svn-id: https://develop.svn.wordpress.org/trunk@20021 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index da1cfb479f..83865b892d 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -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; }