diff --git a/wp-content/themes/classic/comments-popup.php b/wp-content/themes/classic/comments-popup.php index 4d22c93c7e..f42d38dced 100644 --- a/wp-content/themes/classic/comments-popup.php +++ b/wp-content/themes/classic/comments-popup.php @@ -32,8 +32,8 @@ foreach ($posts as $post) { start_wp(); $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' ORDER BY comment_date"); -$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id"); +$comments = get_approved_comments($id); +$commentstatus = get_post($id); if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie echo(get_the_password_form()); } else { ?> diff --git a/wp-content/themes/classic/footer.php b/wp-content/themes/classic/footer.php index 047982e9d3..0894f78eda 100644 --- a/wp-content/themes/classic/footer.php +++ b/wp-content/themes/classic/footer.php @@ -3,7 +3,7 @@ -
WordPress"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?>
+WordPress"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?>
diff --git a/wp-content/themes/default/comments-popup.php b/wp-content/themes/default/comments-popup.php index 980717b905..d5dd176388 100644 --- a/wp-content/themes/default/comments-popup.php +++ b/wp-content/themes/default/comments-popup.php @@ -32,9 +32,9 @@ foreach ($posts as $post) { start_wp(); $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' ORDER BY comment_date"); -$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id"); -if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie +$comments = get_approved_comments($id); +$post = get_post($id); +if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie echo(get_the_password_form()); } else { ?> @@ -52,7 +52,7 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASHNo comments yet.
-comment_status) { ?> +comment_status) { ?>Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: