[wp-hackers] uploader with options API

andre at pixelplexus.co.za andre at pixelplexus.co.za
Sun Jul 8 22:02:23 UTC 2012


I've been trying to figure out how to properly use the WordPress' uploader
with a plugin option.

I'm using add_settings_field to create the field and assumed there must be
straight-forward way to call the uploader from the callback that renders
the input, but no luck. I don't know if I'm just being a klutz, or a klutz
missing something really important.

Quite a few blogposts use a javascript,
(e.g.
http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/)
but there seems to be some dodgyness around how to get the data back to
the form's text field. In my case I've not even got the button that should
launch the uploader to do anything when you click it.

Any advice or pointers to plugins to study would be much appreciated.

Thanks

André





More information about the wp-hackers mailing list