Definition:
function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) {}
Retrieve attachment meta field for attachment ID.
Parameters
- int $post_id: Attachment ID
- bool $unfiltered: Optional, default is false. If true, filters are not run.
Return values
returns:Attachment meta field. False on failure.
Defined filters
- wp_get_attachment_metadata
apply_filters( 'wp_get_attachment_metadata', $data, $post->ID )
Source code
function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) { $post_id = (int) $post_id; if ( !$post =& get_post( $post_id ) ) return false; $data = get_post_meta( $post->ID, '_wp_attachment_metadata', true ); if ( $unfiltered ) return $data; return apply_filters( 'wp_get_attachment_metadata', $data, $post->ID ); }
3687
No comments yet... Be the first to leave a reply!