Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r11450 r11614  
    606606
    607607function wp_dashboard_incoming_links() {
    608     wp_dashboard_cached_rss_widget( 'dashboard_incoming_links', 'wp_dashboard_incoming_links_output' );
     608    echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
    609609}
    610610
     
    635635    echo "<ul>\n";
    636636
    637     $count = 0;
    638     foreach ( $rss->get_items() as $item ) {
     637    if ( !isset($items) )
     638        $items = 10;
     639
     640    foreach ( $rss->get_items(0, $items) as $item ) {
    639641        $publisher = '';
    640642        $site_link = '';
     
    645647
    646648        $author = $item->get_author();
    647         $site_link = esc_url( strip_tags( $author->get_link() ) );
    648 
    649         if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
    650             $publisher = __( 'Somebody' );
     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        }
    651657        if ( $site_link )
    652658            $publisher = "<a href='$site_link'>$publisher</a>";
     
    685691
    686692function wp_dashboard_primary() {
    687     wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_rss_output' );
     693    echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
    688694}
    689695
     
    707713
    708714function wp_dashboard_secondary() {
    709     wp_dashboard_cached_rss_widget( 'dashboard_secondary', 'wp_dashboard_secondary_output' );
     715    echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
    710716}
    711717
     
    742748
    743749function wp_dashboard_plugins() {
    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     ) );
     750    echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
    749751}
    750752
Note: See TracChangeset for help on using the changeset viewer.