[wp-hackers] Accessing Update Check API Outside of WordPress

Otto otto at ottodestruct.com
Sun Nov 11 16:04:01 UTC 2012


On Sun, Nov 11, 2012 at 12:01 AM, Mark Smith <mark.smith1187 at yahoo.com> wrote:
> Plugins and themes are a bit more difficult because I have to post data about what plugins and themes I am checking.  This is obviously not documented, the only documentation is a list of the API endpoints at http://codex.wordpress.org/WordPress.org_API.
>
> I took a look at update.php to see how WordPress does it but the myriad of WordPress functions seems to just confuse me as to what exactly is being posted to the API endpoints http://api.wordpress.org/plugins/update-check/1.0/ and http://api.wordpress.org/themes/update-check/1.0/. Can anyone explain to me what eactly needs to be posted to get the current version of each plugin and theme.

Look at the wp_update_plugins() and wp_update_themes() functions in
wp-includes/update.php. These do the actual gathering and sending of
the two update requests to the api. You can dump the information out
and take a look at it, it's really just a serialized list of the
plugins and such.

Basically, it's sending the list of all the plugins and their
information to the api, which checks all the plugins at once and
returns what needs to be updated and information about it. Same for
themes.

-Otto


More information about the wp-hackers mailing list