Code Duplication    Length = 9-9 lines in 2 locations

includes/class-sensei-course.php 1 location

@@ 395-403 (lines=9) @@
392
			return $post_id;
393
		} // End If Statement
394
395
		if ( 'page' == $_POST['post_type'] ) {
396
			if ( ! current_user_can( 'edit_page', $post_id ) ) {
397
				return $post_id;
398
			} // End If Statement
399
		} else {
400
			if ( ! current_user_can( 'edit_post', $post_id ) ) {
401
				return $post_id;
402
			} // End If Statement
403
		} // End If Statement
404
405
		// Save the post meta data fields
406
		if ( isset($this->meta_fields) && is_array($this->meta_fields) ) {

includes/class-sensei-lesson.php 1 location

@@ 260-268 (lines=9) @@
257
		} // End If Statement
258
259
		// Check if the current post type is a page
260
		if ( 'page' == $_POST[ 'post_type' ] ) {
261
262
			if ( ! current_user_can( 'edit_page', $post_id ) ) {
263
264
				return $post_id;
265
266
			} // End If Statement
267
		} else {
268
			if ( ! current_user_can( 'edit_post', $post_id ) ) {
269
				return $post_id;
270
			} // End If Statement
271
		} // End If Statement