projects/packages/lazy-images/tests/php/test_class.lazy-images.php 1 location
|
@@ 190-197 (lines=8) @@
|
187 |
|
$upload = wp_upload_bits( basename( $file ), null, $contents ); |
188 |
|
|
189 |
|
$type = ''; |
190 |
|
if ( ! empty( $upload['type'] ) ) { |
191 |
|
$type = $upload['type']; |
192 |
|
} else { |
193 |
|
$mime = wp_check_filetype( $upload['file'], null ); |
194 |
|
if ( $mime ) { |
195 |
|
$type = $mime['type']; |
196 |
|
} |
197 |
|
} |
198 |
|
|
199 |
|
$attachment = array( |
200 |
|
'post_title' => basename( $upload['file'] ), |
projects/plugins/jetpack/tests/php/attachment_test_case.php 1 location
|
@@ 27-33 (lines=7) @@
|
24 |
|
$upload = wp_upload_bits(basename($file), null, $contents); |
25 |
|
|
26 |
|
$type = ''; |
27 |
|
if ( ! empty($upload['type']) ) { |
28 |
|
$type = $upload['type']; |
29 |
|
} else { |
30 |
|
$mime = wp_check_filetype( $upload['file'] ); |
31 |
|
if ($mime) |
32 |
|
$type = $mime['type']; |
33 |
|
} |
34 |
|
|
35 |
|
$attachment = array( |
36 |
|
'post_title' => basename( $upload['file'] ), |
projects/packages/post-images/tests/php/test-post-images.php 1 location
|
@@ 546-553 (lines=8) @@
|
543 |
|
); |
544 |
|
|
545 |
|
$type = ''; |
546 |
|
if ( ! empty( $upload['type'] ) ) { |
547 |
|
$type = $upload['type']; |
548 |
|
} else { |
549 |
|
$mime = wp_check_filetype( $upload['file'], null ); |
550 |
|
if ( $mime ) { |
551 |
|
$type = $mime['type']; |
552 |
|
} |
553 |
|
} |
554 |
|
|
555 |
|
$attachment = array( |
556 |
|
'post_title' => basename( $upload['file'] ), |