UNPKG

@wordpress/editor

Version:
9 lines (7 loc) 186 B
import apiFetch from '@wordpress/api-fetch'; export default async function mediaDelete( id ) { await apiFetch( { path: `/wp/v2/media/${ id }?force=true`, method: 'DELETE', } ); }