[wp-hackers] file uploading: maybe worth add a hook?
f.terenzani at gmail.com
Thu Feb 22 10:12:36 GMT 2007
You could take the way to rename the uploaded file.
In your plugin I've removed:
remove_action( 'upload_files_upload', 'wp_upload_tab_upload_action' );
add_action( 'upload_files_upload', 'gmz_upload');
The code of gmz_rename() and your plugin hacked is here:
It seems working fine...
I've also modified your gmz_mangle_filename() function.
On 2/21/07, Pixline <supporto at pixline.net> wrote:
> Il giorno 21/feb/07, alle ore 16:01, Jennifer Hodgdon ha scritto:
> > add a line like this:
> > $overrides = apply_filters( 'upload_overrides', $overrides );
> I really didn't know that was so simple... Seems like the solution in
> WP is quite always the easy way, I'm not used to that pleasant
> coding :-)
> I make a patch with your suggestion and the enhancement request on
> http://trac.wordpress.org/ticket/3831 , hoping it will be accepted.
> In that case my plugin will be 95 lines shorter :-).
> I definitively love wordpress.
> Thank You.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
Globalwarming Awareness2007 GT Team
More information about the wp-hackers