Code Duplication    Length = 5-6 lines in 3 locations

includes/class-sensei-course.php 1 location

@@ 555-559 (lines=5) @@
552
				echo $id;
553
			break;
554
555
			case 'course-prerequisite':
556
				$course_prerequisite_id = get_post_meta( $id, '_course_prerequisite', true);
557
				if ( 0 < absint( $course_prerequisite_id ) ) { echo '<a href="' . esc_url( get_edit_post_link( absint( $course_prerequisite_id ) ) ) . '" title="' . esc_attr( sprintf( __( 'Edit %s', 'woothemes-sensei' ), get_the_title( absint( $course_prerequisite_id ) ) ) ) . '">' . get_the_title( absint( $course_prerequisite_id ) ) . '</a>'; }
558
559
			break;
560
561
			case 'course-woocommerce-product':
562
				if ( Sensei_WC::is_woocommerce_active() ) {

includes/class-sensei-lesson.php 2 locations

@@ 1800-1805 (lines=6) @@
1797
			case 'id':
1798
				echo $id;
1799
			break;
1800
			case 'lesson-course':
1801
				$lesson_course_id = get_post_meta( $id, '_lesson_course', true);
1802
				if ( 0 < absint( $lesson_course_id ) ) {
1803
					echo '<a href="' . esc_url( get_edit_post_link( absint( $lesson_course_id ) ) ) . '" title="' . esc_attr( sprintf( __( 'Edit %s', 'woothemes-sensei' ), get_the_title( absint( $lesson_course_id ) ) ) ) . '">' . get_the_title( absint( $lesson_course_id ) ) . '</a>';
1804
				} // End If Statement
1805
			break;
1806
			case 'lesson-prerequisite':
1807
				$lesson_prerequisite_id = get_post_meta( $id, '_lesson_prerequisite', true);
1808
				if ( 0 < absint( $lesson_prerequisite_id ) ) {
@@ 1806-1811 (lines=6) @@
1803
					echo '<a href="' . esc_url( get_edit_post_link( absint( $lesson_course_id ) ) ) . '" title="' . esc_attr( sprintf( __( 'Edit %s', 'woothemes-sensei' ), get_the_title( absint( $lesson_course_id ) ) ) ) . '">' . get_the_title( absint( $lesson_course_id ) ) . '</a>';
1804
				} // End If Statement
1805
			break;
1806
			case 'lesson-prerequisite':
1807
				$lesson_prerequisite_id = get_post_meta( $id, '_lesson_prerequisite', true);
1808
				if ( 0 < absint( $lesson_prerequisite_id ) ) {
1809
					echo '<a href="' . esc_url( get_edit_post_link( absint( $lesson_prerequisite_id ) ) ) . '" title="' . esc_attr( sprintf( __( 'Edit %s', 'woothemes-sensei' ), get_the_title( absint( $lesson_prerequisite_id ) ) ) ) . '">' . get_the_title( absint( $lesson_prerequisite_id ) ) . '</a>';
1810
				} // End If Statement
1811
			break;
1812
			default:
1813
			break;
1814
		} // End Switch Statement