BUG 390: Fixed support for multiple enclosures.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2bef1de2b9
commit
3dde29bde0
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue