// Add extra field to comment form function add_bcw_fields(){ echo ''; } add_action( 'comment_form_logged_in_after', 'add_bcw_fields' ); //Save the extra comment field value function bcw_handle_comment($id) { if (array_key_exists('test', $_POST)) update_comment_meta( $id, 'bcw_test', $_POST['test']); } add_action('wp_insert_comment', 'bcw_handle_comment'); //Override default theme function to display a comment function twentyten_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • id="li-comment-">
    says:', 'twentyten' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    comment_ID, 'bcw_test', true ); ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> */ ?>