protected function WordPressItemMigration::handleEnclosure in WordPress Migrate 7.2
Blubrry PowerPress podcast values are of the form http://www.example.com/audio/example.mp3 7662957 audio/mpeg a:1:{s:8:"duration";s:8:"00:05:19";} We will extract and return the first line, the URL of the audio file.
Parameters
$value:
Return value
string
File
- ./
wordpress_item.inc, line 727 - Support for migrating posts and pages from a WordPress blog into Drupal.
Class
- WordPressItemMigration
- Intermediate Migration class, implementing behavior common across different types (post_type) of items.
Code
protected function handleEnclosure($value) {
$value_array = explode("\n", $value);
return reset($value_array);
}