Code Duplication    Length = 4-11 lines in 2 locations

includes/class-sensei-course.php 1 location

@@ 1939-1949 (lines=11) @@
1936
        $preview_lesson_count = intval( Sensei()->course->course_lesson_preview_count( $course->ID ) );
1937
        $is_user_taking_course = Sensei_Utils::user_started_course( $course->ID, get_current_user_id() );
1938
1939
        if ( 0 < $preview_lesson_count && !$is_user_taking_course ) {
1940
            ?>
1941
            <p class="sensei-free-lessons">
1942
                <a href="<?php echo get_permalink(); ?>">
1943
                    <?php _e( 'Preview this course', 'woothemes-sensei' ) ?>
1944
                </a>
1945
                - <?php echo sprintf( __( '(%d preview lessons)', 'woothemes-sensei' ), $preview_lesson_count ) ; ?>
1946
            </p>
1947
1948
        <?php
1949
        }
1950
    }
1951
1952
    /**

includes/class-sensei-frontend.php 1 location

@@ 987-990 (lines=4) @@
984
		   	<?php sensei_simple_course_price( $post_id ); ?>
985
        	</p>
986
        	<p class="course-excerpt"><?php the_excerpt(); ?></p>
987
        	<?php if ( 0 < $free_lesson_count ) {
988
                $free_lessons = sprintf( __( 'You can access %d of this course\'s lessons for free', 'woothemes-sensei' ), $free_lesson_count ); ?>
989
                <p class="sensei-free-lessons"><a href="<?php echo get_permalink( $post_id ); ?>"><?php _e( 'Preview this course', 'woothemes-sensei' ) ?></a> - <?php echo $free_lessons; ?></p>
990
            <?php } ?>
991
		</section><?php
992
	} // End sensei_course_archive_meta()
993