XML-RPC in WordPress 3.4

WordPress 3.4 has finally hit beta! Since full changelog/release notes are not yet available, I want to recap the improvements in XML-RPC functionality for this release here.

New Methods

The most significant change was the addition of a suite of new methods covering post and taxonomy functionality.

These replace the legacy metaWeblog API methods for creating and editing posts, which did not support custom post types or taxonomies. You should no longer need to use any non-wp.* methods, please use the WordPress API in all of your apps and integrations!

Bugfixes

Fortunately, most of the items from my bugs hitlist have been fixed this cycle.

One of the most requested was #15098, support for adding a featured image/thumbnail to posts. This has been added to both the new post methods and the legacy metaWeblog post methods. Now the mobile apps can finally support post thumbnails, a long-requested feature by mobile users.

Check out the full list of XML-RPC tickets from this cycle.

Unit Tests

The WordPress core team takes backwards compatibility very seriously, and that’s even more important for a public/external API like XML-RPC. The best way to protect against breaking API changes is to have a robust test suite for it. One of the commit bars for this cycle was that core patches needed corresponding unit tests.

The core unit test suite now includes 134 XML-RPC tests, covering 631 assertions. While this is a large step forward, it’s hopefully just the beginning.

Documentation

Having written XML-RPC clients in Python, C#, and Java for talking to WordPress, I’ve banged my head against the vagaries of the WordPress XML-RPC API many many times. A large part of this is because there has been a dearth of documentation on the specifics of method parameters and return values.

Although WordPress ostensibly implements “standard” APIs (Blogger, metaWeblog, and MovableType), the specs for those APIs have largely disappeared from the internet, and WordPress has expanded or modified them to cover WordPress-specific features. This makes life difficult for developers who don’t want to dive into WordPress core code.

Over the past several months, I’ve been documenting the entirety of the XML-RPC API, including all of the legacy methods. For now you can find it on my Codex userpage, but I hope to work with the Codex team to get it onto the “real” Codex before the final 3.4 release. Update: Now on the Codex!

Conclusion

Between support for custom post types, custom taxonomies, post thumbnails, and all of the other bugfixes, the XML-RPC API has made significant strides forward this release. This has opened the door for the official mobile apps to become more capable, as well as enable new scenarios for other external services and API consumers.

I’d like to thank Peter Westwood (aka westi) for being our fearless leader and carving time out of his busy schedule to mentor Marko Heijnen and I this cycle. Thanks also to Joseph Scott for helping to drive the bugfix work at the beginning of the cycle. And thanks to Andrew Nacin and Ryan Boren for their support and beating the security drum.

If anyone finds bugs, please report them! Once 3.4 is out the door, we’ll talk about scope for 3.5, and I have several ideas on where XML-RPC can head in future releases. Especially if core is serious about adopting a REST(ful) API like the one being built for WordPress.com. But more on that another day!

15 Responses to XML-RPC in WordPress 3.4
  1. [...] custom content types and taxonomies, check out the Codex page, put together by Max Cutler. Max also reca... wpdevel.wordpress.com/2012/06/07/wordpress-3-4-field-guide-for-developers
  2. [...] custom content types and taxonomies, check out the Codex page, put together by Max Cutler. Max also reca... wpfreedomthemes.com/links-post
  3. [...] Zcela přepracováno bylo také XML-RPC WordPress API, nově už počítá s custom post types a custom ... seo-konzultant.cz/pripravte-se-na-wordpress-3-4
  4. [...] The new XML-RPC API for mobile and external apps is hot. Superceding the older XML-RPC Support for Blogg... lorelle.wordpress.com/2012/06/15/wordpress-3-4-green-is-good-to-go
  5. [...] Para mas Informacion:http://www.maxcutler.com/2012/04/04/xml-rpc-in-wordpress-3-4/ [...]... tutosytips.com/hablemos-de-la-nueva-version-de-wordpress-la-3-4-green
  6. [...] Max Cutler on XML-RPC in 3.4  Posted by jblum at 3:59 pm [...]... wordpress.blogs.wp.horizon.ac.uk/3-4-upgrade-case
  7. […] now that it is possible to work with Custom Post Types over XML-RPC, has anyone figured out a way to... wbcomdesigns.com/helpdesk/set-default-custom-post-type-for-xml-rpc
  8. […] editing posts and moderating comments, but have their limitations. Again, this may change with a new... sboneham.com/blog/2012/06/mobilising-wordpress
  9. […] Zudem gibt es einige Änderungen in der XML-RPC WordPress API, mit der Content-Stücke feiner unters... https://entwickler.de/online/tools/wordpress-3-4-rc3-release-laengst-ueberfaellig-133949.html

Leave a Reply