Refactor code for file (image) advanced upload:
- Use only 1 frame for upload to increase performance
- Use 'on' to attach 'click' event
Add wp_enqueue_media() for file (image) advanced upload. Make sure script for media upload is enqueued even when post has no editor or WYSIWYG fields. Issue #270.