This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Incorporate Media Uploader into Custom Theme Options

  • Creator
    Topic
  • #1256
    John
    Participant

    When adding custom tabs etc. to the theme options, is it possible to make the WordPress Media Uploader available to input images?
    thanks,
    john

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #1261
    Jason Bobich
    Keymaster

    Yup. There’s an option type called “upload” you can use for this.

    #1263
    John
    Participant

    Perfect, thanks.

    #1380
    John
    Participant

    Just a heads up. Since implementing this code I have upgraded to wp 3.5 and installed your two latest plugin updates. I don’t know if any of this is related, but my “upload” button went to 45x16px (too small) I fixed with:

    #optionsframework .controls input.upload_button {
    	width: 70px;
    	height: 24px;
    }

    john

    #1392
    Jason Bobich
    Keymaster

    Yup, I’ve got it in already for the next update. Thanks, though. 😉

    Make sure and let me know if you find anything else that doesn’t work in WP 3.5.

    #3951
    srumery
    Participant

    That’s great to know. I was looking for something like that. After seeing this I looked in the documentation and didn’t see a list of available data types. Can you point me in the right direction?

    #3954
    Jason Bobich
    Keymaster

    @srumery

    There’s currently no full list any where. You could just look at the switch statement in this file:

    /framework/admin/options/options-interface.php

    Each case of the giant switch statement are the different option types you could theoretically use.

    #3982
    srumery
    Participant

    Excellent! I not only used the “upload” control… I used “images” for a radio box selection. It’s the same one you are using for the sidebar selector in the framework theme options layout tab. Brilliant!

    Now, I’ll try out checkbox, multicheck, typography and background. There are a few more as well. This just keeps getting better, and better!

    Thank you Jason!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.