WordPress.org

Plugin Directory

Changeset 631355


Ignore:
Timestamp:
11/28/12 16:07:53 (17 months ago)
Author:
dllh
Message:

Tumblr Importer: Don't use an enclosure for the post_type filter, as doing so can cause fatal errors in earlier versions of php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tumblr-importer/branches/newapi/tumblr-importer.php

    r629210 r631355  
    437437        } 
    438438    } 
    439      
     439 
     440    function get_draft_post_type( $post_type ) { 
     441        return 'draft'; 
     442    } 
     443 
    440444    function do_drafts_import($url) { 
    441445        $start = $this->blog[$url]['drafts_complete']; 
     
    454458        else $count = TUMBLR_MAX_IMPORT; 
    455459 
    456         add_filter( 'tumblr_post_type', function() { return 'draft'; } ); 
     460        add_filter( 'tumblr_post_type', array( $this, 'get_draft_post_type' ) ); 
    457461        $imported_posts = $this->fetch_posts($url, $start, $count, $this->email, $this->password, 'draft' ); 
    458462 
Note: See TracChangeset for help on using the changeset viewer.