I put the following code in Function.php and use the user_rss_enclosure() to show the link of the enclosure without the duration and type.
However, I am wondering if there is anyway I can trim the link without the domain?
e.g.
http://www.abc.com/mp3/123.mp3
to
/mp3/123.mp3
function user_rss_enclosure() {
if ( post_password_required() )
return;
foreach ( (array) get_post_custom() as $key => $val) {
if ($key == 'enclosure') {
foreach ( (array) $val as $enc ) {
$enclosure = explode("\n", $enc);
//only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3'
$t = preg_split('/[ \t]/', trim($enclosure[2]) );
$type = $t[0];
echo apply_filters('user_rss_enclosure', '' . trim(htmlspecialchars($enclosure[0])) . ' ' . "\n");
}
}
}
}