Code Duplication    Length = 10-13 lines in 3 locations

modules/zillow/widgets/class-zillow-widgets.php 3 locations

@@ 358-370 (lines=13) @@
355
		 * @param string $size (default: ' wide')
356
		 * @return void
357
		 */
358
		public function get_expensive_homes_widget( $iframe_id = '', $location, $type = 'iframe', $size = ' wide' ) {
359
360
			// TODO - Check for HTTPS, as this widget does not support it.
361
			// TODO - Support JS Version.
362
363
			echo '<div class="zillow-listings-widget-container zillow-meh-widget-container">';
364
			echo '<h5>Most Expensive Homes in ' . $location . '</h5>';
365
			echo '<div class="zillow-meh-outer">';
366
			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'expensive-homes' ) .'" title="'. __( 'Zillow Most Expensive Homes', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=meh-large-iframe-widget-container&type='. $type .'&size='.$size.'&rn='. $location .'&widgettype=meh" width="" height="121" frameborder="0" style="width:100%;"></iframe>';
367
			echo '</div>';
368
			echo '<img alt="Zillow Real Estate" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />';
369
			echo '</div>';
370
		}
371
372
		/**
373
		 * Get Newest For Sale Homes Widget.
@@ 382-392 (lines=11) @@
379
		 * @param string $size (default: ' wide')
380
		 * @return void
381
		 */
382
		public function get_newest_forsale_homes_widget( $iframe_id = '', $location, $type = 'iframe', $size = ' wide' ) {
383
384
			// TODO - Check for HTTPS, as this widget does not support it.
385
			// TODO - Support JS Version.
386
387
			echo '<div class="zillow-listings-widget-container zillow-nfs-widget-container">';
388
			echo '<h5>Newest For Sale Homes in ' . $location . '</h5>';
389
			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'newest-homes' ) .'" title="'. __( 'Zillow Newest For Sale Homes', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=nfs-large-iframe-widget-container&type='. $type .'&size='.$size.'&rn='. $location .'&widgettype=nfs" width="286" height="123" frameborder="0"></iframe>';
390
			echo '<img alt="Zillow Real Estate" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />';
391
			echo '</div>';
392
		}
393
394
		/**
395
		 * get_zillow_search_widget function.
@@ 424-433 (lines=10) @@
421
		 * @param string $include_home_val_info (default: 'yes')
422
		 * @return void
423
		 */
424
		public function get_lg_zillow_search_widget( $iframe_id = '', $zillow_screenname, $type = 'iframe', $region_name, $include_home_val_info = 'yes' ) {
425
426
			echo '<div class="zillow-large-search-box-widget-container">';
427
			echo '	<h2>Find Homes</h2>';
428
			echo '	<div style="float:right;">';
429
			echo '		<img alt="Zillow Real Estate Information" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />';
430
			echo '	</div>';
431
			echo '	<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'lg-search' ) .'" scrolling="no" title="'. __( 'Zillow Search', 're-pro' ) .'" src="https://www.zillow.com/widgets/search/LargeSearchBoxWidget.htm?did=zillow-large-search-box-iframe-widget&scrnname='.$zillow_screenname.'&type='.$type.'&rgname='.$region_name.'&shvi='.$include_home_val_info.'" width="430" frameborder="0" height="400"></iframe>';
432
			echo '</div>';
433
		}
434
435
		/* POLLS & QUIZZES. */
436