Definition:
function wp_update_attachment_metadata( $post_id, $data ) {}
Update metadata for an attachment.
Parameters
- int $post_id: Attachment ID.
- array $data: Attachment data.
Defined filters
- wp_update_attachment_metadata
apply_filters( 'wp_update_attachment_metadata', $data, $post->ID )
Source code
function wp_update_attachment_metadata( $post_id, $data ) { $post_id = (int) $post_id; if ( !$post =& get_post( $post_id ) ) return false; $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID ); return update_post_meta( $post->ID, '_wp_attachment_metadata', $data); }
4211
No comments yet... Be the first to leave a reply!