Definition:
function wp_dashboard_secondary_output() {}
Display secondary dashboard RSS widget feed.
Source code
function wp_dashboard_secondary_output() {
$widgets = get_option( 'dashboard_widget_options' );
@extract( @$widgets['dashboard_secondary'], EXTR_SKIP );
$rss = @fetch_feed( $url );
if ( is_wp_error($rss) ) {
if ( is_admin() || current_user_can('manage_options') ) {
echo '<div class="rss-widget"><p>';
printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message());
echo '</p></div>';
}
} elseif ( !$rss->get_item_quantity() ) {
$rss->__destruct();
unset($rss);
return false;
} else {
echo '<div class="rss-widget">';
wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] );
echo '</div>';
$rss->__destruct();
unset($rss);
}
}
3567

February 12, 2011 


No comments yet... Be the first to leave a reply!