mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Add RSS Error handling functionality to RSS Widget displays. Props DD32. fixes #9273
git-svn-id: https://develop.svn.wordpress.org/trunk@10697 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 '<p>';
|
||||
printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message());
|
||||
echo '</p>';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 );
|
||||
$args = wp_parse_args( $args, $default_args );
|
||||
extract( $args, EXTR_SKIP );
|
||||
|
||||
Reference in New Issue
Block a user