wp_generate_attachment_metadata

Advertisement

Summery Summery

Filters the generated attachment meta data.

Syntax Syntax

apply_filters( 'wp_generate_attachment_metadata', array $metadata, int $attachment_id, string $context )

Parameters 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 Source

File: wp-admin/includes/image.php

Advertisement

Changelog Changelog

Changelog
Version Description
5.3.0 The $context parameter was added.
2.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.