diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php
index 17fce725d1..fe3ff13590 100644
--- a/wp-includes/feed-atom.php
+++ b/wp-includes/feed-atom.php
@@ -38,8 +38,8 @@ $more = 1;
]]>
-
+
-
+
\ No newline at end of file
diff --git a/wp-includes/feed.php b/wp-includes/feed.php
index abee911e48..79f7886ade 100644
--- a/wp-includes/feed.php
+++ b/wp-includes/feed.php
@@ -173,19 +173,29 @@ function rss_enclosure() {
if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) )
return;
- $custom_fields = get_post_custom();
- if ( is_array($custom_fields) ) {
- while ( list($key, $val) = each($custom_fields) ) {
- if ( $key == 'enclosure' ) {
- if ( is_array($val) ) {
- foreach ( (array) $val as $enc ) {
- $enclosure = split( "\n", $enc );
- print "\n";
- }
- }
+ foreach (get_post_custom() as $k => $v) {
+ if ($key == 'enclosure') {
+ foreach ((array)$val as $enc) {
+ $enclosure = split("\n", $enc);
+ echo apply_filters('rss_enclosure', '' . "\n";
}
}
}
}
-?>
+function atom_enclosure() {
+ global $id, $post;
+ if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) )
+ return;
+
+ foreach (get_post_custom() as $k => $v) {
+ if ($key == 'enclosure') {
+ foreach ((array)$val as $enc) {
+ $enclosure = split("\n", $enc);
+ echo apply_filters('atom_enclosure', '' . "\n";
+ }
+ }
+ }
+}
+
+?>
\ No newline at end of file