[wp-hackers] api.wordpress.org/themes ?

Jason DeVelvis sales at emailappeal.com
Mon Jan 12 07:13:31 GMT 2009


I'm trying to code a themes installer plugin, similar to the plugin
installer in the core (I know, I know, it'll probably be in 2.8, but I want
it now...) and I've got it to do everything except find the proper theme
.zip file.

The API returns a download URL like
http://downloads.wordpress.org/theme/openair.zip which returns a 404... The
actual extend download URL for openair is
http://wordpress.org/extend/themes/download/openair.1.1.7.zip 

Any ideas why the API download URLs are invalid? Did I jump into the API too
early :) Could it be easily fixed so my plugin works? Or is there something
else going on in my code if the API is returning the wrong d/l links?

Here's the serialized api info for this call:
O:8:"stdClass":13:{s:4:"name";s:7:"OpenAir";s:4:"slug";s:7:"openair";s:7:"ve
rsion";N;s:6:"author";N;s:8:"requires";N;s:6:"tested";N;s:6:"rating";d:32;s:
11:"num_ratings";i:25;s:10:"downloaded";N;s:12:"last_updated";s:10:"2009-01-
07";s:8:"homepage";N;s:13:"download_link";s:48:"http://downloads.wordpress.o
rg/theme/openair.zip";s:4:"tags";a:6:{s:19:"threaded-comments-1";s:17:"threa
ded-comments";s:15:"right-sidebar-2";s:13:"right-sidebar";s:13:"fixed-width-
1";s:11:"fixed-width";s:5:"white";s:5:"white";s:4:"blue";s:4:"blue";s:13:"tw
o-columns-1";s:11:"two-columns";}}

Note, that api info is obtained with this line of code:
$api = themes_api('theme_information', array('slug' => $theme, 'fields' =>
array('sections' => false) ) ); //Save on a bit of bandwidth.

(where $theme = the slug I retrieved earlier in the process, which is
'openair')

Coincidentally, there is no version # passed with the api call either. Could
be the same problem?

Any help would be tremendous!

Thanks,
Jason



More information about the wp-hackers mailing list