BUG 390: Fixed support for multiple enclosures.

git-svn-id: https://develop.svn.wordpress.org/trunk@1821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dougal Campbell 2004-10-20 16:54:31 +00:00
parent e7ecb7ad81
commit a2e4222fc0
1 changed files with 6 additions and 3 deletions

View File

@ -46,9 +46,12 @@ $custom_fields = get_post_custom();
if( is_array( $custom_fields ) ) {
while( list( $key, $val ) = each( $custom_fields ) ) {
if( $key == 'enclosure' ) {
$enclosure = $val[ 0 ];
$enclosure = split( "\n", $enclosure );
print "<enclosure url='".trim( $enclosure[ 0 ] )."' length='".trim( $enclosure[ 1 ] )."' type='".trim( $enclosure[ 2 ] )."'/>\n";
if (is_array($val)) {
foreach($val as $enc) {
$enclosure = split( "\n", $enc );
print "<enclosure url='".trim( $enclosure[ 0 ] )."' length='".trim( $enclosure[ 1 ] )."' type='".trim( $enclosure[ 2 ] )."'/>\n";
}
}
}
}
}