wp_read_video_metadata
Filter HookDescription
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.Hook Information
File Location |
wp-admin/includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3681 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$metadata
|
Filtered video metadata. |
string
|
$file
|
Path to video file. |
string|null
|
$file_format
|
File format of video, as analyzed by getID3. Null if unknown. |
array
|
$data
|
Raw metadata from getID3. |
Usage Examples
Basic Usage
<?php
// Hook into wp_read_video_metadata
add_filter('wp_read_video_metadata', 'my_custom_filter', 10, 4);
function my_custom_filter($metadata, $file, $file_format, $data) {
// Your custom filtering logic here
return $metadata;
}
Source Code Context
wp-admin/includes/media.php:3681
- How this hook is used in WordPress core
<?php
3676 * @param string $file Path to video file.
3677 * @param string|null $file_format File format of video, as analyzed by getID3.
3678 * Null if unknown.
3679 * @param array $data Raw metadata from getID3.
3680 */
3681 return apply_filters( 'wp_read_video_metadata', $metadata, $file, $file_format, $data );
3682 }
3683
3684 /**
3685 * Retrieves metadata from an audio file's ID3 tags.
3686 *
PHP Documentation
<?php
/**
* 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.
*
* @since 4.9.0
*
* @param array $metadata Filtered video metadata.
* @param string $file Path to video file.
* @param string|null $file_format File format of video, as analyzed by getID3.
* Null if unknown.
* @param array $data Raw metadata from getID3.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-admin/includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.