wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_get_attachment_metadata › WordPress Function
Since2.1.0
Deprecatedn/a
› wp_get_attachment_metadata ( $attachment_id = 0, $unfiltered = false )
Parameters: (2) |
|
Returns: |
|
Defined at: |
|
Codex: |
Retrieves attachment metadata for attachment ID.
Source
function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) { $attachment_id = (int) $attachment_id; $data = get_post_meta( $attachment_id, '_wp_attachment_metadata', true ); if ( ! $data ) { return false; } if ( $unfiltered ) { return $data; } /** * Filters the attachment meta data. * * @since 2.1.0 * * @param array|bool $data Array of meta data for the given attachment, or false * if the object does not exist. * @param int $attachment_id Attachment post ID. */ return apply_filters( 'wp_get_attachment_metadata', $data, $attachment_id ); }