"Pick file from media library"-button in plugin

Hi,

is it possible to make a "Pick file from Media Library" button in a plugin?

I have a couple of configurables in my theme, and one of those is a header image, and I would really like it, if the user shouldn’t have to type in the image url manually.

Thanks.

  • drmike
    • DEV MAN’s Mascot

    I actually have something like this on my todo list. We’ve been thinking about using the description field of categories, putting in a image url in there and using that to show the header image.

    Have to admit it’s pretty far down the list right now.

    edit: Or using the nicename of categories, add in the file extension to the end of that and looking for that image. That would be more work as you would have to get around the file upload path and it’s usage of months and dates.