I can’t seem to find such an option listed here:
http://codex.wordpress.org/XML-RPC_wp#wp.setOptions
Does it exist?
Thanks.
I can’t seem to find such an option listed here:
http://codex.wordpress.org/XML-RPC_wp#wp.setOptions
Does it exist?
Thanks.
You must be logged in to post a comment.
No, that option does not currently exist through XML-RPC. However, you can always create your own method in a plugin and hook it up to XML-RPC.
Update
There’s an upcoming Google Summer of Code project that will be extending the XML-RPC interface to allow direct manipulation of themes, so I won’t give away code to implement that here. But keep your ears and eyes open for when new code (core changes and/or plugins) start releasing this summer.
In the meantime, I will provide an alternative. The set of options that you can view and set through XML-RPC is filterable. Basically, you can tell the system to give you more information than it normally would.
What you can already get (bold options are read only … you can’t change them with
wp.setOptions
but you can retrieve them withwp.getOptions
):This list (actually, an array with other settings), is passed through the
xmlrpc_blog_options
filter, which means you can add and remove to this list all you want. To enable the fetching of the current theme bywp.getOptions
and the changing of the theme bywp.setOptions
you’d use the following:This adds two fields that you can set: “active-theme” and “active-stylesheet”.
Remember, you’ll be setting these options the same way as you would using
update_option()
, so double check the codex before doing anything.I’ve been interested in the same thing. I put together a plugin that extends XML-RPC to the wp_get_themes function and the switch_theme function. The plugin is on Github and I have a walkthrough on my blog.