diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 01471aada..e0fb26b6a 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -698,12 +698,19 @@ function wp_dashboard_secondary_output() { @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); $rss = @fetch_feed( $url ); - if ( !$rss->get_item_quantity() ) + if ( is_wp_error($rss) ) { + if ( is_admin() || current_user_can('manage_options') ) { + echo '
'; + } + } elseif ( !$rss->get_item_quantity() ) { return false; - - echo " "; + } else { + echo ' '; + } } function wp_dashboard_plugins() { diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 537a99497..1bb8522ae 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -1549,6 +1549,15 @@ function wp_widget_rss_output( $rss, $args = array() ) { return; } + if ( is_wp_error($rss) ) { + if ( is_admin() || current_user_can('manage_options') ) { + echo ''; + printf(__('RSS Error: %s'), $rss->get_error_message()); + echo '
'; + } + return; + } + $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 ); $args = wp_parse_args( $args, $default_args ); extract( $args, EXTR_SKIP );