Code Duplication    Length = 11-11 lines in 2 locations

classes/class-lsx-wetu-importer.php 2 locations

@@ 651-661 (lines=11) @@
648
	 * @param $needle string
649
	 * @param $echo bool
650
	 */
651
	public function checked( $haystack = false, $needle = '', $echo = true ) {
652
		$return = $this->itemd( $haystack, $needle, 'checked', false );
653
654
		if ( '' !== $return ) {
655
			if ( true === $echo ) {
656
				echo wp_kses_post( $return );
657
			} else {
658
				return $return;
659
			}
660
		}
661
	}
662
663
	/**
664
	 * Checks to see if an item is checked.
@@ 670-680 (lines=11) @@
667
	 * @param $needle string
668
	 * @param $echo bool
669
	 */
670
	public function selected( $haystack = false, $needle = '', $echo = true ) {
671
		$return = $this->itemd( $haystack, $needle, 'selected' );
672
673
		if ( '' !== $return ) {
674
			if ( true === $echo ) {
675
				echo wp_kses_post( $return );
676
			} else {
677
				return $return;
678
			}
679
		}
680
	}
681
682
	/**
683
	 * Checks to see if an item is selected. If $echo is false,  it will return the $type if conditions are true.