[wp-xmlrpc] Wordpress version from xmlrpc?
Joseph Scott
joseph at randomnetworks.com
Mon Jan 14 17:29:58 GMT 2008
On Jan 14, 2008, at 10:12 AM, Joe Cheng wrote:
> So far we've only been interested in the distinction between 2.1.x
> and earlier, and 2.2 and later. We just look at whether WP API is
> supported to tell us that. I'm sure it's only a matter of time though.
WLW is a little bit different in this regard because you also have
the wlwmanifest.xml, which we used to turn on mt_keywords support,
which didn't show up in WP until 2.3.
>
> If folks are legitimately worried about exposing the WP version,
> then that's a good argument for keeping it behind authenticated XML-
> RPC calls.
Keeping it behind an auth'd call was going to be my strategy for
short circuiting those that were concerned about exposing a version
number :-)
I realize that it one more step (or more) clients would have to make
in order to gather details about a blogs features. What if we
cheated a little bit here. Carlos Moffat asked about having the time
zone offset that is set in the WP options being exposed. Since it
would be rather a waste to have an entire method just for that, I was
thinking of adding a more general wp.getBlogOptions() method. Such a
method would take an array of strings, where each string was a blog
option that the client wanted to have a value for. The method would
then return a struct, with the key as the option string (same as the
one provided in the array). We could make the versioning details be
part of that by considering it a blog option.
Something like this:
wp.getBlogOptions(
blog_id,
username,
password,
array('blogname', 'blogdescription', 'gmt_offset', 'xmlrpc_version',
'blog_version')
)
which would return:
{
'blogname': 'My Cool Blog',
'blogdescription': 'Just another WordPress weblog',
'gmt_offset': -7,
'xmlrpc_version': 12345,
'blog_version': '2.4-bleeding'
}
In order for something like that to work we'd have to firm up the
exact option string values and such of course.
--
Joseph Scott
http://joseph.randomnetworks.com/
More information about the wp-xmlrpc
mailing list