[wp-trac] Re: [WordPress Trac] #5148: XMLRPC interface should support custom fields

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 12 22:57:09 GMT 2007


#5148: XMLRPC interface should support custom fields
------------------------+---------------------------------------------------
 Reporter:  redsweater  |        Owner:  anonymous
     Type:  defect      |       Status:  new      
 Priority:  normal      |    Milestone:  2.5      
Component:  XML-RPC     |      Version:  2.3      
 Severity:  normal      |   Resolution:           
 Keywords:              |  
------------------------+---------------------------------------------------
Comment (by josephscott):

 The attached diff exposes custom fields via wp.getPage and
 metaWeblog.getPost (and their friends).  The new field is called
 "custom_fields" and an array of structs, with each struct containing three
 entries: id, key and value.  Something like this:

 {{{
     "custom_fields" = (
         {id = 129; key = city; value = Sacramento; },
         {id = 130; key = city; value = Sandy; }
     )
 }}}

 Custom fields can be added via wp.newPost/editPost and
 metaWeblog.newPost/editPost following the same general format.  If a
 custom field entry included with a post contains an "id" value then an
 update is done.  If there is no "id" then an add is done.  If there is an
 "id" value and no "key" value then the custom field with that id is
 deleted.

 I'm also open to the possibility of a wp.addCustomField(blog_id, post_id,
 key, value) style methods if discussions show that there is an interest
 and a reasonable use for them.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5148#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list