Make WordPress Core

Ticket #22422: tumblr.patch

File tumblr.patch, 1.3 KB (added by dllh, 13 years ago)

Minor diffs failing to make drafts work

  • tumblr-importer.php

     
    339339                $done = true;
    340340               
    341341                $this->error=null;
    342                
    343342                if ( !empty( $this->blog[$url]['progress'] ) ) {
    344343                        $done = false;
    345344                        do {
     
    456455                if ($this->blog[$url]['posts_complete'] + TUMBLR_MAX_IMPORT > $total) $count = $total - $start;
    457456                else $count = TUMBLR_MAX_IMPORT;
    458457
     458                add_filter( 'tumblr_post_type', function() { return 'draft'; } );
    459459                $imported_posts = $this->fetch_posts($url, $start, $count, $this->email, $this->password, 'draft' );
    460460
    461461                if ( empty($imported_posts) ) {
     
    748748                $url = parse_url( $url, PHP_URL_HOST );
    749749                $post_type = apply_filters( 'tumblr_post_type', '' );
    750750                $url = trailingslashit( "http://api.tumblr.com/v2/blog/$url/posts/$post_type" );
    751 
     751               
    752752                do_action( 'tumblr_importer_pre_fetch_posts' );
    753753
    754754                $params = array(
     
    979979                if ( empty( $this->access_tokens ) )
    980980                        return false;
    981981       
    982                 $params = array('oauth_consumer_key' => $this->consumerkey,
     982                $params = array('oauth_consumer_key' => $this->get_consumer_key(),
    983983                                "oauth_nonce" => time(),
    984984                                "oauth_timestamp" => time(),
    985985                                "oauth_token" => $this->access_tokens['oauth_token'],