apply_filters( 'wp_read_image_metadata', array $meta, string $file, int $image_type, array $iptc, array $exif )
- Since
- 2.5.0, 4.4.0, 5.0.0
Filters the array of meta data read from an image's exif data.
Compatibility
- WordPress
- since 5.0.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
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.
Where this hook fires · 1
wp-admin/includes/image.php:1074wp_read_image_metadata()
Source code
* @param array $meta Image meta data. * @param string $file Path to image file. * @param int $image_type Type of image, one of the `IMAGETYPE_XXX` constants. * @param array $iptc IPTC data. * @param array $exif EXIF data. */ return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc, $exif );} /** * Validates that file is an image. * * @since 2.5.0Changelog
Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.0.0
The
$exif parameter was added.from the docblock4.4.0
The
$iptc parameter was added.from the docblock2.5.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.