wp_read_image_metadata
云策文档标注
概述
wp_read_image_metadata 是一个 WordPress 过滤器,用于修改从图像 EXIF 数据读取的元数据数组。它允许开发者在图像元数据被处理前进行自定义调整。
关键要点
- 过滤器名称:wp_read_image_metadata
- 参数:$meta(图像元数据数组)、$file(图像文件路径)、$image_type(图像类型常量)、$iptc(IPTC 数据)、$exif(EXIF 数据)
- 返回:应用过滤器后的元数据数组
- 相关函数:wp_read_image_metadata() 用于获取扩展图像元数据
- 版本历史:从 WordPress 2.5.0 引入,4.4.0 添加 $iptc 参数,5.0.0 添加 $exif 参数
原文内容
Filters the array of meta data read from an image’s exif data.
Parameters
$metaarray-
Image meta data.
$filestring-
Path to image file.
$image_typeint-
Type of image, one of the
IMAGETYPE_XXXconstants. $iptcarray-
IPTC data.
$exifarray-
EXIF data.
Source
return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc, $exif );