Use post_password_required()

git-svn-id: https://develop.svn.wordpress.org/trunk@9819 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-20 19:10:31 +00:00
parent 2310bf2ab6
commit 092cb9b2ce
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
<id><?php comment_link(); ?></id>
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
<published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
<?php if ( post_password_required() ) : ?>
<?php if ( post_password_required($comment_post) ) : ?>
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
<?php else : // post pass ?>
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>

View File

@ -51,7 +51,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
<dc:creator><?php echo get_comment_author_rss() ?></dc:creator>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
<guid isPermaLink="false"><?php comment_guid() ?></guid>
<?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?>
<?php if ( post_password_required($comment_post) ) : ?>
<description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>
<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
<?php else : // post pass ?>