[wp-hackers] file uploading: maybe worth add a hook?

Pixline supporto at pixline.net
Wed Feb 21 13:26:05 GMT 2007

I'm writing some plugins that play around the upload features, my  
first release is Upload+ [1] which actually have to remove a default  
action and switch to a clone of the entire  
wp_upload_tab_upload_action function [2] just to add a  
unique_filename_callback entry in the $override array before  
wp_handle_upload (line 117 in my plugin code [1], line 208 in upload- 
functions.php [3]). With a new hook, my plugin would be 60 lines  
long, not 180, and more future-proof :-)

I also think that the whole upload management area seems a little  
under development on that side, and I'd love to contribute with some  
of the feature of my legacy CMS, because I'm porting the only client  
using it on wordpress and I want to merge all our previous features  
that wp lack with some plugin.

Someone suggested me to submit a patch, but actually I don't know how  
to add hooks in the core (will learn as soon as I find documentation  
about it). I think that would be useful add one or two hooks, like  
one on the $overrides array [3] and one to add/modify layout for the  
upload iframe (I'd like to fill upload iframe with some other  
information with another plugin, i.e. filling an uploaded mp3 idv2  
tag with the post URL and data).

Can you help me, or suggest something?
Thank you for your time

[1] http://altro.pixline.net/files/2007/02/uploadplusphp.zip
[2] the whole http://trac.wordpress.org/browser/trunk/wp-admin/upload- 
functions.php#L187 up to #L272
[3] http://trac.wordpress.org/browser/trunk/wp-admin/upload- 

More information about the wp-hackers mailing list