From e3728e7b6aefdef3892bdf1cfca81018bd5e8335 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 22 Mar 2005 17:49:19 +0000 Subject: [PATCH] Respect post password protection for enclosures. http://mosquito.wordpress.org/view.php?id=1040 git-svn-id: https://develop.svn.wordpress.org/trunk@2472 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/feed-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/feed-functions.php b/wp-includes/feed-functions.php index 81cae60e00..de43e650b7 100644 --- a/wp-includes/feed-functions.php +++ b/wp-includes/feed-functions.php @@ -138,7 +138,9 @@ function the_category_rss($type = 'rss') { } function rss_enclosure() { - global $id; + global $id, $post; + 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 ) ) {