Skip to content

Commit a560641

Browse files
Docs: Document that the $file_format parameter of metadata filters can be null.
This affects the `wp_read_video_metadata` and `wp_read_audio_metadata` filters. Follow-up to [41746], [53764]. See #55646, #55828. git-svn-id: https://develop.svn.wordpress.org/trunk@53768 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c937a1a commit a560641

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/wp-admin/includes/media.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3630,10 +3630,11 @@ function wp_read_video_metadata( $file ) {
36303630
*
36313631
* @since 4.9.0
36323632
*
3633-
* @param array $metadata Filtered video metadata.
3634-
* @param string $file Path to video file.
3635-
* @param string $file_format File format of video, as analyzed by getID3.
3636-
* @param array $data Raw metadata from getID3.
3633+
* @param array $metadata Filtered video metadata.
3634+
* @param string $file Path to video file.
3635+
* @param string|null $file_format File format of video, as analyzed by getID3.
3636+
* Null if unknown.
3637+
* @param array $data Raw metadata from getID3.
36373638
*/
36383639
return apply_filters( 'wp_read_video_metadata', $metadata, $file, $file_format, $data );
36393640
}
@@ -3712,10 +3713,11 @@ function wp_read_audio_metadata( $file ) {
37123713
*
37133714
* @since 6.1.0
37143715
*
3715-
* @param array $metadata Filtered audio metadata.
3716-
* @param string $file Path to audio file.
3717-
* @param string $file_format File format of audio, as analyzed by getID3.
3718-
* @param array $data Raw metadata from getID3.
3716+
* @param array $metadata Filtered audio metadata.
3717+
* @param string $file Path to audio file.
3718+
* @param string|null $file_format File format of audio, as analyzed by getID3.
3719+
* Null if unknown.
3720+
* @param array $data Raw metadata from getID3.
37193721
*/
37203722
return apply_filters( 'wp_read_audio_metadata', $metadata, $file, $file_format, $data );
37213723
}

0 commit comments

Comments
 (0)