WordPress Hooks Explorer

Listing all hooks extracted WordPress Core

Details about wp_generate_attachment_metadata

Back to home


Filename Hook Type Line Number PHP Doc
wp-admin/includes/image.php apply_filters 181 /**
* If any of the currently registered image sub-sizes are missing,
* create them and update the image meta data.
* @since 5.3.0
* @param int $attachment_id The image attachment post ID.
* @return array|WP_Error The updated image meta data array or WP_Error object
* if both the image meta and the attached file are missing.
wp-admin/includes/image.php apply_filters 658 /**
* Filters the generated attachment meta data.
* @since 2.1.0
* @since 5.3.0 The `$context` parameter was added.
* @param array $metadata An array of attachment meta data.
* @param int $attachment_id Current attachment ID.
* @param string $context Additional context. Can be 'create' when metadata was initially created for new attachment
* or 'update' when the metadata was updated.

Hook Parameters

Parameter Type Name Description