Make WordPress Core


Ignore:
Timestamp:
02/06/2009 06:06:20 PM (16 years ago)
Author:
ryan
Message:

Use transient for update_core, update_plugins, update_themes. see #9048

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r10150 r10515  
    3434    $dismissed = get_option( 'dismissed_update_core' );
    3535    if ( !is_array( $dismissed ) ) $dismissed = array();
    36     $from_api = get_option( 'update_core' );
     36    $from_api = get_transient( 'update_core' );
    3737    if ( empty($from_api) )
    3838        return false;
     
    7272
    7373function find_core_update( $version, $locale ) {
    74     $from_api = get_option( 'update_core' );
     74    $from_api = get_transient( 'update_core' );
    7575    if ( !is_array( $from_api->updates ) ) return false;
    7676    $updates = $from_api->updates;
     
    147147
    148148function wp_plugin_update_row( $file, $plugin_data ) {
    149     $current = get_option( 'update_plugins' );
     149    $current = get_transient( 'update_plugins' );
    150150    if ( !isset( $current->response[ $file ] ) )
    151151        return false;
     
    174174
    175175    // Is an update available?
    176     $current = get_option( 'update_plugins' );
     176    $current = get_transient( 'update_plugins' );
    177177    if ( !isset( $current->response[ $plugin ] ) )
    178178        return new WP_Error('up_to_date', __('The plugin is at the latest version.'));
     
    269269
    270270    // Force refresh of plugin update information
    271     delete_option('update_plugins');
     271    delete_transient('update_plugins');
    272272
    273273    if( empty($filelist) )
Note: See TracChangeset for help on using the changeset viewer.