Codex tools: Log in
Contents |
This function deletes an attachment
<?php wp_delete_attachment( $attachmentid, $force_delete = false ); ?>
This function fires the delete_attachment action hook, passing the attachment's ID ($postid).
To delete an attachment with an ID of '76':
<?php wp_delete_attachment( 76 ); ?>