20) { $show_items = 6; } if(is_wp_error($rss)) { if(is_admin() OR current_user_can('manage_options')) { $output = '

' . __('RSS Error:') . ' ' . esc_html($rss->get_error_message()) . '

'; return $output; } return; } if(!$rss->get_item_quantity()) { $output = ''; $rss->__destruct(); unset($rss); return $output; } // Prepare output $feed_output = ''; // Cache output set_transient('ajdg_news_feeds', $feed_output, 86400); // Cleanup $rss->__destruct(); unset( $rss ); // Done! return $feed_output; } }