wp_get_attachment_id3_keys filter-hookWP 3.9.0

Filters the editable list of keys to look up data from an attachment's metadata.

Usage

add_filter( 'wp_get_attachment_id3_keys', 'wp_kama_get_attachment_id3_keys_filter', 10, 3 );

/**
 * Function for `wp_get_attachment_id3_keys` filter-hook.
 * 
 * @param array   $fields     Key/value pairs of field keys to labels.
 * @param WP_Post $attachment Attachment object.
 * @param string  $context    The context. Accepts 'edit', 'display'.
 *
 * @return array
 */
function wp_kama_get_attachment_id3_keys_filter( $fields, $attachment, $context ){

	// filter...
	return $fields;
}
$fields(array)
Key/value pairs of field keys to labels.
$attachment(WP_Post)
Attachment object.
$context(string)
The context. Accepts 'edit', 'display'.
Default: 'display'

Changelog

Since 3.9.0 Introduced.

Where the hook is called

wp_get_attachment_id3_keys()
wp_get_attachment_id3_keys
wp-includes/media.php 3197
return apply_filters( 'wp_get_attachment_id3_keys', $fields, $attachment, $context );

Where the hook is used in WordPress

Usage not found.