[wp-hackers] file post-uploading hook?

Pixline supporto at pixline.net
Tue Feb 20 15:38:38 GMT 2007


After some time spent on the upload-functions.php, I've discovered  
that wp_upload_tab_upload_action() calls wp_handle_upload() - in  
admin-functions.php - passing an array called "$overrides", and I've  
learned how to pass my function:

	$overrides = array 
('action'=>'upload','unique_filename_callback'=>'my_function');

so, the raw stub of the plugin is actually a clone of the  
wp_upload_tab_upload_action() function, enabled by:

	remove_action( 'upload_files_upload', 'wp_upload_tab_upload_action' );
	add_action( 'upload_files_upload', 'gmz_upload');

I just don't know if this is an accettable way to procede for a  
plugin. Can you confirm or correct me, please?
Draft source code available on request.

Thank you hackers!
Paolo/Pixline


Il giorno 19/feb/07, alle ore 17:22, Jennifer Hodgdon ha scritto:

> There is an action called 'upload_files_upload', which is called  
> from upload.php for file upload management.



More information about the wp-hackers mailing list