614 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
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?

491 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says
library: { type : 'image'},
614 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
ChapterThemes says

library: { type : 'image'},

Superbe! Thank you :)

3 posts
  • Exclusive Author
  • Has been a member for 5-6 years
  • Germany
  • Bought between 10 and 49 items
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