From 851e47cb2238ed841b73bfe272a7ba2c21d91b8d Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 3 Nov 2008 20:19:38 +0000 Subject: [PATCH] Use only one enclosure type. Props hailin. fixes #8017 git-svn-id: http://svn.automattic.com/wordpress/trunk@9501 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/feed.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/feed.php b/wp-includes/feed.php index e033434b0..31486d8fe 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -401,7 +401,12 @@ function rss_enclosure() { if ($key == 'enclosure') { foreach ( (array) $val as $enc ) { $enclosure = split("\n", $enc); - echo apply_filters('rss_enclosure', '' . "\n"); + + //only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3' + $t = split('[ \t]', trim($enclosure[2]) ); + $type = $t[0]; + + echo apply_filters('rss_enclosure', '' . "\n"); } } }