wp_update_attachment_metadata

wp_update_attachment_metadata

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('wp_update_attachment_metadata') is found 1 times:

  • /wp-includes/post.php line 6511
    	 *
    	 * @param array $data          Array of updated attachment meta data.
    	 * @param int   $attachment_id Attachment post ID.
    	 */
    	$data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID );
    	if ( $data ) {
    		return update_post_meta( $post->ID, '_wp_attachment_metadata', $data );
    	} else {
    		return delete_post_meta( $post->ID, '_wp_attachment_metadata' );
    	}
    }
    

See this hook used in plugins: