Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm developing a plugin which uses wordpress's thickbox media library to handle media upload and selection. All is well but for the fact that I would like to automatically 'redirect' to the 'media library'-tab after I uploaded/ wordpress finished crunching the file.

So basically i'm looking for a hook that's fired after the crunching of an uploaded file is finished.

I can't imagine this would be such an extreme thing but I can't seem to find the right hook for this.

share|improve this question
    
Issue still there... Nobody has an idea?! –  Marsman Jan 3 '12 at 14:15
    
i asked in Trac for the addition of some kind of callback for after the set as featured image link is clicked. (i got shot down b/c they misunderstood my post as a support request) this is another valid place for a callback to hook into. maybe you could post in Trac as a suggestion too. –  helgatheviking Jan 7 '12 at 1:18
    
The only way I found is to actively track any changes (jquery) and if, change the layout. I'm quite sure this would be the only way... –  Marsman Apr 24 '12 at 12:44
    
You'd have to, somehow, add an external jQuery listener to this functions: /wp-includes/js/swfupload/handlers.dev.js. . . But what if more than one file was dropped in the upload box? What if we drop another one while the previous are still uploading/crunching? –  brasofilo Jul 30 '12 at 20:43

2 Answers 2

I just check hooks database and find one which could help. It is in http://svn.automattic.com/wordpress/tags/3.4/wp-admin/async-upload.php file. It is *upload_files_{$tab}* and it is used near the end of the file.

If I were you I check this hook in my plugin for more information.

share|improve this answer

it's a longshot but,

add_attachment hook, actually fires after the first file finished uploading:

 add_action('add_attachment','redirect_uploader_flow');

i'm using it to load a custom interface for resizing a Image loading in the current TB window:

    jQuery("#TB_iframeContent",window.parent.document).attr('src',"<?php echo get_window_url($id) ?>");

the main problem is that it will break multiple file uploads

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.