Code Duplication    Length = 5-5 lines in 2 locations

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

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

classes/class-wetu-importer.php 1 location

@@ 1117-1121 (lines=5) @@
1114
		// assemble file data (should be built like $_FILES since wp_handle_sideload() will be using)
1115
		$file_array['tmp_name'] = $tmp;                                                         // full server path to temp file
1116
1117
		if ( ! empty( $filename ) && ' ' != $filename ) {
1118
			$file_array['name'] = $filename . '.' . $url_type['ext'];                           // user given filename for title, add original URL extension
1119
		} else {
1120
			$file_array['name'] = $url_filename;                                                // just use original URL filename
1121
		}
1122
1123
		// set additional wp_posts columns
1124
		if ( empty( $post_data['post_title'] ) ) {