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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user