Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r11614 r11450  
    606606
    607607function wp_dashboard_incoming_links() {
    608     echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
     608    wp_dashboard_cached_rss_widget( 'dashboard_incoming_links', 'wp_dashboard_incoming_links_output' );
    609609}
    610610
     
    635635    echo "<ul>\n";
    636636
    637     if ( !isset($items) )
    638         $items = 10;
    639 
    640     foreach ( $rss->get_items(0, $items) as $item ) {
     637    $count = 0;
     638    foreach ( $rss->get_items() as $item ) {
    641639        $publisher = '';
    642640        $site_link = '';
     
    647645
    648646        $author = $item->get_author();
    649         if ( $author ) {
    650             $site_link = esc_url( strip_tags( $author->get_link() ) );
    651 
    652             if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
    653                 $publisher = __( 'Somebody' );
    654         } else {
    655           $publisher = __( 'Somebody' );
    656         }
     647        $site_link = esc_url( strip_tags( $author->get_link() ) );
     648
     649        if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
     650            $publisher = __( 'Somebody' );
    657651        if ( $site_link )
    658652            $publisher = "<a href='$site_link'>$publisher</a>";
     
    691685
    692686function wp_dashboard_primary() {
    693     echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
     687    wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_rss_output' );
    694688}
    695689
     
    713707
    714708function wp_dashboard_secondary() {
    715     echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
     709    wp_dashboard_cached_rss_widget( 'dashboard_secondary', 'wp_dashboard_secondary_output' );
    716710}
    717711
     
    748742
    749743function wp_dashboard_plugins() {
    750     echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
     744    wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array(
     745        'http://wordpress.org/extend/plugins/rss/browse/popular/',
     746        'http://wordpress.org/extend/plugins/rss/browse/new/',
     747        'http://wordpress.org/extend/plugins/rss/browse/updated/'
     748    ) );
    751749}
    752750
Note: See TracChangeset for help on using the changeset viewer.