| @@ 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'] ) ) |
|
| @@ 1211-1218 (lines=8) @@ | ||
| 1208 | // assemble file data (should be built like $_FILES since wp_handle_sideload() will be using) |
|
| 1209 | $file_array['tmp_name'] = $tmp; // full server path to temp file |
|
| 1210 | ||
| 1211 | if ( !empty( $filename) && " " != $filename ) |
|
| 1212 | { |
|
| 1213 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension |
|
| 1214 | } |
|
| 1215 | else |
|
| 1216 | { |
|
| 1217 | $file_array['name'] = $url_filename; // just use original URL filename |
|
| 1218 | } |
|
| 1219 | ||
| 1220 | // set additional wp_posts columns |
|
| 1221 | if ( empty( $post_data['post_title'] ) ) |
|