Good – but room for improvement
-
First of all, I do want to say the plugin is a great start. However, I have already found 2 ways to improve it. First of all, you don’t mention all of the hooks available in the documentation. I found some hooks in the source code that I was able to use to add my own email functionality.
//Add Custom Email to AJAX File Upload for Purchase Orders
add_action(‘afu_after_upload_done’, ‘ajax_po_after_upload’, 99);function ajax_po_after_upload($args){
$message = $args[“url”];
wp_mail($message);
}It would be nice to add this email option as a parameter as well. Something like: send_email=”[email protected]”. By default, it would just send some very basic email with a link to the file. That way people don’t have to go digging through the uploads directory to try and find the file.
Also, it would be really nice if you included a shortcode parameter for “single_file” upload. Basically the idea here is that instead of having to click the upload button after the selection of the file, it would just auto upload the file immediately after selection – thus assuming there is only going to be a single file uploaded. Therefore, once that single file is selected, the need for the upload button is gone. Just select file -> click OK -> file is uploaded immediately. So, in this case, there would be no need to even display the upload or delete buttons at all. If you are willing to use this idea, I am willing to write the code for you as long as you include it in the plugin so it will always be there in future updates. Deal?
- The topic ‘Good – but room for improvement’ is closed to new replies.