mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Media: Revert the addition of a $size parameter to get_attached_file().
Reverts [55199], [55202], and [55217] but keeps the updated docs. Props: flixos90, joedolson, azaozz. Fixes: #51780. git-svn-id: https://develop.svn.wordpress.org/trunk@55437 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -18,7 +18,6 @@ class Tests_Media_wpGenerateAttachmentMetadata extends WP_UnitTestCase {
|
||||
* Tests that filesize meta is generated for JPEGs.
|
||||
*
|
||||
* @ticket 49412
|
||||
* @ticket 51780
|
||||
*
|
||||
* @covers ::wp_create_image_subsizes
|
||||
*/
|
||||
@@ -29,11 +28,10 @@ class Tests_Media_wpGenerateAttachmentMetadata extends WP_UnitTestCase {
|
||||
|
||||
$this->assertSame( wp_filesize( get_attached_file( $attachment ) ), $metadata['filesize'] );
|
||||
|
||||
foreach ( $metadata['sizes'] as $size => $intermediate_size ) {
|
||||
foreach ( $metadata['sizes'] as $intermediate_size ) {
|
||||
$this->assertArrayHasKey( 'filesize', $intermediate_size );
|
||||
$this->assertNotEmpty( $intermediate_size['filesize'] );
|
||||
$this->assertIsNumeric( $intermediate_size['filesize'] );
|
||||
$this->assertStringContainsString( $intermediate_size['file'], get_attached_file( $attachment, false, $size ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user