Make WordPress Core


Ignore:
Timestamp:
09/03/2008 07:54:14 PM (17 years ago)
Author:
ryan
Message:

post_password_required(). fixes #7679

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/default/comments.php

    r8703 r8800  
    33        die ('Please do not load this page directly. Thanks!');
    44
    5     if (!empty($post->post_password)) { // if there's a password
    6         if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
    7             ?>
    8 
    9             <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
    10 
    11             <?php
    12             return;
    13         }
     5    if ( post_password_required() ) { ?>
     6        <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
     7    <?php
     8        return;
    149    }
    1510
Note: See TracChangeset for help on using the changeset viewer.