10/09/2014 at 10:53 am
#306595
Keymaster
@ trmash
Well, WordPress has a recursive delete function too. I just was not able to use it, unfortunately, at this time. I do plan on changing that, but the function I wrote suits my specific use case within Connections. It is used when deleting entries. It deletes all the entries images and any of their variations and finally deletes the entry’s image folder.
Yes, a hacker could potentially exploit this code, they could potentially exploit the function within WordPress too. I believe I have the proper precautions implemented that from happening.
I guess I could remove it and delete only images within the entry folder and then the folder itself. I’ll have to give it more thought.
