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
This commit is contained in:
parent
3459ca246e
commit
696f52729e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user