Code Duplication    Length = 7-7 lines in 2 locations

classes/class-wetu-importer-banner-integration.php 1 location

@@ 266-272 (lines=7) @@
263
		}
264
265
		// set additional wp_posts columns
266
		if ( empty( $post_data['post_title'] ) ) {
267
			$url_filename = str_replace( '%20',' ',$url_filename );
268
			$post_data['post_title'] = basename( $url_filename, '.' . $url_type['ext'] );         // just use the original filename (no extension)
269
		}
270
271
		// make sure gets tied to parent
272
		if ( empty( $post_data['post_parent'] ) ) {
273
			// @codingStandardsIgnoreLine
274
			$post_data['post_parent'] = $_POST['post_id'];
275
		}

classes/class-wetu-importer.php 1 location

@@ 1122-1128 (lines=7) @@
1119
		}
1120
1121
		// set additional wp_posts columns
1122
		if ( empty( $post_data['post_title'] ) ) {
1123
1124
			$url_filename = str_replace( '%20',' ',$url_filename );
1125
1126
			$post_data['post_title'] = basename( $url_filename, '.' . $url_type['ext'] );         // just use the original filename (no extension)
1127
		}
1128
1129
		// make sure gets tied to parent
1130
		if ( empty( $post_data['post_parent'] ) ) {
1131
			$post_data['post_parent'] = $post_id;