WordPress.org

Plugin Directory

Changeset 629210


Ignore:
Timestamp:
11/23/12 23:06:15 (17 months ago)
Author:
dllh
Message:

Tumblr Importer: Handle Vimeo embeds.

File:
1 edited

Legend:

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

    r629162 r629210  
    861861                            $post['post_content'] = $embed['src']; 
    862862                        } 
     863                    } elseif ( preg_match( '/<iframe.*vimeo/', $video->embed_code ) ) { 
     864                        $embed['src'] = preg_replace( '|<iframe.*src="(http://player.vimeo.com/video/([a-zA-Z0-9_\-]+))\??.*".*</iframe>.*|', 'http://vimeo.com/$2', $video->embed_code ); 
     865                        $post['post_content'] = $embed['src']; 
    863866                    } else { 
    864867                        // @todo: See if the video source is going to be oEmbed'able before adding the flash player 
Note: See TracChangeset for help on using the changeset viewer.