XML-RPC API for Customization and Extensibility Needed
|Reported by:||kailasa||Owned by:|
I recently hit a wall with wp.getPosts because of what is, IMHO, a bad decision to put the following code into the xmlrpc server.
// Consider future posts as published if ( $post_fields['post_status'] === 'future' ) $post_fields['post_status'] = 'publish';
We have other unique requirements for behaviors of the XML-RPC server, which I won't detail here for now... suffice it to say that the issue is really that this part of the framework does not follow the model of customization/extensibility.
That code that conflates "future" with "publish" should really be a developer option that we can add to our theme/functions, etc. such that it customizes the xmlrpc behaviors, is preserved on upgrade and does not require core to manage X number of unique xmlrpc requirements. Miss Sally's blog may want one thing. Macho Mainstream Online Magazine may have some serious heavy lifting to do with XML-RPC. MyShoppingCenter in Wordpress could have very unique needs. DesktopDeveloper.app gives remote access to WP on your desktop via XML-RPC (we do this now) You don't want to be adding all these to the core.
The way themes work and should also work for xmlrpc. If someone wants "future" to equal "publish" he can make is so without touching the core. Or perhaps some plug-in that would allow us to add-subtract etc to the core XML-RPC. Many values have multi-parameter options which are now hard-wired into that one file.