Comment registration goodness. Hat tip to Jason at noprequisite.com for user_identity code.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt
2005-01-31 06:38:12 +00:00
parent f95c9db9b7
commit c4649b9979
9 changed files with 98 additions and 50 deletions

View File

@@ -3,7 +3,7 @@
// Template functions
function comments_template() {
global $wp_query, $withcomments, $post, $wpdb, $id, $comment;
global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity;
if ( is_single() || is_page() || $withcomments ) :
$req = get_settings('require_name_email');
@@ -18,6 +18,8 @@ function comments_template() {
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND ( comment_approved = '1' OR ( comment_author = '$author_db' AND comment_author_email = '$email_db' AND comment_approved = '0' ) ) ORDER BY comment_date");
}
get_currentuserinfo();
if ( file_exists( TEMPLATEPATH . '/comments.php') )
require( TEMPLATEPATH . '/comments.php');
else