wp_get_attachment_id3_keys
Filter HookDescription
Filters the editable list of keys to look up data from an attachment's metadata.Hook Information
File Location |
wp-includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3345 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$fields
|
Key/value pairs of field keys to labels. |
WP_Post
|
$attachment
|
Attachment object. |
string
|
$context
|
The context. Accepts 'edit', 'display'. Default 'display'. |
Usage Examples
Basic Usage
<?php
// Hook into wp_get_attachment_id3_keys
add_filter('wp_get_attachment_id3_keys', 'my_custom_filter', 10, 3);
function my_custom_filter($fields, $attachment, $context) {
// Your custom filtering logic here
return $fields;
}
Source Code Context
wp-includes/media.php:3345
- How this hook is used in WordPress core
<?php
3340 *
3341 * @param array $fields Key/value pairs of field keys to labels.
3342 * @param WP_Post $attachment Attachment object.
3343 * @param string $context The context. Accepts 'edit', 'display'. Default 'display'.
3344 */
3345 return apply_filters( 'wp_get_attachment_id3_keys', $fields, $attachment, $context );
3346 }
3347 /**
3348 * Builds the Audio shortcode output.
3349 *
3350 * This implements the functionality of the Audio Shortcode for displaying
PHP Documentation
<?php
/**
* Filters the editable list of keys to look up data from an attachment's metadata.
*
* @since 3.9.0
*
* @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'. Default 'display'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.