Changeset 44528
- Timestamp:
- 01/10/2019 01:31:52 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r43642 r44528 3341 3341 3342 3342 /** 3343 * Retrieve metadata from a audio file's ID3 tags3343 * Retrieve metadata from an audio file's ID3 tags. 3344 3344 * 3345 3345 * @since 3.6.0 … … 3383 3383 if ( ! empty( $data['playtime_string'] ) ) { 3384 3384 $metadata['length_formatted'] = $data['playtime_string']; 3385 } 3386 3387 if ( empty( $metadata['created_timestamp'] ) ) { 3388 $created_timestamp = wp_get_media_creation_timestamp( $data ); 3389 3390 if ( false !== $created_timestamp ) { 3391 $metadata['created_timestamp'] = $created_timestamp; 3392 } 3385 3393 } 3386 3394 -
trunk/tests/phpunit/tests/media.php
r43571 r44528 2345 2345 2346 2346 /** 2347 * Test created timestamp is properly read from an MP4 file. 2348 * 2349 * This MP4 video file has an AAC audio track, so it can be used to test 2350 *`wp_read_audio_metadata()`. 2351 * 2352 * @ticket 42017 2353 */ 2354 function test_wp_read_audio_metadata_adds_creation_date_with_mp4() { 2355 $video = DIR_TESTDATA . '/uploads/small-video.mp4'; 2356 $metadata = wp_read_audio_metadata( $video ); 2357 2358 $this->assertEquals( 1269120551, $metadata['created_timestamp'] ); 2359 } 2360 2361 /** 2347 2362 * @ticket 35218 2348 2363 */
Note: See TracChangeset
for help on using the changeset viewer.