Code Duplication    Length = 7-7 lines in 2 locations

includes/class-sensei-frontend.php 2 locations

@@ 669-675 (lines=7) @@
666
667
		$html = '<section class="sensei-breadcrumb">' . $sensei_breadcrumb_prefix;
668
		// Lesson
669
		if ( is_singular( 'lesson' ) && 0 < intval( $id ) ) {
670
			$course_id = intval( get_post_meta( $id, '_lesson_course', true ) );
671
			if( ! $course_id ) {
672
				return;
673
			}
674
			$html .= '<a href="' . esc_url( get_permalink( $course_id ) ) . '" title="' . __( 'Back to the course', 'woothemes-sensei' ) . '">' . get_the_title( $course_id ) . '</a>';
675
    	} // End If Statement
676
    	// Quiz
677
		if ( is_singular( 'quiz' ) && 0 < intval( $id ) ) {
678
			$lesson_id = intval( get_post_meta( $id, '_quiz_lesson', true ) );
@@ 677-683 (lines=7) @@
674
			$html .= '<a href="' . esc_url( get_permalink( $course_id ) ) . '" title="' . __( 'Back to the course', 'woothemes-sensei' ) . '">' . get_the_title( $course_id ) . '</a>';
675
    	} // End If Statement
676
    	// Quiz
677
		if ( is_singular( 'quiz' ) && 0 < intval( $id ) ) {
678
			$lesson_id = intval( get_post_meta( $id, '_quiz_lesson', true ) );
679
			if( ! $lesson_id ) {
680
				return;
681
			}
682
			 $html .= '<a href="' . esc_url( get_permalink( $lesson_id ) ) . '" title="' .  __( 'Back to the lesson', 'woothemes-sensei' ) . '">' . get_the_title( $lesson_id ) . '</a>';
683
    	} // End If Statement
684
685
    	// Allow other plugins to filter html
686
    	$html = apply_filters ( 'sensei_breadcrumb_output', $html, $separator );