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.7.1

apply_filters('wp_update_attachment_metadata') is found 1 times:

  • /wp-includes/post.php line 6811
    	 *
    	 * @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: