[wp-trac] [WordPress Trac] #16476: Custom post types support in XML-RPC

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 28 23:56:02 UTC 2011


#16476: Custom post types support in XML-RPC
-------------------------+------------------------------
 Reporter:  tillkruess   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  XML-RPC      |     Version:  3.1
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by rofflox):

 I've already played around with this. In my opinion, the whole wp-xmlrpc-
 server class should be overhauled.

 For example:

 1. Create a generic wp_getPost / wp_newPost / wp_deletePost / wp_editPost
 2. The output of the functions should be more or less the same as in the
 default functions. E.g. title => post_title, postid => ID etc.
 3. For backwards compatibility:
   a. Create all sub functions e.g. mw_getPost with link to the generic
 wp_getPost
   a. Add an optional second parameter "mode" to format the output based on
 the calling function. E.g. mode = mw_getPost will format the output of the
 result array in a different way.
 4. Take an associative array instead of a numeric one as argument, so we
 could seamless add additional features in the future. Thats already WP
 standard.

 I've added a working example for wp_getPost, wp_getPosts and wp_getPage in
 the diff. Maybe someone could check if this is a good approach and give
 feedback.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16476#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list