wp_read_video_metadata filter-hookWP 4.9.0

Filters the array of metadata retrieved from a video.

In core, usually this selection is what is stored. More complete data can be parsed from the $data parameter.


add_filter( 'wp_read_video_metadata', 'wp_kama_read_video_metadata_filter', 10, 4 );

 * Function for `wp_read_video_metadata` filter-hook.
 * @param array  $metadata    Filtered Video metadata.
 * @param string $file        Path to video file.
 * @param string $file_format File format of video, as analyzed by getID3.
 * @param array  $data        Raw metadata from getID3.
 * @return array
function wp_kama_read_video_metadata_filter( $metadata, $file, $file_format, $data ){

	// filter...
	return $metadata;
Filtered Video metadata.
Path to video file.
File format of video, as analyzed by getID3.
Raw metadata from getID3.


Since 4.9.0 Introduced.

Where the hook is called

wp-admin/includes/media.php 3633
return apply_filters( 'wp_read_video_metadata', $metadata, $file, $file_format, $data );

Where the hook is used in WordPress

Usage not found.