tests/lib/wordpress-tests-lib/includes/factory.php 1 location
|
@@ 103-109 (lines=7) @@
|
| 100 |
|
$upload = wp_upload_bits(basename($file), null, $contents); |
| 101 |
|
|
| 102 |
|
$type = ''; |
| 103 |
|
if ( ! empty($upload['type']) ) { |
| 104 |
|
$type = $upload['type']; |
| 105 |
|
} else { |
| 106 |
|
$mime = wp_check_filetype( $upload['file'] ); |
| 107 |
|
if ($mime) |
| 108 |
|
$type = $mime['type']; |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
$attachment = array( |
| 112 |
|
'post_title' => basename( $upload['file'] ), |
tests/lib/wordpress-tests-lib/includes/testcase.php 1 location
|
@@ 701-707 (lines=7) @@
|
| 698 |
|
|
| 699 |
|
function _make_attachment($upload, $parent_post_id = 0) { |
| 700 |
|
$type = ''; |
| 701 |
|
if ( !empty($upload['type']) ) { |
| 702 |
|
$type = $upload['type']; |
| 703 |
|
} else { |
| 704 |
|
$mime = wp_check_filetype( $upload['file'] ); |
| 705 |
|
if ($mime) |
| 706 |
|
$type = $mime['type']; |
| 707 |
|
} |
| 708 |
|
|
| 709 |
|
$attachment = array( |
| 710 |
|
'post_title' => basename( $upload['file'] ), |