0
votes

So I am using the Wordpress Media Uploader to upload slides for a slider. I have a delete button that when pressed will clear out the image and input fiels storing the url. The problem is that the image is still available when going back to the media uploader.

Is there a way to delete the image from the media uploader as well when pushing the same button? Would it be accomplished with jQuery?

1

1 Answers

0
votes

There's already a delete button if you click on the "Gallery" tab under each image, but the link is a [POST] to the post.php.

$("#DELETEBUTTON").click(function(){
    window.location("post.php?action=delete&post=YOURATTACHMENTID&_wpnonce=YOURNONCEKEY");
});