Make WordPress Core


Ignore:
Timestamp:
03/04/2009 07:24:48 PM (15 years ago)
Author:
ryan
Message:

Add RSS Error handling functionality to RSS Widget displays. Props DD32. fixes #9273

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/widgets.php

    r10688 r10697  
    15471547            return;
    15481548    } elseif ( !is_object($rss) ) {
     1549        return;
     1550    }
     1551
     1552    if ( is_wp_error($rss) ) {
     1553        if ( is_admin() || current_user_can('manage_options') ) {
     1554            echo '<p>';
     1555            printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message());
     1556            echo '</p>';
     1557        }
    15491558        return;
    15501559    }
Note: See TracChangeset for help on using the changeset viewer.