diff --git a/wp-comments-reply.php b/wp-comments-reply.php
deleted file mode 100644
index 443ffd5fcd..0000000000
--- a/wp-comments-reply.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
- » Comments on ""
-
-
-
-
-
-
-
-
-
-
-post_password)) { // if there's a password
- if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
- echo("Enter your password to view comments.
");
- return;
- }
- }
-
- $comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
- $comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
- $comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
- $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$id' AND comment_approved = '1' AND comment_ID = '$comment_reply_ID' ORDER BY comment_date");
-?>
-
-
-
-
-
-
-
- No comments yet.
-
-
-comment_status) { ?>
-Line and paragraph breaks automatic, email address never displayed, HTML allowed:
-
-
-
-Sorry, the comment form is closed at this time.
-
-
-
diff --git a/wp-comments.php b/wp-comments.php
index d4218ca4da..6dcfb140b1 100644
--- a/wp-comments.php
+++ b/wp-comments.php
@@ -1,88 +1,81 @@
-post_password)) { // if there's a password
- if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
-?>
-
get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
+if ( !empty($post->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) :
+?>
+
+
-ping_status) { ?>
-URI to TrackBack this entry is:"); ?>
-
-
-
-
+
-
-
-
-RSS feed for comments on this post.")); ?>
-
-comment_status) { ?>
-HTML allowed:"); ?>
+
+
+
+
+
+RSS feed for comments on this post.')); ?>
+
+ URI'); ?>
+
+
+
+
+
+
+HTML allowed:'); ?>
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/wp-includes/template-functions-comment.php b/wp-includes/template-functions-comment.php
index 9c3bbff834..f111ddd581 100644
--- a/wp-includes/template-functions-comment.php
+++ b/wp-includes/template-functions-comment.php
@@ -17,7 +17,15 @@ add_filter('comment_text', 'convert_smilies', 20);
add_filter('comment_excerpt', 'convert_chars');
function comments_template() {
- global $withcomments, $single, $post, $wpdb, $id, $comment;
+ global $withcomments, $single, $post, $wpdb, $id, $comment, $cookiehash;
+
+ $req = get_settings('require_name_email');
+ $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
+ $comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
+ $comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
+
+ $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
+
if ( $single || $withcomments )
include(ABSPATH . 'wp-comments.php');
}
@@ -301,4 +309,16 @@ function trackback_rdf($timezone = 0) {
}
}
+function comments_open() {
+ global $post;
+ if ('open' == $post->comment_status) return true;
+ else return false;
+}
+
+function pings_open() {
+ global $post;
+ if ('open' == $post->ping_status) return true;
+ else return false;
+}
+
?>
\ No newline at end of file
by — @
-