Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 258-262 (lines=5) @@
255
		// assemble file data (should be built like $_FILES since wp_handle_sideload() will be using)
256
		$file_array['tmp_name'] = $tmp;                                                         // full server path to temp file
257
258
		if ( ! empty( $filename ) && ' ' != $filename ) {
259
			$file_array['name'] = $filename . '.' . $url_type['ext'];                           // user given filename for title, add original URL extension
260
		} else {
261
			$file_array['name'] = $url_filename;                                                // just use original URL filename
262
		}
263
264
		// set additional wp_posts columns
265
		if ( empty( $post_data['post_title'] ) ) {

classes/class-lsx-wetu-importer.php 1 location

@@ 1146-1150 (lines=5) @@
1143
		// assemble file data (should be built like $_FILES since wp_handle_sideload() will be using)
1144
		$file_array['tmp_name'] = $tmp;                                                         // full server path to temp file
1145
1146
		if ( ! empty( $filename ) && ' ' != $filename ) {
1147
			$file_array['name'] = $filename . '.' . $url_type['ext'];                           // user given filename for title, add original URL extension
1148
		} else {
1149
			$file_array['name'] = $url_filename;                                                // just use original URL filename
1150
		}
1151
1152
		// set additional wp_posts columns
1153
		if ( empty( $post_data['post_title'] ) ) {