| @@ 250-257 (lines=8) @@ | ||
| 247 | // assemble file data (should be built like $_FILES since wp_handle_sideload() will be using) | |
| 248 | $file_array['tmp_name'] = $tmp; // full server path to temp file | |
| 249 | ||
| 250 | if ( !empty( $filename) && " " != $filename ) | |
| 251 | 		{ | |
| 252 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension | |
| 253 | } | |
| 254 | else | |
| 255 | 		{ | |
| 256 | $file_array['name'] = $url_filename; // just use original URL filename | |
| 257 | } | |
| 258 | ||
| 259 | // set additional wp_posts columns | |
| 260 | if ( empty( $post_data['post_title'] ) ) | |
| @@ 1242-1249 (lines=8) @@ | ||
| 1239 | // assemble file data (should be built like $_FILES since wp_handle_sideload() will be using) | |
| 1240 | $file_array['tmp_name'] = $tmp; // full server path to temp file | |
| 1241 | ||
| 1242 | if ( !empty( $filename) && " " != $filename ) | |
| 1243 | 		{ | |
| 1244 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension | |
| 1245 | } | |
| 1246 | else | |
| 1247 | 		{ | |
| 1248 | $file_array['name'] = $url_filename; // just use original URL filename | |
| 1249 | } | |
| 1250 | ||
| 1251 | // set additional wp_posts columns | |
| 1252 | if ( empty( $post_data['post_title'] ) ) | |