Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter regenwolke

    (@regenwolke)

    I somehow solved that myself.

    The problem is, that TweetPress does not create a post for every image it uploads.

    So what i did is, insert this code inside tweetpress.php:

    // Create post object
    $my_post = array();
    $my_post[‘post_title’] = “”;
    $my_post[‘post_content’] = $_POST[‘message’].'<img class=’.'”‘.”alignnone size-medium wp-image-10″.'”‘.” src=”.'”‘.$imageurl.'”‘.”/>”;
    $my_post[‘post_status’] = “publish”;
    // Insert the post into the database
    wp_insert_post( $my_post );

    and voila, every TweetPress image has a post with an URL to the image, so autofocus will find it.

    Still some tweaking to go, but what i am looking for is there 😉

    Maybe someone of you could use it as well

    Best

    Jens

Viewing 1 replies (of 1 total)