I was able to temporarily disable an automatic task of wordpress during a specific file type upload which is nice. For instance, I changed the usual upload path for the pdf uploads by doing this:
//change the normal path
//upload the file
$upload = wp_upload_bits($pdffile,null,file_get_contents($pdffile_temp));
//get the standard path back
Now I would like to do the same with the “wp unique filename” function that is automatically called by wordpress. The same way I changed temporarily the path for this specific upload routine, I would like not to rename the file if another one has already the same name inside the target folder (I would rather overwrite the old file with the new one instead).
How could I do that?
The topic ‘update options and wp_unique_filename’ is closed to new replies.