wp_read_audio_metadata
云策文档标注
概述
wp_read_audio_metadata 是一个 WordPress 过滤器,用于修改从音频文件解析的元数据数组。它允许开发者在核心处理的基础上调整或扩展音频元数据。
关键要点
- 过滤器名称:wp_read_audio_metadata
- 参数:$metadata(过滤后的音频元数据数组)、$file(音频文件路径)、$file_format(音频文件格式,可能为 null)、$data(来自 getID3 的原始元数据数组)
- 用途:在 wp_read_audio_metadata() 函数中调用,用于自定义音频元数据的处理逻辑
- 引入版本:WordPress 6.1.0
原文内容
Filters the array of metadata retrieved from an audio file.
Description
In core, usually this selection is what is stored.
More complete data can be parsed from the $data parameter.
Parameters
$metadataarray-
Filtered audio metadata.
$filestring-
Path to audio file.
$file_formatstring|null-
File format of audio, as analyzed by getID3.
Null if unknown. $dataarray-
Raw metadata from getID3.
Source
return apply_filters( 'wp_read_audio_metadata', $metadata, $file, $file_format, $data );
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |