apply_filters( 'wp_get_attachment_metadata', array $data, int $attachment_id )
- Since
- 2.1.0
Filters the attachment meta data.
Parameters
$dataarray- Array of meta data for the given attachment.
$attachment_idint- Attachment post ID.
Fired at · 1
wp-includes/post.php:7132wp_get_attachment_metadata()
Source
* * @since 2.1.0 * * @param array $data Array of meta data for the given attachment. * @param int $attachment_id Attachment post ID. */ $data = apply_filters( 'wp_get_attachment_metadata', $data, $attachment_id ); if ( ! is_array( $data ) ) { return false; } if ( array_key_exists( 'sizes', $data ) && ! is_array( $data['sizes'] ) ) {History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 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.