wp_update_attachment_metadata filter-hookWP 2.1.0

Filters the updated attachment meta data.

Usage

add_filter( 'wp_update_attachment_metadata', 'wp_kama_update_attachment_metadata_filter', 10, 2 );

/**
 * Function for `wp_update_attachment_metadata` filter-hook.
 * 
 * @param array $data          Array of updated attachment meta data.
 * @param int   $attachment_id Attachment post ID.
 *
 * @return array
 */
function wp_kama_update_attachment_metadata_filter( $data, $attachment_id ){

	// filter...
	return $data;
}
$data(array)
Array of updated attachment meta data.
$attachment_id(int)
Attachment post ID.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

wp_update_attachment_metadata()
wp_update_attachment_metadata
wp-includes/post.php 6511
$data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID );

Where the hook is used in WordPress

Usage not found.