[wp-hackers] WordPress.org API

Ryan McCue ryanmccue at cubegames.net
Sat Jan 19 09:52:34 GMT 2008

Matt Mullenweg wrote:
> Ryan McCue wrote:
>> Is documentation for the api.wordpress.org service available? Even 
>> better, the source code? I'm looking into building a version checker 
>> into my own software and, although it seems easy to build my own 
>> based on what is returned, it would be really handy to see the source 
>> to see:
> It's a fancy front-end to version_compare. (Actually not that fancy.)
>>    * What the php_version parameter is used for
>>    * What the locale parameter is used for
> Both are unused currently, but the idea is that if there was a new 
> version of a plugin that was only compatible with, say, PHP 5.2.1 it 
> could figure that out and only show you the newest version compatible 
> with your setup. This becomes more important when there's one click 
> install.
> Same thing with locale, think pre-localized plugins that might get 
> updates at different times.
>>    * Any other tricks you might use
> Having a unique global identifier (like a slug) makes things 
> infinitely easier. The only real complexity in our code is the 
> juggling the identifiers for plugins. For the core version check it's 
> literally a hard-coded file with some version compare switches, 
> designed just to be as fast as possible because we didn't know what 
> the load would be like post-launch, no DB access at all.
Thanks Matt. I assumed it would be basically that, and had already coded 
the core part up. It's good to know that it's hardcoded, as I was 
wondering about that in particular.

I look forward to --stealing-- borrowing much more of your code in the 
future :-)


More information about the wp-hackers mailing list