Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter S3nd41

    (@s3nd41)

    The click-through url is being attached as a click-through link to the image on the post contents inside WordPress which is generated automatically with the caption on bottom so it should be simply a matter of getting the url and pasting it like the rest:
    add_post_meta( $id, 'tumblr_'.$this->blog[$url]['name'].'_id', $post['tumblr_id'] );

    Maybe like this:
    add_post_meta( $id, 'tumblr_'.$this->blog[$url]['name'].'_src', $post['src'] );
    ?

    Thread Starter S3nd41

    (@s3nd41)

    Okay, I managed to figure it out, I’ll leave it here if someone wants to do this:

    Add:
    $post[‘tumblr_src’] = (string) $tpost->{‘photo-link-url’};
    Below:
    $post[‘tumblr_url’] = (string) $tpost[‘url-with-slug’];

    and…

    Add:
    add_post_meta( $id, ‘tumblr_’.$this->blog[$url][‘name’].’_src’, $post[‘tumblr_src’] );
    Below:
    add_post_meta( $id, ‘tumblr_’.$this->blog[$url][‘name’].’_id’, $post[‘tumblr_id’] );

    Plugin Contributor Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    A better way to save that data would be in the handle_sideload function. In the image case, before the wp_update_post is called, you can do something like this:

    if (!empty($link))
      add_post_meta( $post->id, 'tumblr_'.$this->blog[$url]['name'].'_src', $link );
    Thread Starter S3nd41

    (@s3nd41)

    Hi Otto,

    Thanks, I will use that solution instead!

    Maybe you can include that on the next version of the plug-in, lots of users on Tumblr reblog photos from outer sources so this could come in handy for them.

    Take care!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Tumblr Importer] Need to retrieve the Linkurl associated with each post’ is closed to new replies.