Summery Summery
Parse creation date from media metadata.
Syntax Syntax
Description Description
The getID3 library doesn’t have a standard method for getting creation dates, so the location of this data can vary based on the MIME type.
Parameters Parameters
- $metadata
-
(Required) The metadata returned by getID3::analyze().
Return Return
(int|bool) A UNIX timestamp for the media's creation date if available or a boolean FALSE if a timestamp could not be determined.
Source Source
File: wp-admin/includes/media.php
$metadata[ $key ] = wp_kses_post( reset( $list ) );
// Fix bug in byte stream analysis.
if ( 'terms_of_use' === $key && 0 === strpos( $metadata[ $key ], 'yright notice.' ) ) {
$metadata[ $key ] = 'Cop' . $metadata[ $key ];
}
}
}
break;
}
}
if ( ! empty( $data['id3v2']['APIC'] ) ) {
$image = reset( $data['id3v2']['APIC'] );
if ( ! empty( $image['data'] ) ) {
$metadata['image'] = array(
'data' => $image['data'],
'mime' => $image['image_mime'],
'width' => $image['image_width'],
'height' => $image['image_height'],
);
}
} elseif ( ! empty( $data['comments']['picture'] ) ) {
$image = reset( $data['comments']['picture'] );
if ( ! empty( $image['data'] ) ) {
$metadata['image'] = array(
'data' => $image['data'],
'mime' => $image['image_mime'],
);
}
}
}
/**
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |