Code Duplication    Length = 4-4 lines in 2 locations

classes/autoptimizeConfig.php 1 location

@@ 831-834 (lines=4) @@
828
            $rss = fetch_feed( $url );
829
            $maxitems = 0;
830
831
            if ( ! is_wp_error( $rss ) ) {
832
                $maxitems = $rss->get_item_quantity( 7 );
833
                $rss_items = $rss->get_items( 0, $maxitems );
834
            }
835
            ?>
836
            <ul>
837
                <?php if ( $maxitems == 0 ) : ?>

classes/autoptimizePartners.php 1 location

@@ 59-62 (lines=4) @@
56
            $rss      = fetch_feed( 'http://feeds.feedburner.com/OptimizingMattersDownloads' );
57
            $maxitems = 0;
58
59
            if ( ! is_wp_error( $rss ) ) {
60
                $maxitems  = $rss->get_item_quantity( 20 );
61
                $rss_items = $rss->get_items( 0, $maxitems );
62
            }
63
64
            if ( 0 == $maxitems ) {
65
                $output .= $no_feed_text;