Changes from trunk/wp-admin/includes/dashboard.php at r11450 to branches/2.8/wp-admin/includes/dashboard.php at r11614
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.8/wp-admin/includes/dashboard.php
r11450 r11614 606 606 607 607 function 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…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>'; 609 609 } 610 610 … … 635 635 echo "<ul>\n"; 636 636 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 ) { 639 641 $publisher = ''; 640 642 $site_link = ''; … … 645 647 646 648 $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 } 651 657 if ( $site_link ) 652 658 $publisher = "<a href='$site_link'>$publisher</a>"; … … 685 691 686 692 function 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…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>'; 688 694 } 689 695 … … 707 713 708 714 function 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…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>'; 710 716 } 711 717 … … 742 748 743 749 function 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…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>'; 749 751 } 750 752
Note: See TracChangeset
for help on using the changeset viewer.