post_password_required(). fixes #7679

git-svn-id: https://develop.svn.wordpress.org/trunk@8800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-09-03 19:54:14 +00:00
parent 341cede30b
commit a487b60f71
7 changed files with 45 additions and 31 deletions

View File

@@ -394,8 +394,7 @@ function html_type_rss() {
* @uses get_post_custom() To get the current post enclosure metadata.
*/
function rss_enclosure() {
global $post;
if ( !empty($post->post_password) && (!isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) )
if ( post_password_required() )
return;
foreach ( (array) get_post_custom() as $key => $val) {
@@ -426,8 +425,7 @@ function rss_enclosure() {
* @uses get_post_custom() To get the current post enclosure metadata.
*/
function atom_enclosure() {
global $post;
if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) )
if ( post_password_required() )
return;
foreach ( (array) get_post_custom() as $key => $val ) {