Make WordPress Core

Changeset 374 for trunk/b2comments.php


Ignore:
Timestamp:
09/20/2003 12:03:21 AM (21 years ago)
Author:
mikelittle
Message:

Comments should not visible on password protected post until password entered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2comments.php

    r369 r374  
    33        die ('Please do not load this page directly. Thanks!');
    44    if (($withcomments) or ($c)) {
     5
     6        if (!empty($post->post_password)) { // if there's a password
     7            if ($HTTP_COOKIE_VARS['wp-postpass'] != $post->post_password) {  // and it doesn't match the cookie
     8                echo("Enter your password to view comments");
     9                return;
     10            }
     11        }
    512
    613        $comment_author = (empty($HTTP_COOKIE_VARS["comment_author"])) ? "name" : $HTTP_COOKIE_VARS["comment_author"];
Note: See TracChangeset for help on using the changeset viewer.