mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Added enclosure support.
git-svn-id: https://develop.svn.wordpress.org/trunk@1786 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
12
wp-rss2.php
12
wp-rss2.php
@@ -41,6 +41,18 @@ $more = 1;
|
||||
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
||||
<?php endif; ?>
|
||||
<wfw:commentRSS><?php echo comments_rss(); ?></wfw:commentRSS>
|
||||
<?php
|
||||
$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";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</item>
|
||||
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
||||
</channel>
|
||||
|
||||
Reference in New Issue
Block a user