From 0cb8aed8235dcb02c0c7e74157b681b9b95eacad Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@20021 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 da1cfb479..83865b892 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; }