apply_filters( 'wp_generate_attachment_metadata', array $metadata, int $attachment_id, string $context )
Filters the generated attachment meta data.
Parameters
- $metadata
-
(array) An array of attachment meta data.
- $attachment_id
-
(int) Current attachment ID.
- $context
-
(string) Additional context. Can be 'create' when metadata was initially created for new attachment or 'update' when the metadata was updated.
Source
Changelog
Version | Description |
---|---|
5.3.0 | The $context parameter was added. |
2.1.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_generate_attachment_metadata