Code Duplication    Length = 21-21 lines in 2 locations

widgets/widget-woothemes-sensei-category-courses.php 1 location

@@ 177-197 (lines=21) @@
174
175
		if ( count( $posts_array ) > 0 ) { ?>
176
			<ul>
177
			<?php foreach ($posts_array as $post_item){
178
		    	$post_id = absint( $post_item->ID );
179
		    	$post_title = $post_item->post_title;
180
		    	$user_info = get_userdata( absint( $post_item->post_author ) );
181
		    	$author_link = get_author_posts_url( absint( $post_item->post_author ) );
182
		    	$author_display_name = $user_info->display_name;
183
		    	$author_id = $post_item->post_author;
184
		    ?>
185
		    	<li class="fix">
186
		    		<?php do_action( 'sensei_course_image', $post_id ); ?>
187
		    		<a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a>
188
		    		<br />
189
		    		<?php if ( isset( Sensei()->settings->settings[ 'course_author' ] ) && ( Sensei()->settings->settings[ 'course_author' ] ) ) { ?>
190
    					<span class="course-author"><?php _e( 'by ', 'woothemes-sensei' ); ?><a href="<?php echo esc_url( $author_link ); ?>" title="<?php echo esc_attr( $author_display_name ); ?>"><?php echo esc_html( $author_display_name ); ?></a></span>
191
    					<br />
192
    				<?php } // End If Statement ?>
193
    				<span class="course-lesson-count"><?php echo Sensei()->course->course_lesson_count( $post_id ) . '&nbsp;' .  __( 'Lessons', 'woothemes-sensei' ); ?></span>
194
    				<br />
195
    				<?php sensei_simple_course_price( $post_id ); ?>
196
		    	</li>
197
		    <?php } // End For Loop ?>
198
			</ul>
199
		<?php } // End If Statement
200
	} // End load_component()

widgets/widget-woothemes-sensei-course-component.php 1 location

@@ 271-291 (lines=21) @@
268
		<ul>
269
			<?php
270
271
			foreach ($courses as $course) {
272
273
				$post_id = absint( $course->ID );
274
				$post_title = $course->post_title;
275
				$user_info = get_userdata( absint( $course->post_author ) );
276
				$author_link = get_author_posts_url( absint( $course->post_author ) );
277
				$author_display_name = $user_info->display_name;
278
				$author_id = $course->post_author;
279
				?>
280
281
				<li class="fix">
282
283
					<?php do_action( 'sensei_course_image', $post_id ); ?>
284
285
					<a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>"
286
					   title="<?php echo esc_attr( $post_title ); ?>">
287
288
						<?php echo $post_title; ?>
289
290
					</a>
291
					<br />
292
293
					<?php if ( isset( Sensei()->settings->settings[ 'course_author' ] ) && ( Sensei()->settings->settings[ 'course_author' ] ) ) { ?>
294
						<span class="course-author">