[wp-testers] post_password_required()
Eric Sizemore
wordpress at secondversion.com
Thu Nov 20 19:51:59 GMT 2008
I wouldn't see why not? Here's what I have atm:
if ( function_exists('post_password_required') ) {
if ( post_password_required() ) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
}
else {
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
}
}
Idled Soul wrote:
> I'm not sure if this was posted to the list or not. Just curious, when
> making the comments.php file compatible (and yes, I know there's
> instructions out there, no time to look that up now.) Can we use and {
> else } there for this line...
>
> if ( post_password_required() ) { ?>
> <p class="nocomments">This post is password protected. Enter
> the password to view comments.</p>
> { else } old post_password() )
> <p class="nocomments">This post blah...
>
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>
More information about the wp-testers
mailing list