WordPress 2.5 is officially out the door. Matt hits the long list of highlights of what is new in the release announcement. This coincides with the new layout at WordPress.rog. Peter Westwood (one of the WordPress core developers) put together a tag cloud of people who contributed to this release.
For the XML-RPC blog client developers out there 2.5 adds four new methods:
- wp.deleteCategory( blog_id, username, password, category_id ) – Delete a category.
- wp.getCommentCount( blog_id, username, password, post_id ) – Provides a struct of all the comment counts ( approved, awaiting_moderation, spam, total_comments ) for a given post_id. The post_id parameter is optional (or can be set to zero), if it is not provided then the same struct is returned, but for the entire blog instead of just one post.
- wp.getPostStatusList( blog_id, username, password ) – Provides a struct of all the valid post statuses ( draft, pending, private, publish ) and their descriptions ( Draft, Pending Review, Private, Published ).
- wp.getPageStatusList( blog_id, username, password ) – Provides a struct of all the valid page statuses ( draft, private, publish ) and their descriptions ( Draft, Private, Published).
To go along with the new status methods, you can now explicitly set the post and page status using the post_status and page_status fields. Like wise the status is also exposed via the various get* methods. One note about future posts, for the purposes of XML-RPC clients we set the post_status to publish when the actual database value is future.
The wp.suggestCategories method has been fixed to return data in the same format that it did originally. I never heard anyone complain about this though, so I guess it isn’t getting much use.
Custom fields for posts and pages are now exposed and manageable from metaWeblog.getPost/newPost/editPost, wp.getPage/newPage/editPage via the custom_fields field. I was really happy to get this in, I think there is a lot of potential in being able to manage custom fields externally.
The mt_allow_comments field now understands the value of 2 to be the same as the value of zero. This was done because other platforms expect to be able use the value 2, so some clients assume that we support it. Now we do, but from the WordPress point of view is does exactly the same thing as zero.
If the field date_created_gmt is provided in metaWeblog.newPost/editPost, wp.newPage/editPage then it is used instead of the dateCreated field. This same field was already exposed via metaWeblog.getPost, wp.getPage. By definition the date_created_gmt field is always GMT, even if you don’t provide a time zone offset or a trailing Z. I’m hoping this will help ease the many headaches that have been brought on by trying to deal with date/time issues in the XML-RPC blog APIs.
If you are a developer that makes use of the WordPress XML-RPC interface, or are interested in doing development work on the WordPress XML-RPC code please subscribe to the wp-xmlrpc email list. Along with various tickets in Trac this is where we discuss ideas and issues for the XML-RPC APIs that WordPress supports.