Posting HTML content via XML-RPC (2 posts)

  1. fncll
    Posted 9 years ago #

    How can I post an HTML formatted post via the XML-RPC interface? If I post the HTML code it gets converted to entities. If I preconvert content to entities, it doesn't get converted back (obviously) :)

    I am using PHP with the xml-rpc library. Example Code:

    $content = "Bold Statement;
    $xmlrpcurl = "";

    $client = new xmlrpc_client($xmlrpcurl);

    $params[] = new xmlrpcval("n/a");
    $params[] = new xmlrpcval("n/a");
    $params[] = new xmlrpcval("admin");
    $params[] = new xmlrpcval("chrislottt");
    $params[] = new xmlrpcval(
    $params[] = new xmlrpcval("true");

    $msg = new xmlrpcmsg("blogger.newPost",$params);

    Am I going to have to do a direct insert into the WP tables or use the internal WP functions??

  2. iolaire
    Posted 9 years ago #

    see - http://wordpress.org/support/topic/54927 I think you need disable
    $post_content = apply_filters('content_save_pre', $post_content);

Topic Closed

This topic has been closed to new replies.

About this Topic