X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9c40b4d36daed9e28e48a5fe9205c32557195a4b..4f4e083f6f77639c41e2b1ddb200de8e34301cee:/wp-admin/includes/dashboard.php
diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index ec93fb0d..56c5581e 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -605,7 +605,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
}
function wp_dashboard_incoming_links() {
- wp_dashboard_cached_rss_widget( 'dashboard_incoming_links', 'wp_dashboard_incoming_links_output' );
+ echo '
' . __( 'Loading…' ) . '
' . __('This widget requires JavaScript.') . '
';
}
/**
@@ -634,8 +634,10 @@ function wp_dashboard_incoming_links_output() {
echo "\n";
- $count = 0;
- foreach ( $rss->get_items() as $item ) {
+ if ( !isset($items) )
+ $items = 10;
+
+ foreach ( $rss->get_items(0, $items) as $item ) {
$publisher = '';
$site_link = '';
$link = '';
@@ -644,10 +646,14 @@ function wp_dashboard_incoming_links_output() {
$link = esc_url( strip_tags( $item->get_link() ) );
$author = $item->get_author();
- $site_link = esc_url( strip_tags( $author->get_link() ) );
+ if ( $author ) {
+ $site_link = esc_url( strip_tags( $author->get_link() ) );
- if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
- $publisher = __( 'Somebody' );
+ if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
+ $publisher = __( 'Somebody' );
+ } else {
+ $publisher = __( 'Somebody' );
+ }
if ( $site_link )
$publisher = "$publisher";
else
@@ -684,7 +690,7 @@ function wp_dashboard_incoming_links_control() {
}
function wp_dashboard_primary() {
- wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_rss_output' );
+ echo '' . __( 'Loading…' ) . '
' . __('This widget requires JavaScript.') . '
';
}
function wp_dashboard_primary_control() {
@@ -706,7 +712,7 @@ function wp_dashboard_rss_output( $widget_id ) {
}
function wp_dashboard_secondary() {
- wp_dashboard_cached_rss_widget( 'dashboard_secondary', 'wp_dashboard_secondary_output' );
+ echo '' . __( 'Loading…' ) . '
' . __('This widget requires JavaScript.') . '
';
}
function wp_dashboard_secondary_control() {
@@ -741,11 +747,7 @@ function wp_dashboard_secondary_output() {
}
function wp_dashboard_plugins() {
- wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array(
- 'http://wordpress.org/extend/plugins/rss/browse/popular/',
- 'http://wordpress.org/extend/plugins/rss/browse/new/',
- 'http://wordpress.org/extend/plugins/rss/browse/updated/'
- ) );
+ echo '' . __( 'Loading…' ) . '
' . __('This widget requires JavaScript.') . '
';
}
/**