tags:

views:

26

answers:

2

I have a word press theme with a theme options dialog

I'd like to add a feature to upload a logo via the theme options page and then display it on the front end in the header as the logo. How would I do this. I would like to use the wordpress media uploaded, but if this is not possible or an alternative is available Id appreciate that also

A: 

I am not a wordpress user/developer, but just as an idea, would it be possible to write your own php page to upload this file to the correct location and embed this page as an iFrame in your dialog?

Chief17
Possibly but it would mean a longer loading time, a less portable website, and an extra security problem in that my new code must be just as secure as the original wordpress code. Eitherway I'd like to keep everything inside the wordpress theme php even if it isnt using the official wordpress uploader
Tom J Nowell
A: 

It appears in Wordpress 3 this isn't possible. Wordpress loads up the media-upload.php file in an iframe, and the form which usually contains the delete and insert into post and use as post thumbnail, is get_media_item() in media.php at line 1156.

Unfortunately while one can pull up the media uploader, it cant be modified via hooks and filters to insert the extra buttons or links without modifying the core wordpress files.

Tom J Nowell