Tagged: xml-rpc Toggle Comment Threads | Keyboard Shortcuts

  • tediscript 6:02 pm on March 18, 2015 Permalink | Reply
    Tags: , xml-rpc   

    PHP XML RPC Lib 

    https://github.com/WordPress/WordPress/blob/master/wp-includes/class-IXR.php
    http://djzone.im/2011/04/simple-xml-rpc-client-to-wordpress-made-easy/

    Advertisements
     
  • tediscript 4:46 pm on May 22, 2014 Permalink | Reply
    Tags: , xml-rpc   

    Set Featured Image in WordPress via XML-RPC 

    Yes it is possible to do it, if WordPress version is 3.5 or greater,when using the code for uploading file/image you can set the post_id. The flow I used for new posts with featured images is like this:

    1 use the newPost function and post the content without the featured image and also set publish to false, record the post_id returned by this

    2 upload the image and set the post_id to the id of the post just posted, record the image_id

    3 when done edit the post and set the wp_post_thumbnail equal to the image_id you just uploaded and also set publish to true(if needed)

    Important: The mime type is important, it must be “image/jpg” or “image/png” please see documentation, if mime type is worng like “jpg” attaching will fail.

    Tip: For debugging, if you get a generic error from wordpress and you can’t figure out why you can check the wordpress code and even edit it, adding debugging/tracing calls and hopefully you can figure out the cause.

    http://stackoverflow.com/questions/17722743/attach-image-to-post-in-wordpress-xmlrpc

     
  • tediscript 1:41 am on July 6, 2012 Permalink | Reply
    Tags: , xml-rpc   

    WordPress XML-RPC 

    http://wp.tutsplus.com/tutorials/creative-coding/xml-rpc-in-wordpress/

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel