How to find the origin of a file upload from within wp_handle_upload?
I was able to figure it out by looking at the form parameters, which I don’t really like doing since it’s not part of the wordpress api. if anybody has a better idea, please leave a comment. $_REQUEST[‘post_id’] > 0 // it’s being uploaded from a page/post $_REQUEST[‘post_id’] == 0 // it’s being uploaded from … Read more