[wp-cvs] wordpress wp-rss2.php,1.26,1.27
Donncha O Caoimh
donncha at users.sourceforge.net
Tue Oct 12 15:52:31 UTC 2004
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31426
Modified Files:
wp-rss2.php
Log Message:
Added enclosure support.
Index: wp-rss2.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-rss2.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** wp-rss2.php 30 Aug 2004 07:16:39 -0000 1.26
--- wp-rss2.php 12 Oct 2004 15:52:29 -0000 1.27
***************
*** 42,45 ****
--- 42,57 ----
<?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; } } } ?>
More information about the cvs
mailing list