Skip to main content
6 events
when toggle format what by license comment
Feb 3, 2011 at 11:27 comment added hakre @Scott B - Yeah, but that made me aware that in case it's not delete-able by that, you might want to prefer the unlink mehtod of the filesystem object: delete(). See core.trac.wordpress.org/browser/trunk/wp-admin/includes/… // $wp_filesystem->delete($file_to_open);
Feb 2, 2011 at 21:53 comment added Scott B so if I call unlink($file_to_open) outside my else, that should do it? (assuming unlink exists in the pclzip class)
Feb 2, 2011 at 20:42 comment added hakre @Scott B - Well, see your code: The code to delete the zip file is not part of the else claues. The overall solution might be that you move it after the if/else block, so to delete it in every case :)
Feb 2, 2011 at 15:07 vote accept Scott B
Feb 2, 2011 at 14:20 comment added Scott B thanks, I had updated my question yesterday to include the WP_Filesystem() call. Now the file is unzipped, however, the original is not deleted from the destination folder, so you get "archive" and "archive.zip" (as an example if your zip is named archive.zip)
Feb 2, 2011 at 13:39 history answered hakre CC BY-SA 2.5