Support » Plugins » Hacks » Making use of get_media_item in custom media tab

  • Anyone made use of get_media_item in a plugin?
    I’ve made an extra media tab to enable browsing files by folder structure and I’m using the get_media_item function to get the form for each item. The problem I’ve got is that the “insert into post” button isn’t calling anything (nothing happens and no js errors triggers). The use as post thumbnail action works, allthough it passes -1 to the caller window instead of a correct attachment id.

    I’m enqueueing ‘media-upload’,’image-edit’),’admin-gallery’ and ‘upload’ and calls prepareMediaItem() and updateMediaForm() js functions upon loaded data.

    Anyone got this working in a custom plugin/media-tab?

  • The topic ‘Making use of get_media_item in custom media tab’ is closed to new replies.