683 posts
  • 4 Years of Membership
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
ChapterThemes
says

I have a working script etc. for inserting a custom media upload box or whatever it’s used for. Wonder it’s possible to only show certain filetypes?

I think it must be somewhere inside this code:

file_frame = wp.media.frames.file_frame = wp.media({
            title: 'Add extra photo',
            button: {
                text: 'Add',
            },
            multiple: false
        });

Anyone?

501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more
pixelentity
says
library: { type : 'image'},
683 posts
  • 4 Years of Membership
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
ChapterThemes
says

library: { type : 'image'},

Superbe! Thank you :)

3 posts
  • 6 Years of Membership
  • Collector Level 2
  • Exclusive Author
  • Germany
Elvis67
says

And what if I need exactly the opposite? Show all files but images? Or show only mp3 files?

Thanks for help

by
by
by
by
by
by