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

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