Make WordPress Core


Ignore:
Timestamp:
10/29/2009 09:53:57 PM (15 years ago)
Author:
ryan
Message:

Introduce get/set/delete_site_transient(). Make theme_roots a site transient.

File:
1 edited

Legend:

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

    r12124 r12128  
    399399
    400400    /* Store theme roots in the DB */
    401     if ( get_transient( 'theme_roots' ) != $theme_roots )
    402         set_transient( 'theme_roots', $theme_roots, 7200 ); // cache for two hours
     401    if ( get_site_transient( 'theme_roots' ) != $theme_roots )
     402        set_site_transient( 'theme_roots', $theme_roots, 7200 ); // cache for two hours
    403403
    404404    foreach ( (array) $theme_names as $theme_name ) {
     
    427427 */
    428428function get_theme_roots() {
    429     $theme_roots = get_transient( 'theme_roots' );
     429    $theme_roots = get_site_transient( 'theme_roots' );
    430430    if ( false === $theme_roots ) {
    431431        get_themes();
    432         $theme_roots = get_transient( 'theme_roots' ); // this is set in get_theme()
     432        $theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme()
    433433    }
    434434    return $theme_roots;
Note: See TracChangeset for help on using the changeset viewer.