Changeset 3115 for trunk/wp-content/themes/default/comments-popup.php
- Timestamp:
- 11/16/2005 11:48:12 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/default/comments-popup.php
r2945 r3115 33 33 $comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : ''; 34 34 $comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : ''; 35 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");36 $ commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");37 if (!empty($ commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie35 $comments = get_approved_comments($id); 36 $post = get_post($id); 37 if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie 38 38 echo(get_the_password_form()); 39 39 } else { ?> … … 53 53 <?php } ?> 54 54 55 <?php if ('open' == $ commentstatus->comment_status) { ?>55 <?php if ('open' == $post->comment_status) { ?> 56 56 <h2>Leave a comment</h2> 57 57 <p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
Note: See TracChangeset
for help on using the changeset viewer.