Tuesday, July 6, 2010

How do I get a list of items in the Wordpress media library on a plugin options page?

Programmer Question

Hi!
I'm writing a Wordpress plugin which injects a grid of images just above the footer on all frontend pages. The application is to display sponsor's logos. I'd like to harness the WP Media Library since the logos are already uploaded for use on the 'sponsorship' page and in posts.



Essentially I'm stuck at accessing the media library interface on the plugin's options page. All of the legwork is done in terms of creating the options page, using the action hook to place content on frontend pages from the plugin, etc. What I need now is to be able to display all the files in the media library in a list on the options page, and provide a checkbox or something to allow the user to select certain files for insertion above the footer.



The Media Library API seems to be aimed at people writing themes or media plugins. Help understanding what to make use of would be great!



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails