[wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost

David Weiss dave at daveweiss.net
Wed Apr 8 16:26:11 GMT 2009


I don't know if it's a big deal or not.  As I explained in an earlier post,
I'm a bit of a noob at both WP and XMLRPC.  If there is a simple request
that can be made that solves the problem for me, I haven't found what that
is.

Maybe I just don't know enough on the subject yet.  Maybe if I give a little
more detail to my issue and thoughts, it would help.

Let's say I have 10 custom fields I want on every post.  It's the same 10
fields all the time.

For a new post, I can set them just fine with metaWeblog.newPost.  For an
update, as far as I can tell, I have to:

1.  do a metaWeblog.getPost.
2.  loop through all of the custom_fields for each of the 10 custom fields,
and inspect the array so that I can match up each of the 10 custom fields
with the existing custom field.
3.  do a metaWeblog.editPost

I'd like to find a better way to do step 2, I just don't know what that
better way is.

I don't know what my server and network load will be yet, but I'm just
preparing myself for a possible issue.

On Wed, Apr 8, 2009 at 11:03 AM, Joe Cheng <Joe.Cheng at microsoft.com> wrote:

>
> > I'd somehow have to do a getPost, then inspect the custom_fields array to
> figure out what meta_ID is attached to the specific field I'm wanting to
> update.
>
> David, is this really such a big deal for you to do? You talked about
> server/network load earlier, but we're just talking about a couple of extra
> XML-RPC requests at authoring time, and only a few extra lines of code.
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-xmlrpc/attachments/20090408/8baaecb2/attachment.htm


More information about the wp-xmlrpc mailing list