wp_image_file_matches_image_meta WordPress Filter Hook

This hook is called when an image file is added to the media library and the meta data for the image (such as the title, caption, etc.) is updated. It allows you to compare the image file to the meta data and make sure that they match.

apply_filters( 'wp_image_file_matches_image_meta', bool $match, string $image_location, array $image_meta, int $attachment_id ) #

Filters whether an image path or URI matches image meta.


Parameters

$match

(bool)Whether the image relative path from the image meta matches the end of the URI or path to the image file.

$image_location

(string)Full path or URI to the tested image file.

$image_meta

(array)The image meta data as returned by 'wp_get_attachment_metadata()'.

$attachment_id

(int)The image attachment ID or 0 if not supplied.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More