WordPress.org

Make WordPress Core

Changeset 17766


Ignore:
Timestamp:
04/29/11 14:46:27 (4 years ago)
Author:
nacin
Message:

Revert unrelated code from [17765].

File:
1 edited

Legend:

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

    r17765 r17766  
    926926 */ 
    927927function wp_dashboard_plugins_output() { 
    928     ob_start(); 
    929     $check_urls = array( 
    930         'http://wordpress.org/extend/plugins/rss/browse/popular/', 
    931         'http://wordpress.org/extend/plugins/rss/browse/new/', 
    932         'http://wordpress.org/extend/plugins/rss/browse/updated/' 
    933     ); 
    934     $transient_key = __FUNCTION__ . serialize( '' ) . implode( '|', $check_urls ); 
    935  
    936     $popular = fetch_feed( $check_urls[0] ); 
    937     $new     = fetch_feed( $check_urls[1] ); 
    938     $updated = fetch_feed( $check_urls[2] ); 
     928    $popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); 
     929    $new     = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' ); 
     930    $updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' ); 
    939931 
    940932    if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { 
     
    1007999        unset($$feed); 
    10081000    } 
    1009     set_transient( $transient_key, ob_get_flush() ); 
    10101001} 
    10111002 
     
    10281019    $loading = '<p class="widget-loading">' . __( 'Loading&#8230;' ) . '</p>'; 
    10291020 
    1030     $widgets = get_option( 'dashboard_widget_options' ); 
    1031     $output_cache = 'dashboard_' . md5( $callback . serialize( isset( $widgets[$widget_id] ) ? $widgets[$widget_id] : '' ) . implode( '|', $check_urls ) ); 
    1032  
    10331021    if ( empty($check_urls) ) { 
     1022        $widgets = get_option( 'dashboard_widget_options' ); 
    10341023        if ( empty($widgets[$widget_id]['url']) ) { 
    10351024            echo $loading; 
    1036             delete_transient( $output_cache ); 
    10371025            return false; 
    10381026        } 
     
    10451033        if ( ! $cache->load() ) { 
    10461034            echo $loading; 
    1047             delete_transient( $output_cache ); 
    10481035            return false; 
    10491036        } 
    10501037    } 
    10511038 
    1052     if ( false === $cache = get_transient( $output_cache ) ) { 
    1053         echo $loading; 
    1054         return false; 
    1055     } 
    1056  
    1057     echo $cache; 
    1058     return true; 
    1059     /*       
    10601039    if ( $callback && is_callable( $callback ) ) { 
    10611040        $args = array_slice( func_get_args(), 2 ); 
     
    10651044 
    10661045    return true; 
    1067     */ 
    10681046} 
    10691047 
Note: See TracChangeset for help on using the changeset viewer.