WordPress.org

Make WordPress Core

Changeset 20021


Ignore:
Timestamp:
02/28/2012 08:08:08 PM (6 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r20020 r20021  
    418418        }
    419419
    420         $theme_roots[$stylesheet] = str_replace( WP_CONTENT_DIR, '', $theme_root );
    421420        $wp_themes[$name] = array(
    422421            'Name' => $name,
     
    443442    unset($theme_files);
    444443
    445     /* Store theme roots in the DB */
    446     if ( get_site_transient( 'theme_roots' ) != $theme_roots )
    447         set_site_transient( 'theme_roots', $theme_roots, 7200 ); // cache for two hours
    448     unset($theme_roots);
    449 
    450444    /* Resolve theme dependencies. */
    451445    $theme_names = array_keys( $wp_themes );
     
    480474    $theme_roots = get_site_transient( 'theme_roots' );
    481475    if ( false === $theme_roots ) {
    482         get_themes();
    483         $theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme()
     476        search_theme_directories(); // Regenerate the transient.
     477        $theme_roots = get_site_transient( 'theme_roots' );
    484478    }
    485479    return $theme_roots;
Note: See TracChangeset for help on using the changeset viewer.